Frame rate control switching method and device for game display picture and electronic equipment
By predicting the complexity of the game scene and equipment performance parameters, the frame rate is dynamically adjusted, the shortcomings of the static frame rate control strategy are solved, the smoothness and stability of the game screen are achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202510493980.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-19
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-04-19
AI Technical Summary
The static frame rate control strategy in existing games is difficult to adapt to changes in scene complexity, resulting in lag or delay in game screens and affecting player experience.
By obtaining the scene complexity parameters of the game application, predicting the future scene complexity trend, calculating the target adjustment factor based on the equipment performance parameters, dynamically adjusting the frame rate, and switching to the target frame rate through a smooth transition.
It realizes flexible adjustment of game frame rate, avoids screen lag caused by overheating of equipment or too low caused by excessive frame rate, and improves game fluency and user experience.
Smart Images

Figure CN120393400A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and particularly to a method, device, and electronic device for controlling and switching the frame rate of a game display screen. Background Art
[0002] With the rapid development of the game industry and the continuous improvement of players' requirements for game experience, high-quality visual effects and smooth game performance have become the key factors for evaluating the quality of a game. The scenes in modern games are becoming increasingly complex, from vast open worlds to high-density combat scenes, which pose extremely high requirements for the game's graphics processing capabilities. To meet these needs, game developers and hardware manufacturers are constantly introducing new technologies and more powerful devices.
[0003] Currently, most games adopt a static frame rate control strategy, that is, a fixed frame rate target is set before the game runs, such as 30 frames per second or 60 frames per second. Although this method is simple, it lacks flexibility and adaptability. During the actual game process, when the scene complexity suddenly increases, the fixed frame rate is often difficult to maintain, resulting in stuttering or delay in the game screen and affecting the player experience.
[0004] Therefore, there is an urgent need for a method, device, and electronic device for controlling and switching the frame rate of a game display screen. Summary of the Invention
[0005] This application provides a method, device, and electronic device for controlling and switching the frame rate of a game display screen, which improves the player experience.
[0006] In the first aspect of this application, a method for controlling and switching the frame rate of a game display screen is provided. The method includes: obtaining the scene complexity parameter of the game application, where the scene complexity parameter includes the number, type, and size of rendering objects in the game scene; predicting the change trend of the scene complexity of the game application within a preset time period according to the scene complexity parameter to obtain a scene complexity prediction value; obtaining the current performance parameter of the game device, and calculating a target adjustment factor based on the scene complexity prediction value and the current performance parameter, where the target adjustment factor is used to adjust the game frame rate; determining a target frame rate from a preset frame rate group according to the target adjustment factor, where the preset frame rate group includes multiple frame rates; and smoothly transitioning the current frame rate of the game application to the target frame rate.
[0007] By adopting the above technical solution, by obtaining the scene complexity parameter of the game application, predicting the change trend of the scene complexity of the game application within a preset time period, and obtaining the scene complexity prediction value, the complexity of the game scene can be understood in advance, providing a basis for subsequent frame rate control. At the same time, by combining the current performance parameters of the game device, the target adjustment factor can be calculated, comprehensively considering the game scene complexity and device performance, dynamically adjusting the game frame rate, and avoiding problems such as device overheating caused by too high frame rate or screen stuttering caused by too low frame rate. Determining the target frame rate from the preset frame rate group according to the target adjustment factor can reduce frame rate fluctuations while ensuring smooth operation of the game, improving the user experience. Finally, by adjusting the current frame rate to the target frame rate in a smooth transition manner, it is possible to avoid screen flickering or stuttering caused by frame rate mutation, making the frame rate switching more natural and smooth, and enhancing the player's experience.
[0008] Optionally, predicting the change trend of the scene complexity of the game application within a preset time period according to the scene complexity parameter specifically includes: obtaining the historical scene complexity data of the game application within a historical time period, where the historical scene complexity data includes the scene complexity parameters corresponding to each preset time granularity within the historical time period; based on the historical scene complexity data, establishing a scene complexity prediction model, where the scene complexity prediction model includes multiple prediction sub-models, and each prediction sub-model corresponds to a type of scene complexity parameter; using the scene complexity prediction model, combining the current scene complexity parameter of the game application, predicting the scene complexity parameter within the preset time period, and generating the scene complexity prediction value.
[0009] By adopting the above technical solution, by obtaining the historical scene complexity data of the game application within a historical time period, the change law of the game scene complexity can be mastered, providing a data basis for subsequent scene complexity prediction. Establishing a scene complexity prediction model based on historical scene complexity data and adopting multiple prediction sub-models corresponding to different scene complexity parameters respectively can improve the accuracy and comprehensiveness of prediction. When predicting, combining the current scene complexity parameter of the game application and using the prediction model to predict the change trend of the scene complexity in the future for a period of time can dynamically adjust the frame rate control strategy, respond to possible complex scenes in advance, and ensure smooth operation of the game.
[0010] Optionally, establishing a scenario complexity prediction model based on the historical scenario complexity data specifically includes: extracting features from the historical scenario complexity data to obtain a scenario complexity feature vector; selecting a preset number of scenario complexity feature vectors as training samples; using the training samples to train and generate a regression prediction model through a supervised learning algorithm, where the regression prediction model is used to represent the correspondence between the scenario complexity parameter and time; using a cross-validation method to evaluate the regression prediction model to obtain the model accuracy; determining whether the model accuracy reaches a preset threshold; if the model accuracy is greater than or equal to the preset threshold, then using the regression prediction model as the scenario complexity prediction model; if the model accuracy is less than the preset threshold, then adjusting the training parameters and returning to execute the step of using the training samples to train and generate a regression prediction model through a supervised learning algorithm.
[0011] By adopting the above technical solution, by extracting features from the historical scenario complexity data to obtain a scenario complexity feature vector, the high-dimensional scenario complexity data can be transformed into a low-dimensional feature representation, reducing the complexity of data processing. Selecting a preset number of scenario complexity feature vectors as training samples and using a supervised learning algorithm to train and generate a regression prediction model can establish the correspondence between the scenario complexity parameter and time, realizing the prediction of future scenario complexity. Evaluating the regression prediction model through a cross-validation method to obtain the model accuracy can verify the generalization ability and prediction performance of the model. According to the comparison result between the model accuracy and the preset threshold, determining whether to use the regression prediction model as the scenario complexity prediction model can ensure the reliability and effectiveness of the prediction model. If the model accuracy does not meet the standard, then adjust the training parameters, retrain the model, and continuously optimize the prediction performance.
[0012] Optionally, obtaining the current performance parameters of the gaming device and calculating a target adjustment factor based on the scenario complexity prediction value and the current performance parameters specifically includes: real-time monitoring the CPU occupancy rate, GPU occupancy rate, and memory occupancy rate of the gaming device as the current performance parameters; scoring the current performance parameters according to a preset performance evaluation rule to obtain a device performance score; calculating the ratio of the device performance score to the scenario complexity prediction value and using the ratio as an initial adjustment factor; determining whether the initial adjustment factor is within a preset adjustment factor range; if the initial adjustment factor is within the preset adjustment factor range, then using the initial adjustment factor as the target adjustment factor; if the initial adjustment factor is not within the preset adjustment factor range, then using a preset adjustment factor correction formula to correct the initial adjustment factor to obtain the target adjustment factor.
[0013] By adopting the above technical solution, by real-time monitoring the CPU occupancy rate, GPU occupancy rate, and memory occupancy rate of the game device, the performance status of the device can be comprehensively understood, providing a basis for frame rate control. Scoring the current performance parameters according to the preset performance evaluation rules to obtain the device performance score can quantitatively evaluate the comprehensive performance level of the device. Calculating the ratio of the device performance score to the predicted value of the scene complexity as the initial adjustment factor can balance the influence of the device performance and scene complexity on the frame rate and dynamically adjust the frame rate control strategy. Judging whether the initial adjustment factor is within the preset adjustment factor range can ensure that the adjustment factor is within a reasonable range and avoid too large or too small adjustment amplitudes. If the initial adjustment factor is not within the preset range, then use the preset adjustment factor correction formula for correction to obtain the target adjustment factor, ensuring the rationality and effectiveness of the adjustment factor.
[0014] Optionally, determining the target frame rate from the preset frame rate group according to the target adjustment factor specifically includes: calculating the matching degree between the adjustment factor and each frame rate value in the preset frame rate group, and the matching degree is obtained through a preset matching degree calculation formula; selecting the frame rate value with the highest matching degree with the target adjustment factor as the candidate target frame rate; judging whether the difference between the candidate target frame rate and the current frame rate is within a preset range; if the difference between the candidate target frame rate and the current frame rate is within the preset range, then determine the candidate target frame rate as the target frame rate; if the difference between the candidate target frame rate and the current frame rate is not within the preset range, then select the frame rate value adjacent to the candidate target frame rate in the preset frame rate group and with a difference from the current frame rate within the preset range as the target frame rate.
[0015] By adopting the above technical solution, by calculating the matching degree between the adjustment factor and each frame rate value in the preset frame rate group, the similarity degree between the adjustment factor and different frame rates can be quantitatively evaluated, providing a reference for the selection of the target frame rate. Using the preset matching degree calculation formula to calculate the matching degree can comprehensively consider the size relationship between the adjustment factor and the frame rate to obtain a reasonable matching degree value. Selecting the frame rate value with the highest matching degree with the target adjustment factor as the candidate target frame rate can ensure the optimal matching degree between the target frame rate and the adjustment factor and achieve precise frame rate control. Judging whether the difference between the candidate target frame rate and the current frame rate is within the preset range can avoid problems such as screen freezing or flickering caused by sudden frame rate changes. If the difference is within the preset range, then determine the candidate target frame rate as the final target frame rate; if the difference exceeds the preset range, then select the frame rate value adjacent to the candidate target frame rate in the preset frame rate group and with a difference from the current frame rate within the preset range as the target frame rate, ensuring the smoothness and stability of the frame rate switching.
[0016] Optionally, the smooth transition of the current frame rate of the game application to the target frame rate specifically includes: calculating the frame rate difference between the current frame rate and the target frame rate; dividing the frame rate difference into multiple sub-intervals according to a preset transition rule; determining multiple sub-target frame rates based on each of the sub-intervals, where the sub-target frame rates are between the current frame rate and the target frame rate; controlling the frame rate of the game application to sequentially pass through each of the sub-target frame rates and finally reach the target frame rate.
[0017] By adopting the above technical solution, by calculating the frame rate difference between the current frame rate and the target frame rate, the amplitude of the frame rate switch can be quantitatively evaluated, providing a basis for smooth transition. Dividing the frame rate difference into multiple sub-intervals according to a preset transition rule can decompose the frame rate switch process into multiple small change processes, realizing the gradual change effect of the frame rate. Determining multiple sub-target frame rates based on each sub-interval, where the sub-target frame rates are between the current frame rate and the target frame rate, can ensure the continuity and smoothness of the frame rate switch. By controlling the frame rate of the game application to sequentially pass through each sub-target frame rate and finally reach the target frame rate, it is possible to avoid screen freezing or flickering caused by frame rate mutation and improve the user's visual experience.
[0018] Optionally, the dividing the frame rate difference into multiple sub-intervals according to a preset transition rule specifically includes: obtaining a preset transition time; determining the frame rate change rate for smooth transition according to the preset transition time and the frame rate difference; using the frame rate change rate to evenly divide the frame rate difference into multiple sub-intervals.
[0019] By adopting the above technical solution, by obtaining a preset transition time, the time range for smooth frame rate transition can be determined, avoiding unnatural frame rate switching caused by too long or too short transition time. Determining the frame rate change rate for smooth transition according to the preset transition time and the frame rate difference can control the speed of the frame rate switch and achieve a smooth and natural transition effect. Using the frame rate change rate to evenly divide the frame rate difference into multiple sub-intervals can ensure that the frame rate change amplitude of each sub-interval is the same, realizing the uniform gradual change of the frame rate. By reasonably setting the preset transition time and the frame rate change rate, the speed and effect of the frame rate switch can be adjusted according to actual needs, improving the user's visual experience.
[0020] In a second aspect of the present application, a frame rate control switching device for a game display screen is provided. The device includes an acquisition module and a processing module, where: the acquisition module is configured to acquire a scene complexity parameter of a game application, and the scene complexity parameter includes the number, type, and size of rendering objects in the game scene; the processing module is configured to predict a change trend of the scene complexity of the game application within a preset time period based on the scene complexity parameter to obtain a scene complexity prediction value; the acquisition module is further configured to acquire a current performance parameter of the game device, and calculate a target adjustment factor based on the scene complexity prediction value and the current performance parameter, where the target adjustment factor is used to adjust the game frame rate; the processing module is further configured to determine a target frame rate from a preset frame rate group according to the target adjustment factor, and the preset frame rate group includes multiple frame rates; the processing module is further configured to smoothly transition the current frame rate of the game application to the target frame rate.
[0021] In a third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, and both the user interface and the network interface are used to communicate with other devices. The processor is configured to execute the instructions stored in the memory so that the electronic device executes the method described in any one of the above.
[0022] In a fourth aspect of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions, and when the instructions are executed, the method described in any one of the above is executed.
[0023] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By acquiring the scene complexity parameter of the game application, predicting the change trend of the scene complexity of the game application within a preset time period to obtain a scene complexity prediction value, the complexity of the game scene can be understood in advance, providing a basis for subsequent frame rate control. At the same time, by combining the current performance parameter of the game device and calculating the target adjustment factor, the game scene complexity and device performance can be comprehensively considered, and the game frame rate can be dynamically adjusted to avoid problems such as device overheating caused by too high a frame rate or screen stuttering caused by too low a frame rate. Determining the target frame rate from the preset frame rate group according to the target adjustment factor can reduce frame rate fluctuations while ensuring smooth game operation, improving the user experience. Finally, by smoothly transitioning the current frame rate to the target frame rate, screen flickering or stuttering caused by frame rate mutations can be avoided, making the frame rate switching more natural and smooth.
[0024] 2. By obtaining the historical scene complexity data of the game application within a historical time period, the variation law of the game scene complexity can be grasped, providing a data basis for subsequent scene complexity prediction. Based on the historical scene complexity data, a scene complexity prediction model is established. By using multiple prediction sub-models corresponding to different scene complexity parameters respectively, the prediction accuracy and comprehensiveness can be improved. During prediction, combining the current scene complexity parameters of the game application and using the prediction model to predict the variation trend of the scene complexity within a future period of time, the frame rate control strategy can be dynamically adjusted to cope with possible complex scenes in advance and ensure the smooth running of the game.
[0025] 3. By extracting features from the historical scene complexity data to obtain a scene complexity feature vector, the high-dimensional scene complexity data can be transformed into a low-dimensional feature representation, reducing the complexity of data processing. Selecting a preset number of scene complexity feature vectors as training samples and using a supervised learning algorithm to train and generate a regression prediction model can establish the corresponding relationship between the scene complexity parameters and time, realizing the prediction of future scene complexity. By evaluating the regression prediction model through a cross-validation method to obtain the model accuracy, the generalization ability and prediction performance of the model can be verified. According to the comparison result between the model accuracy and the preset threshold, it is judged whether to use the regression prediction model as the scene complexity prediction model, which can ensure the reliability and effectiveness of the prediction model. If the model accuracy does not meet the standard, the training parameters are adjusted and the model is retrained to continuously optimize the prediction performance. Description of the Drawings
[0026] Figure 1 is a schematic flowchart of a method for controlling and switching the frame rate of a game display screen disclosed in an embodiment of the present application; Figure 2 is a schematic block diagram of a device for controlling and switching the frame rate of a game display screen disclosed in an embodiment of the present application; Figure 3 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.
[0027] Description of the Reference Numerals: 201, acquisition module; 202, processing module; 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. Detailed Embodiments
[0028] In order to enable those skilled in the art to better understand the technical solutions in this specification, the following will clearly and completely describe the technical solutions in the embodiments of this specification with reference to the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments.
[0029] In the description of the embodiments of the present application, words such as "for example" or "for illustration" are used to give examples, illustrations or explanations. Any embodiment or design solution described as "for example" or "for illustration" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "for example" or "for illustration" is intended to present relevant concepts in a specific manner.
[0030] In the description of the embodiments of the present application, the term "a plurality of" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. In addition, the terms "first" and "second" are used only for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The terms "include", "comprise", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0031] The present application provides a method for controlling and switching the frame rate of a game display screen, with reference to Figure 1 , Figure 1 is a schematic flowchart of a method for controlling and switching the frame rate of a game display screen provided by an embodiment of the present application. This method is applied to a server. The server is a server that executes a program for controlling and switching the frame rate of a game display screen. The server can be a single server, a server cluster composed of multiple servers, or a cloud computing service center. This method includes steps S101 to S105, and the above steps are as follows: Step S101: Obtain the scene complexity parameter of the game application. The scene complexity parameter includes the number, types, and sizes of rendering objects in the game scene.
[0032] Specifically, the server first obtains the scene complexity parameter of the game application. The scene complexity parameter is an important indicator for evaluating the complexity of the game scene, and it directly affects the rendering performance and frame rate performance of the game screen. In the present application, the scene complexity parameter includes three aspects: the number, types, and sizes of rendering objects in the game scene.
[0033] To obtain these parameters, the server communicates with the game client. When the game client loads and runs the game application, it real-time statistics the information of rendering objects in the current game scene. This information includes how many rendering objects are in the scene, which categories these rendering objects belong to respectively (such as characters, buildings, special effects, UI, etc.), and data representing their complexity such as the number of vertices, number of faces, texture size of each rendering object. The game client regularly sends the statistically obtained rendering object information to the server. After receiving this data, the server can parse and extract it to obtain the scene complexity parameters.
[0034] Step S102: According to the scene complexity parameters, predict the change trend of the scene complexity of the game application within a preset time period to obtain the scene complexity prediction value.
[0035] In step S102, according to the scene complexity parameters, predicting the change trend of the scene complexity of the game application within a preset time period specifically includes: obtaining the historical scene complexity data of the game application within the historical time period, where the historical scene complexity data includes the scene complexity parameters corresponding to each preset time granularity within the historical time period; based on the historical scene complexity data, establishing a scene complexity prediction model, where the scene complexity prediction model includes multiple prediction sub-models, and each prediction sub-model corresponds to a type of scene complexity parameter; using the scene complexity prediction model, combined with the current scene complexity parameters of the game application, predicting the scene complexity parameters within the preset time period to generate the scene complexity prediction value.
[0036] Specifically, the server obtains the historical scene complexity data of the game application within the historical time period. These data can be continuously collected and stored by the server in the past period of time, or can be regularly uploaded from the game client. The historical scene complexity data includes the scene complexity parameters corresponding to each preset time granularity (such as every minute, every 5 minutes, or every 10 minutes) within the historical time period, and these parameters are similar to the parameters obtained in step S101, including the number, type, and size of rendering objects.
[0037] For example, the server can obtain the scene complexity parameters every 5 minutes within the recent 1 hour, a total of 12 groups of data. Each group of data contains the number, type, and size information of the rendering objects in the game scene at that time point.
[0038] Next, the server establishes a scene complexity prediction model based on historical scene complexity data. The scene complexity prediction model can adopt machine learning algorithms. By training and learning historical data, it summarizes the laws and trends of changes in scene complexity. Since the scene complexity parameters include multiple dimensions (quantity, variety, size), the scene complexity prediction model can include multiple prediction sub-models, and each sub-model corresponds to a complexity parameter. For example, three prediction sub-models can be established for the number, variety, and size of rendering objects respectively. Each sub-model can select different machine learning algorithms, such as linear regression, decision tree, neural network, etc. Through optimization and training, each sub-model can accurately predict the change trend of the corresponding complexity parameter in a future period of time based on historical data.
[0039] Finally, the server can use the established scene complexity prediction model, combined with the current scene complexity parameters of the game application, to predict the scene complexity parameters within a preset time period in the future and generate a scene complexity prediction value. The preset time period can be the next 5 minutes, 10 minutes, or a longer time, specifically depending on the frame rate control strategy, which is not limited in this application.
[0040] In a possible implementation manner, establishing a scene complexity prediction model based on historical scene complexity data specifically includes: extracting features from the historical scene complexity data to obtain a scene complexity feature vector; selecting a preset number of scene complexity feature vectors as training samples; using the training samples to train and generate a regression prediction model through a supervised learning algorithm, where the regression prediction model is used to represent the corresponding relationship between the scene complexity parameters and time; using the cross-validation method to evaluate the regression prediction model to obtain the model accuracy; determining whether the model accuracy reaches a preset threshold; if the model accuracy is greater than or equal to the preset threshold, then using the regression prediction model as the scene complexity prediction model; if the model accuracy is less than the preset threshold, then adjusting the training parameters and returning to execute the step of using the training samples to train and generate a regression prediction model through a supervised learning algorithm.
[0041] Specifically, the server extracts features from the scene complexity data to obtain a scene complexity feature vector. Feature extraction is a process of converting the original complexity parameter data into a more concise and information-rich feature representation. For example, statistical analysis can be performed on parameters such as the number, variety, and size of rendering objects, calculating their statistical quantities such as mean, variance, peak value, or extracting their temporal features such as change rate and trend. The extracted scene complexity feature vector can better reflect the change pattern of scene complexity.
[0042] Next, the server selects a preset number of historical scene complexity feature vectors from the extracted scene complexity feature vectors as training samples. The training samples are the data sets used to train the prediction model, which contain feature vectors and corresponding true complexity parameter values. Generally, 70% - 80% of the total number of feature vectors can be selected as training samples.
[0043] Then, the server uses the selected training samples to train and generate a regression prediction model through a supervised learning algorithm. Supervised learning is a commonly used machine learning method that uses labeled training samples to train a model to fit the mapping relationship between sample features and labels. The regression prediction model is a supervised learning model used to predict continuous-valued target variables. In this application, the regression prediction model is used to characterize the correspondence between the scene complexity parameter and time, that is, the predicted value of the scene complexity parameter at a given time point. Regression prediction algorithms include linear regression, polynomial regression, decision tree regression, support vector regression, etc. The server can select a suitable algorithm for training according to the data characteristics and requirements.
[0044] After training is completed, the server uses the cross-validation method to evaluate the regression prediction model to obtain the model accuracy. Cross-validation is a model evaluation method that divides the data set into several subsets. Each time, one subset is selected as the validation set, and the other subsets are used as the training set. Multiple models are trained and their performances on the validation set are evaluated. Finally, the average value is taken as an estimate of the overall model accuracy. This method can effectively reduce the risk of model overfitting and improve the generalization ability of the model.
[0045] Finally, the server determines whether the model accuracy of the regression prediction model reaches a preset threshold. The preset threshold is set according to actual needs and experience and represents the minimum requirement for model performance. If the model accuracy is greater than or equal to the preset threshold, the regression prediction model is used as the final scene complexity prediction model for subsequent complexity prediction tasks. If the model accuracy is less than the preset threshold, it means that the current model performance is not ideal, and the training parameters need to be adjusted, such as increasing the number of training samples, trying other algorithms, optimizing model hyperparameters, etc., and then return to execute the training step until a model that meets the requirements is obtained.
[0046] For example, the server extracts 100 feature vectors from the historical scene complexity data, and each feature vector contains 20 statistical features. Then, 80 of these feature vectors are selected as training samples and trained using the support vector regression algorithm to obtain a regression prediction model. Next, the 5-fold cross-validation method is adopted. The data set is divided into 5 parts. Each time, 1 part is selected as the validation set, and the remaining 4 parts are used as the training set. 5 models are trained and evaluated on the validation set. Finally, the average accuracy is taken as the overall model accuracy. If the model accuracy reaches the preset threshold (90%), then this model is used as the scene complexity prediction model; if the accuracy is only 85%, then the training parameters are adjusted, such as increasing the training samples to 90, trying to use the decision tree regression algorithm, optimizing hyperparameters such as the tree depth and the number of leaf nodes of the model, and then retraining and evaluating until the model accuracy meets the requirements.
[0047] Step S103: Obtain the current performance parameters of the game device, and calculate a target adjustment factor based on the scene complexity prediction value and the current performance parameters. The target adjustment factor is used to adjust the game frame rate.
[0048] In step S103, obtaining the current performance parameters of the game device and calculating the target adjustment factor based on the scene complexity prediction value and the current performance parameters specifically include: real-time monitoring the CPU occupancy rate, GPU occupancy rate, and memory occupancy rate of the game device as the current performance parameters; scoring the current performance parameters according to the preset performance evaluation rules to obtain the device performance score; calculating the ratio of the device performance score to the scene complexity prediction value, and taking the ratio as the initial adjustment factor; determining whether the initial adjustment factor is within the preset adjustment factor range; if the initial adjustment factor is within the preset adjustment factor range, then taking the initial adjustment factor as the target adjustment factor; if the initial adjustment factor is not within the preset adjustment factor range, then using the preset adjustment factor correction formula to correct the initial adjustment factor to obtain the target adjustment factor.
[0049] Specifically, the server real-time monitors the CPU occupancy rate, GPU occupancy rate, and memory occupancy rate of the game device as the current performance parameters. These parameters can reflect the current hardware resource usage and load level of the game device. To obtain these parameters, the server can establish a communication connection with the game client and regularly receive the performance data reported by the client. The client can use the performance monitoring interface provided by the operating system or a third-party performance monitoring tool to collect the usage rate data of hardware resources such as the CPU, GPU, and memory in real time and send them to the server at regular time intervals (such as every second or every minute).
[0050] Next, the server scores the current performance parameters according to the preset performance evaluation rules to obtain the device performance score. The preset performance evaluation rules are an algorithm or formula that comprehensively considers multiple performance parameters and quantifies them into a performance score. In the embodiments of the present application, preferably, a performance score on a percentage basis can be set, with the CPU occupancy rate, GPU occupancy rate, and memory occupancy rate accounting for 30%, 50%, and 20% of the weights respectively. Then, according to the gap between the actual value of each parameter and the preset parameter threshold, the respective scores are calculated, and finally, the total performance score is obtained by weighted average. Then, the server calculates the ratio of the device performance score to the predicted value of the scene complexity and uses this ratio as the initial adjustment factor. The predicted value of the scene complexity reflects the complexity of the game scene, and the device performance score reflects the performance level of the device. The ratio of the two can reflect the relative relationship between the device performance and the scene complexity, that is, whether the device has sufficient performance to cope with the changes in the scene complexity. The larger the ratio, the higher the device performance and the lower the scene complexity, and the frame rate can be appropriately increased; the smaller the ratio, the lower the device performance and the higher the scene complexity, and the frame rate needs to be appropriately decreased. For example, if the device performance score is 80 and the predicted value of the scene complexity is 100, the initial adjustment factor is 80 / 100 = 0.8.
[0051] Next, the server determines whether the initial adjustment factor is within the preset adjustment factor range. The preset adjustment factor range is a reasonable range obtained based on experience and testing. For example, [0.5, 1.5], indicating that the minimum value of the adjustment factor is 0.5 and the maximum value is 1.5. If the initial adjustment factor is within this range, it is directly used as the target adjustment factor for subsequent frame rate adjustment. If the initial adjustment factor is not within this range, correction is required.
[0052] If the initial adjustment factor is less than the lower limit of the range, it means that the gap between the device performance and the scene complexity is too large, and the frame rate needs to be further decreased. The server can use the preset adjustment factor correction formula to correct the initial adjustment factor. The preset adjustment factor range is a reasonable range obtained based on experience and testing. For example, [0.5, 1.5], indicating that the minimum value of the adjustment factor is 0.5 and the maximum value is 1.5. If the initial adjustment factor is within this range, it is directly used as the target adjustment factor for subsequent frame rate adjustment. If the initial adjustment factor is not within this range, correction is required. The preset adjustment factor correction formula can be flexibly designed according to the actual situation. Here, a piecewise function is taken as an example: if the initial adjustment factor < 0.5, the target adjustment factor = (initial adjustment factor) 2 ; if the initial adjustment factor > 1.5, the target adjustment factor = sqrt(initial adjustment factor); otherwise, the target adjustment factor = initial adjustment factor.
[0053] For example, if the initial adjustment factor is 0.3, then the target adjustment factor = 0.3 2 = 0.09; if the initial adjustment factor is 2.0, then the target adjustment factor = sqrt(2.0) = 1.41; if the initial adjustment factor is 1.2, then the target adjustment factor = 1.2.
[0054] Finally, the server uses the target adjustment factor to guide the adjustment of the game frame rate. The larger the target adjustment factor, the higher the frame rate can be appropriately increased; the smaller the target adjustment factor, the lower the frame rate needs to be appropriately decreased. The specific adjustment method can be: target frame rate = base frame rate * target adjustment factor; where the base frame rate can be the default frame rate of the game or the maximum frame rate supported by the device. For example, if the game base frame rate is 60 FPS and the target adjustment factor is 0.8, then the target frame rate = 60 * 0.8 = 48 FPS.
[0055] In this way, the server calculates a reasonable target adjustment factor through real-time monitoring of the game device performance, combined with the predicted value of the scene complexity, and obtains the target frame rate with it, thus realizing the dynamic adjustment of the game frame rate, while ensuring the game smoothness and also taking into account the load situation of the device performance.
[0056] Step S104: Determine the target frame rate from a preset frame rate group according to the target adjustment factor, and the preset frame rate group includes multiple frame rates.
[0057] In step S104, determining the target frame rate from the preset frame rate group according to the target adjustment factor specifically includes: calculating the matching degree between the adjustment factor and each frame rate value in the preset frame rate group, and the matching degree is obtained through a preset matching degree calculation formula; selecting the frame rate value with the highest matching degree with the target adjustment factor as the candidate target frame rate; judging whether the difference between the candidate target frame rate and the current frame rate is within a preset range; if the difference between the candidate target frame rate and the current frame rate is within the preset range, then determining the candidate target frame rate as the target frame rate; if the difference between the candidate target frame rate and the current frame rate is not within the preset range, then selecting the frame rate value adjacent to the candidate target frame rate in the preset frame rate group and with a difference from the current frame rate within the preset range as the target frame rate.
[0058] The preset matching degree calculation formula is: M(K, F) = e^(-α|K - F / Fmax|); where M(K, F) is the matching degree between the adjustment factor K and the frame rate F, Fmax is the maximum frame rate value in the preset frame rate group, α is a preset parameter, α > 0; the value range of the adjustment factor is [0, 1], and the closer the frame rate value is to Fmax * K, the higher the matching degree.
[0059] Specifically, the server determines the most suitable target frame rate from a preset frame rate group according to the calculated target adjustment factor. The preset frame rate group is a set containing multiple predefined frame rate values, such as {30, 45, 60, 90, 120}. These frame rate values are usually preset according to factors such as game type and device performance. The task of the server is to select a frame rate value from the preset frame rate group that has the highest matching degree with the target adjustment factor and whose difference from the current frame rate does not exceed the preset range as the final target frame rate.
[0060] First, the server calculates the matching degree between the target adjustment factor and each frame rate value in the preset frame rate group. The matching degree is an index to measure the matching degree between the target adjustment factor and the frame rate value, which can be obtained through a preset matching degree calculation formula. The matching degree calculation formula provided in this application is: M(K, F)=e^(-α|K - F / Fmax|); where M(K, F) represents the matching degree between the adjustment factor K and the frame rate F, Fmax is the maximum frame rate value in the preset frame rate group, α is a preset parameter, and α>0. The value range of the adjustment factor K is [0, 1], indicating the desired frame rate level. The physical meaning of this formula is that when the frame rate F is closer to Fmax*K, the matching degree is higher, that is, the target adjustment factor K is more matched with the frame rate F. The parameter α controls the attenuation speed of the matching degree. The larger α is, the faster the matching degree decays as the gap between K and F / Fmax increases.
[0061] Next, the server determines whether the difference between the candidate target frame rate and the current frame rate is within the preset range. The preset range is a frame rate change interval preset according to factors such as user experience and device performance, such as [-15, 15], indicating that the difference between the target frame rate and the current frame rate cannot exceed plus or minus 15 FPS, otherwise it will cause the frame rate change to be too abrupt and affect the game experience.
[0062] If the difference between the candidate target frame rate and the current frame rate is within the preset range, the candidate target frame rate is determined as the final target frame rate. For example, if the current frame rate is 60 FPS, the candidate target frame rate is 90 FPS, and the preset range is [-15, 15], then the difference between 90 and 60 is 30, which exceeds the preset range, and 90 cannot be directly determined as the target frame rate. In this case, the server needs to select a frame rate value from the preset frame rate group that is adjacent to the candidate target frame rate and whose difference from the current frame rate is within the preset range as the target frame rate. The specific strategy is to find the first frame rate value on both the left and right sides of the candidate target frame rate whose difference from the current frame rate is within the preset range, and then compare the matching degrees of these two frame rate values with the target adjustment factor, and select the one with the higher matching degree as the target frame rate.
[0063] In this way, the server determines the most suitable target frame rate from the preset frame rate group according to the target adjustment factor by calculating the matching degree and considering factors such as the current frame rate. In practical applications, parameters such as the matching degree calculation formula and the preset range can be set and optimized according to specific requirements to achieve intelligent, smooth, and efficient dynamic adjustment of the game frame rate.
[0064] Step S105: Smoothly transition the current frame rate of the game application to the target frame rate.
[0065] In step S105, smoothly transitioning the current frame rate of the game application to the target frame rate specifically includes: calculating the frame rate difference between the current frame rate and the target frame rate; dividing the frame rate difference into multiple sub-intervals according to the preset transition rule; determining multiple sub-target frame rates based on each sub-interval, where the sub-target frame rate is between the current frame rate and the target frame rate; controlling the frame rate of the game application to sequentially pass through each sub-target frame rate and finally reach the target frame rate.
[0066] Specifically, the server smoothly transitions the current frame rate of the game application to the target frame rate. This process is to avoid frame rate mutations that cause screen stuttering or jumping, and to provide a smoother and more natural gaming experience. The implementation method of the smooth transition is to divide the difference between the current frame rate and the target frame rate into multiple sub-intervals, and then sequentially pass through the sub-target frame rates corresponding to these sub-intervals, and finally reach the target frame rate. First, the server calculates the frame rate difference between the current frame rate and the target frame rate. For example, if the current frame rate is 30 FPS and the target frame rate is 60 FPS, then the frame rate difference is 60 - 30 = 30 FPS. Next, the server divides the frame rate difference into multiple sub-intervals according to the preset transition rules. The preset transition rules can be set according to actual needs and experience. The rules can be the equal division rule: divide the frame rate difference equally into several sub-intervals, and the frame rate change amount of each sub-interval is equal. For example, divide the 30 FPS difference equally into 3 sub-intervals, and the frame rate change amount of each sub-interval is 10 FPS. The acceleration rule: the frame rate change amount of the first few sub-intervals is smaller, and the frame rate change amount of the last few sub-intervals gradually increases. This can maintain a relatively stable frame rate change in the initial stage of the transition and accelerate to the target frame rate in the later stage. For example, divide the 30 FPS difference into 3 sub-intervals, and the frame rate change amounts are 5 FPS, 10 FPS, and 15 FPS respectively. Assume that the server adopts the equal division rule and divides the 30 FPS difference equally into 3 sub-intervals, and the frame rate change amount of each sub-interval is 10 FPS. Then, the server determines the corresponding sub-target frame rates according to the divided sub-intervals. The sub-target frame rates are between the current frame rate and the target frame rate, and are the intermediate frame rates passed through sequentially during the transition. In the above example, the sub-target frame rates corresponding to the 3 sub-intervals are 40 FPS, 50 FPS, and 60 FPS respectively. Finally, the server controls the frame rate of the game application and smoothly transitions sequentially according to the determined sequence of sub-target frame rates. The specific control method can be: by setting the frame rate limit parameter of the game engine or graphics API, limit the maximum frame rate of the game to the current sub-target frame rate.
[0067] In a possible implementation manner, according to the preset transition rules, dividing the frame rate difference into multiple sub-intervals specifically includes: obtaining the preset transition time; determining the frame rate change rate of the smooth transition according to the preset transition time and the frame rate difference; and using the frame rate change rate to evenly divide the frame rate difference into multiple sub-intervals.
[0068] Specifically, the server obtains the preset transition time. The preset transition time can be set according to factors such as the type of the game, the user's preferences, and the network status. For example, for a fast-paced action game, the transition time can be set shorter to ensure the smoothness of the screen; while for a beautiful adventure game with beautiful graphics, the transition time can be set longer to create a more soothing visual effect.
[0069] After obtaining the preset transition time, the server determines the frame rate change rate for smooth transition based on this time and the frame rate difference. The frame rate change rate represents the speed at which the frame rate needs to change within the transition time. This speed can be calculated by dividing the frame rate difference by the preset transition time.
[0070] For example, assume the current frame rate is 30fps, the target frame rate is 60fps, the frame rate difference is 30fps, and the preset transition time is 3 seconds. Then the frame rate change rate is 10fps / s, that is, the frame rate needs to increase by 10 frames per second. After determining the frame rate change rate, the server can use the frame rate change rate to evenly divide the frame rate difference into multiple sub-intervals. The purpose of dividing the sub-intervals is to achieve a gradual change in the frame rate and avoid problems such as stuttering or flickering caused by sudden frame rate changes.
[0071] Specifically, the server can calculate the number of sub-intervals to be divided based on the frame rate change rate and the preset transition time. The number of sub-intervals can be obtained by dividing the frame rate difference by the frame rate change rate. In the above example, the number of sub-intervals is 3, that is, the frame rate difference of 30fps is evenly divided into 3 sub-intervals, and each sub-interval corresponds to a frame rate change of 10fps.
[0072] After dividing the sub-intervals, the server can determine the sub-target frame rate corresponding to each sub-interval based on the boundary values of the sub-intervals. The sub-target frame rate can be calculated by adding the frame rate change amount of the sub-interval to the current frame rate. For example, in the above example, the sub-target frame rate of the first sub-interval is 40fps, the sub-target frame rate of the second sub-interval is 50fps, and the sub-target frame rate of the third sub-interval is 60fps. After determining the sub-target frame rate, the server can start controlling the frame rate of the game application. Specifically, the server will sequentially set the frame rate of the game application to each sub-target frame rate and maintain it for a period of time at each sub-target frame rate to achieve a smooth transition effect. This process can be achieved by setting a timer or listening for frame rate change events. During the frame rate transition process, the server monitors the performance metrics of the game application in real time, such as CPU occupancy, GPU occupancy, memory occupancy, etc. If it is found that the performance metrics are abnormal, the server can appropriately adjust the sub-target frame rate or the transition speed to ensure the smooth running of the game.
[0073] Refer to Figure 2, the present application also provides a frame rate control switching device for a game display screen. The device is a server, and the server includes an acquisition module 201 and a processing module 202, where: The acquisition module 201 is configured to acquire the scene complexity parameter of the game application. The scene complexity parameter includes the number, type, and size of rendering objects in the game scene; The processing module 202 is configured to predict the change trend of the scene complexity of the game application within a preset time period according to the scene complexity parameter, and obtain a scene complexity prediction value; The acquisition module 201 is further configured to acquire the current performance parameter of the game device, and calculate a target adjustment factor based on the scene complexity prediction value and the current performance parameter. The target adjustment factor is used to adjust the game frame rate; The processing module 202 is further configured to determine a target frame rate from a preset frame rate group according to the target adjustment factor. The preset frame rate group includes multiple frame rates; The processing module 202 is further configured to smoothly transition the current frame rate of the game application to the target frame rate.
[0074] In a possible implementation manner, the processing module 202 predicts the change trend of the scene complexity of the game application within a preset time period according to the scene complexity parameter, specifically including: acquiring the historical scene complexity data of the game application within a historical time period. The historical scene complexity data includes the scene complexity parameters corresponding to each preset time granularity within the historical time period; establishing a scene complexity prediction model based on the historical scene complexity data. The scene complexity prediction model includes multiple prediction sub-models, and each prediction sub-model corresponds to a type of scene complexity parameter; using the scene complexity prediction model, combining with the current scene complexity parameter of the game application, predicting the scene complexity parameter within the preset time period, and generating a scene complexity prediction value.
[0075] In a possible implementation manner, the processing module 202 establishes a scene complexity prediction model based on the historical scene complexity data, specifically including: the processing module 202 extracts features from the historical scene complexity data to obtain a scene complexity feature vector; the processing module 202 selects a preset number of scene complexity feature vectors as training samples; the processing module 202 uses the training samples to train and generate a regression prediction model through a supervised learning algorithm. The regression prediction model is used to represent the corresponding relationship between the scene complexity parameter and time; the processing module 202 evaluates the regression prediction model by using a cross-validation method to obtain the model accuracy; determining whether the model accuracy reaches a preset threshold; if the model accuracy is greater than or equal to the preset threshold, the processing module 202 uses the regression prediction model as the scene complexity prediction model; if the model accuracy is less than the preset threshold, the processing module 202 adjusts the training parameters and returns to execute the step of using the training samples to train and generate a regression prediction model through a supervised learning algorithm.
[0076] In a possible implementation, the acquisition module 201 acquires the current performance parameters of the gaming device, and calculates a target adjustment factor based on the predicted value of the scene complexity and the current performance parameters. Specifically, the acquisition module 201 monitors the CPU occupancy rate, GPU occupancy rate, and memory occupancy rate of the gaming device in real time as the current performance parameters; the acquisition module 201 scores the current performance parameters according to a preset performance evaluation rule to obtain a device performance score; the acquisition module 201 calculates the ratio of the device performance score to the predicted value of the scene complexity and uses the ratio as the initial adjustment factor; the acquisition module 201 determines whether the initial adjustment factor is within a preset adjustment factor range; if the initial adjustment factor is within the preset adjustment factor range, the acquisition module 201 uses the initial adjustment factor as the target adjustment factor; if the initial adjustment factor is not within the preset adjustment factor range, the acquisition module 201 corrects the initial adjustment factor using a preset adjustment factor correction formula to obtain the target adjustment factor.
[0077] In a possible implementation, the processing module 202 determines a target frame rate from a preset frame rate group according to the target adjustment factor. Specifically, the processing module 202 calculates the matching degree between the adjustment factor and each frame rate value in the preset frame rate group, and the matching degree is obtained through a preset matching degree calculation formula; the processing module 202 selects the frame rate value with the highest matching degree with the target adjustment factor as the candidate target frame rate; the processing module 202 determines whether the difference between the candidate target frame rate and the current frame rate is within a preset range; if the difference between the candidate target frame rate and the current frame rate is within the preset range, the processing module 202 determines the candidate target frame rate as the target frame rate; if the difference between the candidate target frame rate and the current frame rate is not within the preset range, the processing module 202 selects, from the preset frame rate group, a frame rate value adjacent to the candidate target frame rate and with a difference from the current frame rate within the preset range as the target frame rate.
[0078] In a possible implementation, the processing module 202 smoothly transitions the current frame rate of the game application to the target frame rate. Specifically, the processing module 202 calculates the frame rate difference between the current frame rate and the target frame rate; the processing module 202 divides the frame rate difference into multiple sub-intervals according to a preset transition rule; according to each sub-interval, multiple sub-target frame rates are determined, and the sub-target frame rates are between the current frame rate and the target frame rate; the processing module 202 controls the frame rate of the game application to pass through each sub-target frame rate in turn and finally reach the target frame rate.
[0079] In a possible implementation, the processing module 202 divides the frame rate difference into multiple sub-intervals according to a preset transition rule. Specifically, the acquisition module 201 acquires a preset transition time; the processing module 202 determines a frame rate change rate for smooth transition according to the preset transition time and the frame rate difference; the processing module 202 evenly divides the frame rate difference into multiple sub-intervals using the frame rate change rate.
[0080] It should be noted that when the device provided in the above embodiments realizes its functions, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.
[0081] This application also provides an electronic device. Referring to Figure 3 , Figure 3 FIG. is a schematic structural diagram of an electronic device provided by an embodiment of this application. The electronic device 300 may include: at least one processor 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.
[0082] Among them, the communication bus 302 is used to realize the connection and communication between these components.
[0083] Among them, the user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may further include a standard wired interface and a wireless interface.
[0084] Among them, the network interface 304 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface).
[0085] Among them, the processor 301 may include one or more processing cores. The processor 301 connects various parts within the entire server through various interfaces and lines, and executes various functions of the server and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by invoking the data stored in the memory 305. Optionally, the processor 301 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 301 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 301 and may be implemented separately by a single chip.
[0086] Among them, the memory 305 may include random access memory (RAM) and may also include read-only memory. Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store the data involved in the above-mentioned various method embodiments. Optionally, the memory 305 may also be at least one storage device located far from the aforementioned processor 301. Refer to Figure 3 , the memory 305, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a method of controlling and switching the frame rate of a game display screen.
[0087] In Figure 3In the electronic device 300 shown, the user interface 303 is mainly used to provide an interface for the user to input and obtain the data input by the user; and the processor 301 can be used to call an application program stored in the memory 305 for a method of controlling and switching the frame rate of a game display screen. When executed by one or more processors 301, the electronic device 300 is caused to execute one or more of the methods as described in the above embodiments. It should be noted that, for the foregoing method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0088] This application also provides a computer-readable storage medium storing instructions. When executed by one or more processors 301, the electronic device 300 is caused to execute one or more of the methods as described in the above embodiments.
[0089] In the above embodiments, the descriptions of the various embodiments each have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0090] In several implementation manners provided by this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some service interfaces. The indirect couplings or communication connections of the devices or units can be in electrical or other forms.
[0091] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0092] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0093] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of this application. And the aforementioned memory includes: various media such as USB flash drives, mobile hard disks, magnetic disks, or optical discs that can store program codes.
[0094] The above are only exemplary embodiments of the present disclosure and should not be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure still fall within the scope covered by the present disclosure. Those skilled in the art will easily think of other implementation schemes of the present disclosure after considering the specification and the practice of the truth of the disclosure.
[0095] This application aims to cover any variations, uses, or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include the common general knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and the embodiments are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for controlling and switching the frame rate of a game display screen, characterized in that, The method includes: Obtaining a scene complexity parameter of a game application, where the scene complexity parameter includes the number, types, and sizes of rendering objects in the game scene; Predicting the change trend of the scene complexity of the game application within a preset time period according to the scene complexity parameter to obtain a scene complexity prediction value; Obtaining the current performance parameter of the game device, and calculating a target adjustment factor based on the scene complexity prediction value and the current performance parameter, where the target adjustment factor is used to adjust the game frame rate; Determining a target frame rate from a preset frame rate group according to the target adjustment factor, where the preset frame rate group includes multiple frame rates; Smoothingly transitioning the current frame rate of the game application to the target frame rate.
2. The method according to claim 1, wherein The predicting the change trend of the scene complexity of the game application within a preset time period according to the scene complexity parameter specifically includes: Obtaining historical scene complexity data of the game application within a historical time period, where the historical scene complexity data includes the scene complexity parameter corresponding to each preset time granularity within the historical time period; Based on the historical scene complexity data, establishing a scene complexity prediction model, where the scene complexity prediction model includes multiple prediction sub-models, and each prediction sub-model corresponds to a type of scene complexity parameter; Using the scene complexity prediction model and combining the current scene complexity parameter of the game application to predict the scene complexity parameter within the preset time period to generate the scene complexity prediction value.
3. The method according to claim 2, characterized in that The establishing a scene complexity prediction model based on the historical scene complexity data specifically includes: Performing feature extraction on the historical scene complexity data to obtain a scene complexity feature vector; Selecting a preset number of scene complexity feature vectors as training samples; Using the training samples to train and generate a regression prediction model through a supervised learning algorithm, where the regression prediction model is used to represent the corresponding relationship between the scene complexity parameter and time; Evaluating the regression prediction model by using a cross-validation method to obtain a model accuracy; Judging whether the model accuracy reaches a preset threshold; If the model accuracy is greater than or equal to the preset threshold, using the regression prediction model as the scene complexity prediction model; If the model accuracy is less than the preset threshold, adjusting the training parameters and returning to execute the step of using the training samples to train and generate a regression prediction model through a supervised learning algorithm.
4. The method according to claim 1, wherein The obtaining the current performance parameter of the game device and calculating a target adjustment factor based on the scene complexity prediction value and the current performance parameter specifically includes: Real-time monitoring the CPU occupancy rate, GPU occupancy rate, and memory occupancy rate of the game device as the current performance parameter; Scoring the current performance parameter according to a preset performance evaluation rule to obtain a device performance score; Calculating the ratio of the device performance score to the scene complexity prediction value and using the ratio as an initial adjustment factor; Judging whether the initial adjustment factor is within a preset adjustment factor interval; If the initial adjustment factor is within the preset adjustment factor interval, using the initial adjustment factor as the target adjustment factor; If the initial adjustment factor is not within the preset adjustment factor range, the initial adjustment factor is corrected using a preset adjustment factor correction formula to obtain the target adjustment factor.
5. The method according to claim 1, wherein Determining the target frame rate from a preset frame rate group according to the target adjustment factor specifically includes: Calculating a matching degree between the adjustment factor and each frame rate value in the preset frame rate group, wherein the matching degree is obtained by a preset matching degree calculation formula; Selecting the frame rate value with the highest matching degree with the target adjustment factor as the candidate target frame rate; Determining whether a difference between the candidate target frame rate and the current frame rate is within a preset range; If the difference between the candidate target frame rate and the current frame rate is within a preset range, determining the candidate target frame rate as the target frame rate; If the difference between the candidate target frame rate and the current frame rate is not within a preset range, a frame rate value adjacent to the candidate target frame rate and having a difference with the current frame rate within a preset range is selected from the preset frame rate group as the target frame rate.
6. The method according to claim 1, wherein The step of smoothly transitioning the current frame rate of the game application to the target frame rate specifically includes: Calculating a frame rate difference between the current frame rate and the target frame rate; Dividing the frame rate difference into a plurality of sub-intervals according to a preset transition rule; Determining a plurality of sub-target frame rates according to each of the sub-intervals, wherein the sub-target frame rates are between the current frame rate and the target frame rate; The frame rate of the game application is controlled to pass through each of the sub-target frame rates in sequence and finally reach the target frame rate.
7. The method according to claim 6, wherein The frame rate difference is divided into a plurality of sub-intervals according to a preset transition rule, specifically including: Get the preset transition time; Determining a frame rate change rate for smooth transition according to the preset transition time and the frame rate difference; The frame rate difference is evenly divided into a plurality of sub-intervals using the frame rate change rate.
8. A frame rate control switching device for a game display screen, characterized in that, The device comprises an acquisition module (201) and a processing module (202), wherein: The acquisition module (201) is used to acquire scene complexity parameters of the game application, wherein the scene complexity parameters include the number, type and size of rendering objects in the game scene; The processing module (202) is used to predict the scene complexity change trend of the game application within a preset time period based on the scene complexity parameter to obtain a scene complexity prediction value; The acquisition module (201) is further configured to acquire current performance parameters of the gaming device and calculate a target adjustment factor based on the scene complexity prediction value and the current performance parameters, wherein the target adjustment factor is used to adjust the game frame rate; The processing module (202) is further configured to determine a target frame rate from a preset frame rate group according to the target adjustment factor, wherein the preset frame rate group includes a plurality of frame rates; The processing module (202) is further configured to smoothly transition the current frame rate of the game application to the target frame rate.
9. An electronic device, characterized in that, It includes a processor (301), a memory (305), a user interface (303) and a network interface (304). The memory (305) is used to store instructions. The user interface (303) and the network interface (304) are used to communicate with other devices. The processor (301) is used to execute the instructions stored in the memory (305) so that the electronic device (300) executes the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions which, when executed, execute the method according to any one of claims 1-7.
Citation Information
Patent Citations
Mobile terminal frame rate control method and device and mobile terminal
CN106657680A
Image processing method and device, terminal and storage medium
CN109413480A
Game picture optimization method, game equipment and computer readable storage medium
CN116808576A
Real-time picture switching method based on software frame rate and related device
CN117201754A
Frame rate adjustment method, device and equipment and computer readable storage medium
CN117331427A