Method and device for predicting special effect consumption duration, electronic equipment and storage medium
By using a special effects duration prediction model, the problem of unpredictable time consumption of game special effects on mobile devices has been solved, enabling efficient special effects testing and reduction, and improving the work efficiency of artists.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2023-03-02
- Publication Date
- 2026-07-10
AI Technical Summary
During the production of game special effects, artists cannot accurately predict how long the effects will take to run on mobile devices, leading to repeated testing and cuts, which increases work costs and reduces efficiency.
A special effects duration prediction model is adopted. By obtaining the candidate feature values of the target feature parameters of the special effects in multiple rendering frames, the maximum duration of the special effects is predicted using a target monotonically increasing decision forest model, and a reduction strategy is provided to reduce the cycle of repeated export testing.
It improved the accuracy and efficiency of predicting the duration of special effects, reduced the workload of art and quality control personnel, and improved the efficiency of special effects testing and reduction.
Smart Images

Figure CN116228950B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to methods, apparatus, electronic devices and storage media for predicting the duration of special effects. Background Technology
[0002] In terms of visual effects design, due to the limitations of machine performance, especially since game effects need to be rendered on mobile clients, excessive rendering time for effects can cause game lag. To address this issue, effects standards were established, and effects were reduced in length to ensure that the maximum rendering time of the final generated effects met these standards.
[0003] However, since artists design and create special effects on computers, they cannot accurately know the maximum processing time on mobile devices. Therefore, they need to export the effects to a testing machine for stress testing to determine if they meet the standards. If they do not meet the standards, they need to go back to the computer to reduce certain characteristics of the effects before exporting them to the testing machine again. This method requires repeated testing and reduction of special effects until they meet the standards, which not only incurs significant workload for artists and quality control personnel but also results in low efficiency for both testing and reduction. Summary of the Invention
[0004] In view of this, the embodiments of this application at least provide a method, apparatus, electronic device and storage medium for predicting the duration of special effects consumption, which can improve the accuracy of the prediction model for the duration of special effects consumption and reduce the workload of art staff and quality inspectors, thereby improving the efficiency of special effects testing and special effects reduction.
[0005] This application mainly includes the following aspects:
[0006] In a first aspect, embodiments of this application provide a method for predicting the duration of special effects consumption. The method includes: obtaining candidate feature values corresponding to at least one target feature parameter of the special effect to be predicted in multiple rendering frames; for any target feature parameter, determining a target feature value corresponding to the target feature parameter based on the multiple candidate feature values corresponding to the target feature parameter; the target feature value is key data affecting the time consumed by the special effect to be predicted during the rendering process; inputting at least one target feature value of the special effect to be predicted into a trained special effects consumption duration prediction model to predict the target maximum consumption duration of the special effect to be predicted; the target maximum consumption duration is used to characterize the maximum duration of the special effect to be predicted in each rendering frame during the rendering process.
[0007] Secondly, embodiments of this application also provide a device for predicting the duration of special effects consumption. The device includes: an acquisition module, configured to acquire candidate feature values corresponding to at least one target feature parameter of the special effect to be predicted in multiple rendering frames; a determination module, configured to determine a target feature value corresponding to any target feature parameter based on multiple candidate feature values corresponding to the target feature parameter; the target feature value is key data affecting the time consumed by the special effect to be predicted during the rendering process; and a prediction module, configured to input at least one target feature value of the special effect to be predicted into a trained special effects consumption duration prediction model to predict the target maximum consumption duration of the special effect to be predicted; the target maximum consumption duration is used to characterize the maximum duration of the consumption duration of the special effect to be predicted in each rendering frame during the rendering process.
[0008] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the method for predicting the duration of special effects consumption described in the first aspect.
[0009] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the method for predicting the duration of special effects consumption described in the first aspect.
[0010] The method, apparatus, electronic device, and storage medium for predicting the duration of special effects provided in this application can predict the maximum duration of special effects during rendering by inputting key data affecting the rendering time of the special effects to be predicted into a trained special effects duration prediction model. The key data is the target feature value of at least one target feature parameter of the special effects to be predicted. Compared to related technologies where artists need to repeatedly reduce special effects and quality inspectors need to repeatedly test special effects until they meet standards, which not only incurs significant workload for artists and quality inspectors but also results in low efficiency for testing and reduction, this application can accurately predict the maximum duration of special effects during rendering without exporting them to a testing machine. This allows artists to directly reduce special effects to meet standards, reducing the manpower costs of testing and reducing special effects, thereby improving the efficiency of special effects testing and reduction.
[0011] Furthermore, the method for predicting the duration of special effects provided in this application selects a target monotonically increasing decision forest model as the prediction model for the duration of special effects. By predicting the maximum duration of the target special effects, it can ensure that the predicted duration is positively correlated with the size of the feature value, thereby improving the interpretability of the model and the accuracy of the prediction.
[0012] Furthermore, the method for predicting the duration of special effects provided in this application can also determine specific reduction strategies for special effects that do not meet the standard duration requirements. The reduction strategy includes at least one target feature parameter that needs to be reduced, and the expected reduction feature value corresponding to each target feature parameter. In this way, the reduction strategy can provide art professionals with guidance on reducing special effects, allowing them to meet the standards without repeatedly reducing effects, thus further improving the efficiency of special effects reduction.
[0013] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A flowchart is shown of a method for predicting the duration of special effects provided in one of the optional embodiments of this application;
[0016] Figure 2 A schematic diagram of a special effects consumption prediction interface provided by one of the optional embodiments of this application is shown;
[0017] Figure 3 This illustration shows one of the functional block diagrams of a special effects duration prediction device provided in one of the optional embodiments of this application;
[0018] Figure 4 This is a second functional block diagram of a device for predicting the duration of special effects provided in one of the optional embodiments of this application;
[0019] Figure 5 This illustration shows a schematic diagram of the structure of an electronic device provided in one of the optional embodiments of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0021] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0022] In order to enable those skilled in the art to use the content of this application and combine it with the "special effects processing" of specific application scenarios, the following implementation methods are provided. For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application.
[0023] The methods, apparatus, electronic devices, or computer-readable storage media described in this application can be applied to any scenario that requires special effects processing. This application does not limit the specific application scenario. Any scheme that uses the special effects consumption time prediction method, apparatus, electronic device, and storage medium provided in this application is within the protection scope of this application.
[0024] It's important to clarify that special effects refer to unique or unusual effects. These are typically computer-generated effects that wouldn't normally occur in real life. Special effects are widely used, appearing extensively in television packaging, movies, games, and songs. Game special effects, in particular, are those applied to end-game games. Simply put, they are the special effects within a game, providing users with the most direct experience, such as lighting and shadow effects. Game special effects manifest in many ways, including character animation effects, skill effects, equipment effects, skin effects, scene effects like waterfalls, falling leaves, and lighting, as well as UI effects.
[0025] In games, the performance consumption of special effects is an important indicator for judging game performance and efficiency. Performance metrics for special effects include rendering time and rendering memory consumption. Here, rendering time includes rendering frame time and logical frame time. Rendering frame time refers to the time taken to render one frame, while logical frame time refers to the time taken to control how the rendering operation is performed. The rendering time for each frame is the sum of rendering frame time and logical frame time.
[0026] Understandably, in games, each dynamic effect is a continuous process, lasting for dozens of frames. Within a single frame, not only is rendering the effect necessary, but time also needs to be allocated for logical processing, such as sending and receiving information from the server, moving character positions, etc. Therefore, the rendering time for effects within that frame cannot be too long, lest there be insufficient time for logical processing. Furthermore, excessive rendering time can also cause game stuttering.
[0027] Therefore, in most cases, the performance overhead of special effects in the game is reduced by limiting certain performance metrics during their production. Thus, performance testing in games typically involves directly testing the performance metrics of special effects on a testing device (e.g., mobile or PC). However, artists designing and creating special effects on computers cannot accurately know their maximum processing time on mobile devices. Therefore, they need to repeatedly reduce the size of the effects before exporting them to the testing device and performing load testing to determine if they meet the predetermined standards. In other words, this method requires repeated testing and reduction of special effects until the standards are met, which not only incurs significant workload for artists and quality control personnel but also results in low efficiency for both testing and reduction.
[0028] To address the aforementioned issues, this application's embodiments determine key data, i.e., target feature values, that influence the rendering time of the predicted special effect based on candidate feature values corresponding to at least one target feature parameter of the special effect in multiple rendering frames. These target feature values are then input into a trained special effect rendering time prediction model, which can predict the maximum target rendering time of the special effect. This improves the accuracy of the special effect rendering time prediction model and reduces the workload of artists and quality control personnel, thereby increasing the efficiency of special effect testing and reduction.
[0029] To facilitate understanding of this application, the technical solutions provided in this application will be described in detail below with reference to specific embodiments.
[0030] Figure 1 A flowchart illustrating a method for predicting the duration of special effects according to one optional embodiment of this application is shown. Figure 1 As shown, the method for predicting the duration of special effects provided in this application includes the following steps:
[0031] S101: Obtain candidate feature values corresponding to at least one target feature parameter of the effect to be predicted in multiple rendering frames.
[0032] It's understandable that game effects playback is a dynamic process, and the displayed characteristics change as playback time changes. For example, a skill effect might be lighting a fire on the ground, starting with sparks, growing into a large fire, and finally disappearing. Here, the goal of meeting the predetermined standard is that each frame during the effect playback process doesn't exceed the limit. After all, if the effect's consumption is too high in any rendering frame, it will cause the game to stutter. Therefore, as long as the effect doesn't exceed the time limit in the frame with the highest consumption, the overall time limit won't be exceeded. Taking the ignition skill as an example, the effect consumption during the sparks and dissipation stages is significantly less than that during the large fire stage. Therefore, we don't need to consider the time sequence of the effect throughout the entire rendering process (each rendering frame); we only need to check if the frame with the largest flame (the one with the most rendering operation calls, the most particles, and the most faces) exceeds the limit.
[0033] Based on this, we can first identify the key feature parameters that affect the time consumed by special effects during rendering, and then filter the candidate feature values corresponding to these key feature parameters in each rendering frame. The target feature value of the selected target feature parameter is then used as the input to the special effects duration prediction model. Specifically, a large number of special effects feature parameters can be filtered to determine at least one target feature parameter.
[0034] It's important to note that one characteristic parameter for special effects is the rendering operation call parameter, specifically the rendering dp count. dp stands for draw call, which is the operation where the CPU calls the graphics programming interface to instruct the GPU to perform rendering. Each dp call represents one rendering operation. The dp count can be used to measure the performance consumption of a special effect; the higher the dp count, the greater the consumption. Another characteristic parameter is the particle parameter. If the number of particles in the special effect is too large, it may cause stuttering during effect release. Therefore, the number of particles needs to be controlled within a reasonable range. Generally, in mobile game projects, the number of particles in a single special effect should not exceed 100, and complex special effects should ideally be controlled between 150 and 200. A third characteristic parameter is the texture parameter. The texture size requirement is generally just enough; use smaller texture sizes whenever possible while maintaining a similar display effect. Finally, a fourth characteristic parameter is the texture parameter. If high texture detail is required, it is recommended to use a 1:1 square texture. Using textures with non-uniform sides will cause a certain loss of texture clarity when creating special effects.
[0035] Table 1 shows the maximum execution time for different special effects under different feature values corresponding to different effect feature parameters. It can be seen that the larger the feature value of these effect feature parameters, the longer the corresponding maximum execution time. Therefore, based on the influence of the above effect feature parameters on the time consumed by the special effects during rendering, these effect feature parameters can be selected as target feature parameters. Specifically, target feature parameters include, for example, rendering operation call parameters, particle parameters, model face count parameters, texture quantity parameters, texture parameters, sub-model parameters, etc.
[0036] Table 1 shows the maximum duration of different special effects under the corresponding characteristic values of different special effect characteristic parameters.
[0037] Serial Number Special effects Duration dp number Number of particles Number of faces Number of sub-models number of textures 0 A 0.7153 5 1 162 1 3 1 A 0.8100 10 1 162 1 3 2 A 0.8200 5 5 162 1 3 3 A 0.5200 5 1 100 1 3 4 B 1.0560 16 25 940 5 2 5 B 1.2660 16 25 940 8 2 6 B 1.3460 16 25 940 5 8
[0038] S102: For any of the target feature parameters, determine the target feature value corresponding to the target feature parameter based on multiple candidate feature values corresponding to the target feature parameter.
[0039] The target feature value is key data that affects the time consumed during the rendering process of the effect to be predicted.
[0040] It's understandable that the rendering time of the predicted special effect varies across different rendering frames because of the different candidate feature values of the same target feature parameter in different rendering frames. In other words, within a rendering frame, if the feature values of other target feature parameters remain constant, the larger the feature value of a target feature parameter, the more time that frame takes to render. Based on this, we can further filter the candidate feature values corresponding to each target feature parameter across multiple rendering frames to determine a key feature value that significantly affects the rendering time of the predicted special effect. This key feature value is the target feature value, which should be the feature value that consumes the most time. Determining this target feature value reflects our understanding of the prediction of the game's special effect rendering time, and the two should have a positive correlation.
[0041] In one possible implementation, the target feature value can be determined in multiple ways, that is, for any target feature parameter, the target feature value corresponding to the target feature parameter in step S102 is determined according to the following steps:
[0042] Method 1: Select the largest feature value from multiple candidate feature values corresponding to the target feature parameter and determine it as the target feature value.
[0043] In practice, the candidate feature values of target feature parameters will differ across rendering frames. For some target feature parameters, the magnitude of the candidate feature value in a frame will determine the frame's duration. For these types of target feature parameters, the largest feature value corresponding to that parameter can be directly selected as the target feature value for the input effect duration prediction model. Examples of such target feature parameters include rendering operation call parameters, particle parameters, model face count parameters, and texture quantity parameters.
[0044] Method 2: Based on multiple candidate feature values corresponding to the target feature parameter, determine the overall feature value that reflects the target feature parameter in the effect to be predicted, and determine the overall feature value as the target feature value.
[0045] In practice, although the candidate feature values of the target feature parameters will differ across rendering frames, some target feature parameters are not suitable for influencing the duration of the predicted effect based on the magnitude of their candidate feature values within a single frame. For these types of target feature parameters, the overall feature value corresponding to the target feature parameter can be used as the target feature value for the effect duration prediction model. Examples of such target feature parameters include texture parameters and sub-model parameters. The overall feature value of these target feature parameters has a significant impact on the duration of the predicted effect during rendering, rather than on a single frame. For instance, if N sub-models are used in the predicted effect, the target feature value is the total number of sub-models.
[0046] In one possible implementation, the target feature value includes at least one of the following values: maximum number of rendering operation calls, maximum number of particles, maximum number of faces, maximum number of textures, total number of textures, and total number of sub-models.
[0047] It's understandable that if the target feature values of different target feature parameters are not in the same rendering frame, they can be assumed to be in the same rendering frame for ease of statistics and testing. In other words, if all the key data (target feature values) consuming time do not exceed the limit in the same rendering frame, then the effect to be predicted cannot exceed the limit either. Here, we are simply using this maximum consumption virtual 'one rendering frame' to represent the extreme consumption situation of this effect to be predicted.
[0048] It should be noted that this application selects key parameters affecting the rendering time of special effects from a large number of special effects feature parameters as target feature parameters, and uses the target feature value with the greatest impact on the rendering time among multiple candidate feature values corresponding to each target feature parameter as the model input to predict the maximum target rendering time of the special effects. In this way, compared to inputting all special effects feature parameters into the model, the scale of the input features is greatly reduced, significantly decreasing the computational load of the model and lowering the difficulty of data collection. Furthermore, by simplifying the complete time phase of the special effects release from a time series task to a regression task, the computational complexity of the model is greatly reduced. Finally, by reducing the calculation of some interference and redundant terms, the accuracy of the model prediction can be greatly improved.
[0049] S103: Input at least one target feature value of the special effect to be predicted into the trained special effect consumption time prediction model to predict the maximum target consumption time of the special effect to be predicted.
[0050] It should be noted that the target maximum execution time is used to characterize the maximum execution time among all rendering frames of the effect to be predicted during the rendering process. That is, the target maximum execution time here is used to describe the execution time corresponding to the rendering frame with the longest execution time of the effect to be predicted during the rendering process.
[0051] It should be noted that this application avoids repeatedly exporting special effects to the test machine for stress testing. Instead, it uses a machine learning model (i.e., a special effects rendering time prediction model) to predict the maximum rendering time of the special effects. In other words, the special effects rendering time prediction model simulates the maximum rendering time of the special effects on the test machine. Specifically, after the artists create the special effects, a predicted value is directly obtained by inputting the feature values of the relevant parameters of the special effects. This predicted value represents the maximum rendering time of the special effects on the test machine. The special effects are only officially exported to the test machine after the maximum rendering time predicted by the model meets the predetermined standard. This reduces the cycle of exporting the special effects to the test machine for testing, then rejecting them, reducing them, and then exporting them again for testing. This greatly reduces the workload of artists and quality inspectors, thereby improving the efficiency of special effects testing and reduction.
[0052] In one optional embodiment of this application, based on candidate feature values corresponding to at least one target feature parameter of the special effect to be predicted in multiple rendering frames, key data affecting the rendering time of the special effect to be predicted, i.e., target feature values, are determined. At least one target feature value of the special effect to be predicted is then input into a trained special effect rendering time prediction model, which can predict the maximum target rendering time of the special effect to be predicted. This improves the accuracy of the special effect rendering time prediction model and reduces the workload of artists and quality control personnel, thereby improving the efficiency of special effect testing and reduction.
[0053] In one possible implementation, the effect duration prediction model is a target monotonically increasing decision forest model, which includes multiple gradient boosting decision trees. Step S103, which involves inputting at least one target feature value of the effect to be predicted into the trained effect duration prediction model to predict the maximum target duration of the effect, includes: inputting at least one target feature value of the effect to be predicted into each gradient boosting decision tree, and determining the voting score of each gradient boosting decision tree. Based on the voting score of the multiple gradient boosting decision trees, the maximum target duration of the effect to be predicted is predicted.
[0054] It should be noted that, based on prior expert knowledge, as the number of target feature values corresponding to the particle parameters, dp parameters, texture parameters, and sub-model parameters of special effects increases, the final consumption time should also monotonically increase. Therefore, the special effects consumption time prediction model for the maximum consumption time should possess monotonicity. This monotonicity ensures that the selected target feature values and the special effects consumption time prediction model provide a certain degree of interpretability, thus providing artists with some guidance to reduce special effects. For example, as the number of particles and textures increases, the consumption time of the special effects cannot decrease, i.e., there exists a monotonically increasing relationship. Based on this, this application selects a target monotonically increasing decision forest model as the special effects consumption time prediction model, which can ensure that the predicted maximum consumption time is positively correlated with the size of the target feature values, thereby improving the interpretability and accuracy of the model.
[0055] It should be noted that each tree in the objective monotonically increasing decision forest model is a gradient boosting decision tree. Tree growth occurs through the splitting of leaf nodes, and the final result is obtained by voting and scoring among each gradient boosting decision tree in the forest, thus preserving good interpretability. Specifically, the objective monotonically increasing decision forest model (LightGradient Boosting Machine, LightGBM), as an efficient decision forest implementation, supports categorical features, efficient parallelism, and cache hit rate optimization. Therefore, the special effects consumption time prediction model in this application inherits its advantages of high speed and low memory consumption, facilitating efficient deployment, ensuring real-time inference, and meeting the requirements of game special effects consumption prediction.
[0056] Here, the target effect duration prediction model works on the same principle as the decision forest. After training with a large amount of data, the prediction process is as follows: The artists provide the latest created effect to be predicted, with a maximum dp = 25, a maximum number of particles of 60, a maximum number of faces of 20, a maximum number of textures of 32, and a total number of sub-models of 2. This is input into the target effect duration prediction model and enters the first gradient boosting decision tree. The first split node is the number of particles of 33. Since 60 > 33, it enters the right subtree. Then, the second split node is dp = 54. Since 25 < 54, it enters the left subtree of the right subtree... After the first tree is completed, it enters the second tree, and so on. Finally, all the gradient boosting decision trees aggregate the results and make a final vote to obtain the target maximum duration of the effect to be predicted.
[0057] The following describes the process of training the target effect duration prediction model, that is, the target effect duration prediction model is trained according to the following steps:
[0058] Step a: Obtain multiple sample effects and the actual maximum consumption time for each sample effect.
[0059] It's important to note that during the model training phase, the first step is to collect relevant data. This data includes the completed visual effects (sample effects) and the corresponding maximum actual execution time on a specific test device. It should be understood that the test device here refers to a mobile phone for mobile games and a computer for PC games. Different models (low, mid, and high-end) will have different execution times and standards; here, we can uniformly assume it's a "test device under a specific standard." The maximum actual execution time on the test device serves as the label for regression prediction, while the input consists of various feature values of the sample effects. Then, through effective feature selection methods, the final sample feature values are determined. Finally, the resulting multiple sample effects and their corresponding maximum execution time are used as the training set.
[0060] Step b: For any of the sample effects, determine the sample feature value corresponding to at least one sample feature parameter of the sample effect; the sample feature value is key data affecting the time consumed by the sample effect during the rendering process.
[0061] Step c: Based on the sample feature values corresponding to each sample effect, the true maximum consumption time corresponding to each sample effect, and the monotonically increasing constraint, train the initial monotonically increasing decision forest model to obtain the effect consumption time prediction model; the monotonically increasing constraint is the condition that the magnitude of the sample feature value and the model predicted consumption time satisfy a positive correlation.
[0062] Here, positive correlation means that when one variable increases, the other variable also increases. The two variables change in the same direction; when one variable changes from large to small or from small to large, the other variable also changes from large to small or from small to large.
[0063] It should be noted that the monotonicity introduced in this application is to incorporate common sense into model training. For example, when all target feature parameters have the same feature value, increasing the number of particles should not reduce the maximum duration of the special effect. Thus, the monotonically increasing constraint ensures the accuracy and interpretability of the trained model's predictions, avoiding phenomena that violate common sense. In other words, it ensures that the sample feature values corresponding to all sample feature parameters and the final prediction result have a monotonically increasing relationship. This improves the trainable target effect duration prediction model's conformity to common sense and its interpretability. It can also provide artists with some guidance on reducing special effects, such as identifying which target feature parameter's corresponding target feature value needs to be reduced.
[0064] Here, the impact on model interpretability lies in the fact that during data collection, all effects need to be run on the quality control personnel's test machines, and the corresponding maximum execution time needs to be recorded. This maximum execution time may fluctuate slightly due to the CPU performance of the test machine, GPU frequency reduction caused by heat, and other background programs competing for CPU resources. When using machine learning methods to fit these data points, the training curve may fluctuate within a small range due to excessive accuracy or overfitting. For example, due to CPU heat, an effect with dp=20 might take 10ms to execute. The next effect, due to CPU cooling, might have dp=25 but only take 8ms. If a model that extremely fits these two data points is used for subsequent predictions, it is possible that the dp increases but the execution time decreases. Such a situation would seriously affect the model's interpretability and the artists' trust in the model. Based on this, this application imposes restrictions on monotonicity, which is similar to adding a certain degree of robustness enhancement, while avoiding situations that violate artistic common sense, and allowing for a reasonable explanation of the model results. The monotonically increasing constraint requires that the splitting result of the left subtree in the initial monotonically increasing decision forest model must be smaller than that of the right subtree. Therefore, the selection of splitting nodes is different from the conventional approach.
[0065] In one possible implementation, step c involves training an initial monotonically increasing decision forest model based on the sample feature values corresponding to each sample effect, the true maximum consumption time corresponding to each sample effect, and the monotonically increasing constraint conditions to obtain the effect consumption time prediction model. This includes the following steps: determining the node parameters of the leaf nodes of each gradient boosting decision tree in the initial monotonically increasing decision forest model according to the sample feature values corresponding to each sample effect, the true maximum consumption time corresponding to each sample effect, and the monotonically increasing constraint conditions; and generating the effect consumption time prediction model based on the node parameters of the leaf nodes in each gradient boosting decision tree.
[0066] In practice, the decision forest model itself is not a deep network; all forest models are composed of many decision trees, which together form the forest. The decision tree is constructed by splitting leaf nodes. A specific value for a feature is selected as the splitting node. All data points with a value less than that node are assigned to the left subtree, and all data points with a value greater than that node are assigned to the right subtree. Therefore, the training process for decision trees and decision forests involves continuously finding suitable splitting nodes. Generally, the selection rules for splitting nodes are based on information gain and information gain ratio, aiming to ensure balanced tree growth and prevent excessive depth. However, this splitting strategy does not guarantee monotonicity. Therefore, this application chose to train an initial monotonically increasing decision forest model, resulting in an effect consumption time prediction model with a certain degree of interpretability.
[0067] In one possible implementation, after model training, to further ensure the reliability and accuracy of the model, the trained model will be tested and validated. Testing ensures that the model can be used normally, i.e., ensuring reliability, while validation ensures the accuracy of the model. Specifically, after training the initial monotonically increasing decision forest model based on the sample feature values corresponding to each sample effect, the true maximum consumption time corresponding to each sample effect, and the monotonically increasing constraint conditions in step c, to obtain the effect consumption time prediction model, the following steps are also included: selecting a first effect and a second effect from the multiple sample effects, and determining the sample feature values and true maximum consumption time corresponding to the first effect as the validation set, and determining the sample feature values and true maximum consumption time corresponding to the second effect as the test set; testing the effect consumption time prediction model based on the test set to obtain test results; after determining that the test is passed based on the test results, validating the tested effect consumption time prediction model based on the validation set to obtain validation results, so as to use the validated effect consumption time prediction model for prediction.
[0068] In practice, after extracting the sample feature values of the sample effects, the sample feature value corresponding to at least one sample feature parameter of the sample effect is used as input, and the actual consumption time of the sample effect is used as the label. In one example, the full dataset can be divided into an 80% training set, a 10% test set, and a 10% validation set based on the sample effects. The dataset is then trained using the Gradient Boosting Decision Tree (LightGBM) framework to ultimately obtain a trained target monotonically increasing decision forest model.
[0069] In one possible implementation, after step S103, which involves inputting at least one target feature value of the effect to be predicted into the trained effect duration prediction model to predict the maximum target duration of the effect to be predicted, the following step is further included:
[0070] Determine whether the maximum consumption time of the target is greater than a preset standard time threshold; if so, determine that the special effect to be predicted needs to be reduced, and determine the target reduction strategy of the special effect to be predicted.
[0071] In practice, if the predicted maximum duration of a special effect exceeds a preset standard duration threshold, it indicates that the effect does not meet the predetermined standard and needs to be reduced. A target reduction strategy for the effect is then determined. In other words, the special effect duration prediction model allows artists to understand, through the model, which aspects of the effect need to be reduced to bring the maximum duration down to the standard. Specifically, the target reduction strategy clarifies which feature parameter's value needs to be reduced to which value, further improving the efficiency of special effect reduction for artists.
[0072] Here, the target reduction strategy includes at least one target feature parameter that needs to be reduced, and the expected reduction feature value corresponding to each target feature parameter; the target reduction strategy for the effect to be predicted is determined according to the following steps: responding to the numerical adjustment operation of at least one target feature parameter in the effect consumption prediction interface, determining the adjusted expected maximum consumption time; if the expected maximum consumption time is less than the preset standard duration threshold, then determining the feature value corresponding to the adjusted target feature parameter as the expected reduction feature value.
[0073] It should be noted that this application provides artists with a special effects consumption prediction interface. Artists can adjust the value of any target feature parameter in this interface. After adjustment, the interface displays the expected reduction value for the adjusted target feature parameter. For example, for the dp number, the target feature value is adjusted from 20 to an expected reduction value of 15, ensuring the reduced effect meets a predetermined standard. This allows artists to know which target feature parameters should be reduced. Thus, this application facilitates artists' rapid determination of target reduction strategies through a visual interface (special effects consumption prediction interface).
[0074] Figure 2 A schematic diagram of a special effects consumption prediction interface provided in one optional embodiment of this application is shown; as follows: Figure 2As shown, the special effects consumption prediction interface includes a maximum consumption duration display area, a feature value input box and / or feature value input progress bar corresponding to at least one target feature parameter, and a target feature value display area corresponding to each target effect parameter of the special effects to be predicted. It should be understood that the above figures are merely an example and not a limitation on the specific content. Here, the step of responding to a numerical adjustment operation of at least one target feature parameter in the special effects consumption prediction interface to determine the adjusted expected maximum consumption duration includes the following steps: responding to a numerical input operation of the feature value input box in the special effects consumption prediction interface, displaying the expected maximum consumption duration in the maximum consumption duration display area; and / or, responding to a drag operation of the feature value input progress bar in the special effects consumption prediction interface, displaying the expected maximum consumption duration in the maximum consumption duration display area.
[0075] In related technologies, artists create special effects on professional computers, but testing these effects requires importing them into specific testing machines, increasing the difficulty and workload of testing. Furthermore, it necessitates multiple cross-departmental collaborations between artists and quality control personnel, increasing communication costs. For effects exceeding limits, artists lack a clear plan for reduction and are unsure if the reduced effect will pass testing again. Excessive reduction results in suboptimal performance, while further reductions lead to rework. There is no clear guidance for artists to determine which aspect of the various feature parameters in artistic effects, such as the number of sub-models, dp count, particle count, and face count, and reductions are required based on personal experience.
[0076] Based on this, this application allows users to freely adjust the feature values of various target feature parameters on the visualized special effects consumption prediction interface by dragging the feature value input progress bar or entering values into the feature value input box. Due to the model's excellent real-time computing capabilities, the maximum expected consumption time of the currently configured special effects on a specific test machine can be obtained in real time. This allows artists to easily use this visualized tool to try reducing dp or particle count to compress consumption when the predicted special effects exceed the limit, thereby determining the target reduction strategy and improving the efficiency of special effects reduction.
[0077] Based on the same application concept, this application also provides a special effects consumption time prediction device corresponding to the special effects consumption time prediction method provided in the above embodiments. Since the principle of the device in this application is similar to the special effects consumption time prediction method in the above embodiments of this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0078] like Figure 3 , Figure 4 As shown, Figure 3This is one of the functional block diagrams of a special effects duration prediction device 300 provided in an embodiment of this application. Figure 4 This is a second functional block diagram of a special effects duration prediction device 300 provided in an embodiment of this application. (See diagram below.) Figure 3 As shown, the special effects duration prediction device 300 includes: an acquisition module 310, used to acquire candidate feature values corresponding to at least one target feature parameter of the special effect to be predicted in multiple rendering frames; a determination module 320, used to determine the target feature value corresponding to any target feature parameter based on multiple candidate feature values corresponding to the target feature parameter; the target feature value is key data affecting the time consumed by the special effect to be predicted during the rendering process; and a prediction module 330, used to input at least one target feature value of the special effect to be predicted into a trained special effects duration prediction model to predict the target maximum duration consumed by the special effect to be predicted; the target maximum duration consumed is used to characterize the maximum duration consumed by the special effect to be predicted in each rendering frame during the rendering process.
[0079] In one possible implementation, such as Figure 3 As shown, for any of the target feature parameters, the determining module 320 is specifically used to determine the target feature value corresponding to the target feature parameter according to the following steps: selecting the largest feature value from multiple candidate feature values corresponding to the target feature parameter and determining it as the target feature value; and / or, determining the overall feature value reflecting the target feature parameter in the effect to be predicted according to multiple candidate feature values corresponding to the target feature parameter, and determining the overall feature value as the target feature value.
[0080] In one possible implementation, the target feature value includes at least one of the following values: maximum number of rendering operation calls, maximum number of particles, maximum number of faces, maximum number of textures, total number of textures, and total number of sub-models.
[0081] In one possible implementation, such as Figure 3 As shown, the effect duration prediction model is a target monotonically increasing decision forest model, which includes multiple gradient boosting decision trees. The prediction module 330 is specifically used to predict the target maximum duration of the effect to be predicted according to the following steps: inputting at least one target feature value of the effect to be predicted into each gradient boosting decision tree to determine the voting score of each gradient boosting decision tree; and predicting the target maximum duration of the effect to be predicted based on the voting score of the multiple gradient boosting decision trees.
[0082] In one possible implementation, such as Figure 4As shown, the special effects consumption time prediction device 300 further includes a training module 340; the training module 340 is used to train the target special effects consumption time prediction model according to the following steps: acquiring multiple sample special effects and the actual maximum consumption time corresponding to each sample special effect; for any sample special effect, determining the sample feature value corresponding to at least one sample feature parameter of the sample special effect; the sample feature value is key data affecting the consumption time of the sample special effect during rendering; based on the sample feature value corresponding to each sample special effect, the actual maximum consumption time corresponding to each sample special effect, and the monotonically increasing constraint condition, training an initial monotonically increasing decision forest model to obtain the special effects consumption time prediction model; the monotonically increasing constraint condition is the condition that the magnitude of the sample feature value and the model predicted consumption time satisfy a positive correlation.
[0083] In one possible implementation, such as Figure 4 As shown, the training module 340 is specifically used to train the effect consumption time prediction model according to the following steps: determining the node parameters of the leaf nodes of each gradient boosting decision tree in the initial monotonically increasing decision forest model based on the sample feature values corresponding to each sample effect, the true maximum consumption time corresponding to each sample effect, and the monotonically increasing constraint conditions; and generating the effect consumption time prediction model based on the node parameters of the leaf nodes in each gradient boosting decision tree.
[0084] In one possible implementation, such as Figure 4 As shown, the training module 340 is further configured to: select a first effect and a second effect from the plurality of sample effects, and determine the sample feature value and the true maximum consumption time corresponding to the first effect as a validation set, and determine the sample feature value and the true maximum consumption time corresponding to the second effect as a test set; test the effect consumption time prediction model based on the test set to obtain test results; after determining that the test is passed according to the test results, verify the effect consumption time prediction model that has passed the test based on the validation set to obtain verification results, so as to use the verified effect consumption time prediction model for prediction.
[0085] In one possible implementation, such as Figure 4 As shown, the special effects duration prediction device 300 further includes a reduction module 350; the reduction module 350 is used to: determine whether the target maximum duration is greater than a preset standard duration threshold; if so, determine that the special effects to be predicted need to be reduced, and determine the target reduction strategy for the special effects to be predicted.
[0086] In one possible implementation, such as Figure 4As shown, the target reduction strategy includes at least one target feature parameter that needs to be reduced, and the expected reduction feature value corresponding to each target feature parameter; the reduction module 350 is specifically used to determine the target reduction strategy of the effect to be predicted according to the following steps: responding to the numerical adjustment operation of at least one target feature parameter in the effect consumption prediction interface, and determining the adjusted expected maximum consumption time; if the expected maximum consumption time is less than the preset standard duration threshold, then determining the feature value corresponding to the adjusted target feature parameter as the expected reduction feature value.
[0087] In one possible implementation, such as Figure 4 As shown, the special effects consumption prediction interface includes a maximum consumption duration display area, a feature value input box corresponding to at least one target feature parameter, and / or a feature value input progress bar; the reduction module 350 specifically determines the adjusted expected maximum consumption duration according to the following steps: responding to a numerical input operation to the feature value input box in the special effects consumption prediction interface, the expected maximum consumption duration is displayed in the maximum consumption duration display area; and / or, responding to a drag operation to the feature value input progress bar in the special effects consumption prediction interface, the expected maximum consumption duration is displayed in the maximum consumption duration display area.
[0088] In one optional embodiment of this application, based on the candidate feature values corresponding to at least one target feature parameter of the special effect to be predicted in multiple rendering frames obtained by the acquisition module 310, the determination module 320 can determine the key data affecting the time consumed by the special effect to be predicted during the rendering process, i.e., the target feature value. Then, the prediction module 330 inputs at least one target feature value of the special effect to be predicted into a trained special effect time consumption prediction model, thereby predicting the maximum target time consumed by the special effect during the rendering process. This improves the accuracy of the special effect time consumption prediction model and reduces the workload of artists and quality inspectors, thus improving the efficiency of special effect testing and reduction.
[0089] Based on the same application concept, see [link / reference] Figure 5 The diagram shown is a structural schematic of an electronic device 500 provided in an embodiment of this application. It includes a processor 510, a memory 520, and a bus 530. The memory 520 stores machine-readable instructions executable by the processor 510. When the electronic device 500 is running, the processor 510 and the memory 520 communicate through the bus 530. When the machine-readable instructions are executed by the processor 510, they perform the steps of the method for predicting the duration of special effects consumption as described in any of the above embodiments.
[0090] Specifically, when the machine-readable instructions are executed by the processor 510, they can perform the following processing: obtaining candidate feature values corresponding to at least one target feature parameter of the effect to be predicted in multiple rendering frames; for any target feature parameter, determining the target feature value corresponding to the target feature parameter based on the multiple candidate feature values corresponding to the target feature parameter; the target feature value is key data affecting the time consumed by the effect to be predicted during the rendering process; inputting at least one target feature value of the effect to be predicted into a trained effect consumption time prediction model to predict the target maximum consumption time of the effect to be predicted; the target maximum consumption time is used to characterize the maximum duration of the consumption time of the effect to be predicted in each rendering frame during the rendering process.
[0091] Specifically, when the machine-readable instructions are executed by the processor 510, they can perform the following processes: selecting the largest feature value from multiple candidate feature values corresponding to the target feature parameter and determining it as the target feature value; and / or, determining the overall feature value reflecting the target feature parameter in the effect to be predicted based on the multiple candidate feature values corresponding to the target feature parameter, and determining the overall feature value as the target feature value.
[0092] Specifically, when the machine-readable instructions are executed by the processor 510, they can perform the following processing: inputting at least one target feature value of the effect to be predicted into each gradient boosting decision tree, determining the voting score of each gradient boosting decision tree; and predicting the maximum target consumption time of the effect to be predicted based on the voting score of the multiple gradient boosting decision trees.
[0093] Specifically, when the machine-readable instructions are executed by the processor 510, they can perform the following processing: acquiring multiple sample effects and the actual maximum consumption time corresponding to each sample effect; for any sample effect, determining the sample feature value corresponding to at least one sample feature parameter of the sample effect; the sample feature value is key data affecting the time consumed by the sample effect during rendering; based on the sample feature values corresponding to each sample effect, the actual maximum consumption time corresponding to each sample effect, and the monotonically increasing constraint, training an initial monotonically increasing decision forest model to obtain the effect consumption time prediction model; the monotonically increasing constraint is the condition that the magnitude of the sample feature value and the model's predicted consumption time satisfy a positive correlation.
[0094] Specifically, when the machine-readable instructions are executed by the processor 510, the following processing can be performed: based on the sample feature values corresponding to each sample effect, the true maximum consumption time corresponding to each sample effect, and the monotonically increasing constraint conditions, the node parameters of the leaf nodes of each gradient boosting decision tree in the initial monotonically increasing decision forest model are determined; based on the node parameters of the leaf nodes in each gradient boosting decision tree, the effect consumption time prediction model is generated.
[0095] Specifically, when the machine-readable instructions are executed by the processor 510, the following processing can be performed: selecting a first effect and a second effect from the plurality of sample effects, and determining the sample feature value and the true maximum consumption time corresponding to the first effect as a validation set, and determining the sample feature value and the true maximum consumption time corresponding to the second effect as a test set; testing the effect consumption time prediction model based on the test set to obtain test results; after determining that the test is passed based on the test results, verifying the tested effect consumption time prediction model based on the validation set to obtain verification results, so as to use the verified effect consumption time prediction model for prediction.
[0096] Specifically, when the machine-readable instructions are executed by the processor 510, the following processing can be performed: determining whether the maximum consumption time of the target is greater than a preset standard duration threshold; if so, determining that the effect to be predicted needs to be reduced, and determining the target reduction strategy of the effect to be predicted.
[0097] Specifically, when the machine-readable instruction is executed by the processor 510, it can perform the following processing: responding to a numerical adjustment operation for at least one target feature parameter in the special effects consumption prediction interface, determining the adjusted expected maximum consumption time; if the expected maximum consumption time is less than the preset standard duration threshold, then determining the feature value corresponding to the adjusted target feature parameter as the expected reduction feature value.
[0098] Specifically, when the machine-readable instructions are executed by the processor 510, they can perform the following processing: in response to a numerical input operation to the feature value input box in the special effects consumption prediction interface, the expected maximum consumption time is displayed in the maximum consumption time display area; and / or, in response to a drag operation to the feature value input progress bar in the special effects consumption prediction interface, the expected maximum consumption time is displayed in the maximum consumption time display area.
[0099] In one optional embodiment of this application, based on candidate feature values corresponding to at least one target feature parameter of the special effect to be predicted in multiple rendering frames, key data affecting the rendering time of the special effect to be predicted, i.e., target feature values, are determined. At least one target feature value of the special effect to be predicted is then input into a trained special effect rendering time prediction model, which can predict the maximum target rendering time of the special effect to be predicted. This improves the accuracy of the special effect rendering time prediction model and reduces the workload of artists and quality control personnel, thereby improving the efficiency of special effect testing and reduction.
[0100] Based on the same concept, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the method for predicting the duration of special effects provided in the above embodiments.
[0101] Specifically, the storage medium can be a general-purpose storage medium, such as a portable disk or hard disk. When the computer program on the storage medium is run, it can execute the aforementioned method for predicting the duration of special effects. By inputting at least one target feature value of the special effect to be predicted into the trained special effects duration prediction model, the maximum duration of the target special effect during rendering can be predicted. This improves the accuracy of the special effects duration prediction model and reduces the workload of artists and quality inspectors, thereby improving the efficiency of special effects testing and reduction.
[0102] In this embodiment, the computer program, when run by the processor, can also execute other machine-readable instructions to perform other methods as described in the embodiments. For details on the specific execution steps and principles, please refer to the description of the embodiments, which will not be repeated here.
[0103] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0104] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0105] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0106] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0107] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0108] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A method for predicting the duration of special effects, characterized in that, The method includes: Obtain candidate feature values corresponding to multiple target feature parameters of the effect to be predicted in multiple rendering frames; the target feature parameters are key feature parameters that affect the time consumed by the effect during the rendering process, selected from the effect feature parameters. For any of the target feature parameters, a target feature value corresponding to the target feature parameter is determined based on multiple candidate feature values corresponding to the target feature parameter; the target feature value is key data affecting the time consumed by the effect to be predicted during the rendering process, and the target feature value is the feature value that consumes the most time. Input at least one target feature value of the special effect to be predicted into the trained special effect consumption time prediction model to predict the target maximum consumption time of the special effect to be predicted; the target maximum consumption time is used to characterize the maximum consumption time of the special effect to be predicted in each rendering frame during the rendering process. Specifically, for any of the target feature parameters, the target feature value corresponding to the target feature parameter is determined according to the following steps: for a target feature parameter whose size in a frame determines the consumption time of the corresponding frame, the largest feature value is selected from multiple candidate feature values corresponding to the target feature parameter and determined as the target feature value; for a target feature parameter that is not suitable for using the size of the candidate feature value in a frame to affect the consumption time of the effect to be predicted, the overall feature value reflecting the target feature parameter in the effect to be predicted is determined according to multiple candidate feature values corresponding to the target feature parameter, and the overall feature value is determined as the target feature value.
2. The method according to claim 1, characterized in that, The target feature value includes at least one of the following values: Maximum number of rendering operations, maximum number of particles, maximum number of faces, maximum number of textures, total number of textures, and total number of sub-models.
3. The method according to claim 1, characterized in that, The special effects duration prediction model is a target monotonically increasing decision forest model, which includes multiple gradient boosting decision trees; the step of inputting at least one target feature value of the special effects to be predicted into the trained special effects duration prediction model to predict the target maximum duration of the special effects to be predicted includes: Input at least one target feature value of the effect to be predicted into each gradient boosting decision tree to determine the voting score of each gradient boosting decision tree; Based on the voting scores of the multiple gradient boosting decision trees, the maximum duration of the target effect to be predicted is predicted.
4. The method according to claim 3, characterized in that, The special effects duration prediction model is trained according to the following steps: Obtain multiple sample effects and the actual maximum consumption time for each sample effect; For any of the aforementioned sample effects, determine the sample feature value corresponding to at least one sample feature parameter of the sample effect; The sample feature values are key data that affect the time consumed during the rendering process of the sample effects; Based on the sample feature values corresponding to each sample effect, the true maximum consumption time corresponding to each sample effect, and the monotonically increasing constraint, the initial monotonically increasing decision forest model is trained to obtain the effect consumption time prediction model; the monotonically increasing constraint is the condition that the magnitude of the sample feature value and the model predicted consumption time satisfy a positive correlation.
5. The method according to claim 4, characterized in that, The method involves training an initial monotonically increasing decision forest model based on the sample feature values corresponding to each sample effect, the true maximum consumption time corresponding to each sample effect, and monotonically increasing constraints, to obtain the effect consumption time prediction model, including: Based on the sample feature values corresponding to each sample effect, the actual maximum consumption time corresponding to each sample effect, and the monotonically increasing constraint, the node parameters of the leaf nodes of each gradient boosting decision tree in the initial monotonically increasing decision forest model are determined. Based on the node parameters of the leaf nodes in each gradient boosting decision tree, the special effect consumption time prediction model is generated.
6. The method according to claim 4, characterized in that, After training the initial monotonically increasing decision forest model based on the sample feature values corresponding to each sample effect, the true maximum consumption time corresponding to each sample effect, and the monotonically increasing constraint, to obtain the effect consumption time prediction model, the method further includes: Select a first effect and a second effect from the plurality of sample effects, and determine the sample feature value and the actual maximum consumption time corresponding to the first effect as the validation set, and determine the sample feature value and the actual maximum consumption time corresponding to the second effect as the test set; The special effects duration prediction model was tested based on the test set, and the test results were obtained. After the test is passed based on the test results, the special effects duration prediction model that passed the test is validated based on the validation set to obtain the validation results, so that the validated special effects duration prediction model can be used for prediction.
7. The method according to claim 1, characterized in that, After inputting at least one target feature value of the effect to be predicted into the trained effect duration prediction model, and predicting the maximum target duration of the effect to be predicted, the method further includes: Determine whether the maximum consumption time of the target is greater than a preset standard time threshold; If so, then it is determined that the predicted effect needs to be reduced, and the target reduction strategy for the predicted effect is determined.
8. The method according to claim 7, characterized in that, The target reduction strategy includes at least one target feature parameter that needs to be reduced, and the expected reduction feature value corresponding to each target feature parameter. The target reduction strategy for the predicted special effect is determined according to the following steps: In response to a numerical adjustment operation on at least one target feature parameter in the special effects consumption prediction interface, determine the adjusted expected maximum consumption time; If the expected maximum consumption time is less than the preset standard time threshold, then the feature value corresponding to the adjusted target feature parameter is determined to be the expected reduction feature value.
9. The method according to claim 8, characterized in that, The special effects consumption prediction interface includes a maximum consumption duration display area, a feature value input box corresponding to at least one target feature parameter, and / or a feature value input progress bar; the response is an adjustment operation on the value of at least one target feature parameter in the special effects consumption prediction interface to determine the adjusted expected maximum consumption duration: In response to a numerical input operation in the feature value input box of the special effects consumption prediction interface, the expected maximum consumption time is displayed in the maximum consumption time display area; and / or, In response to the dragging operation of the feature value input progress bar in the special effects consumption prediction interface, the expected maximum consumption time is displayed in the maximum consumption time display area.
10. A device for predicting the duration of special effects, characterized in that, The device includes: The acquisition module is used to acquire candidate feature values corresponding to multiple target feature parameters of the effect to be predicted in multiple rendering frames; the target feature parameters are key feature parameters that affect the time consumed by the effect during the rendering process, selected from the effect feature parameters. The determination module is used to determine the target feature value corresponding to any target feature parameter based on multiple candidate feature values corresponding to the target feature parameter; the target feature value is key data affecting the time consumed by the effect to be predicted during the rendering process, and the target feature value is the feature value that consumes the most time; The prediction module is used to input at least one target feature value of the special effect to be predicted into the trained special effect consumption time prediction model, and predict the target maximum consumption time of the special effect to be predicted; the target maximum consumption time is used to characterize the maximum duration of the special effect to be predicted in each rendering frame during the rendering process. Specifically, for any of the target feature parameters, the determining module is configured to determine the target feature value corresponding to the target feature parameter according to the following steps: for a target feature parameter whose size in a frame determines the consumption time of the corresponding frame, the largest feature value is selected from multiple candidate feature values corresponding to the target feature parameter and determined as the target feature value; for a target feature parameter that is not suitable for using the size of the candidate feature value in a frame to affect the consumption time of the effect to be predicted, the overall feature value reflecting the target feature parameter in the effect to be predicted is determined according to multiple candidate feature values corresponding to the target feature parameter, and the overall feature value is determined as the target feature value.
11. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the method for predicting the duration of special effects as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method for predicting the duration of special effects as described in any one of claims 1 to 9.