Upgrade duration prediction method and device, medium and equipment

By obtaining the influencing factors and using the upgrade duration prediction model optimized by genetic algorithms, the problem of inaccurate system upgrade duration prediction under wireless networks is solved, accurate upgrade duration prediction is achieved, and user experience and device management efficiency is improved.

CN120583000APending Publication Date: 2025-09-02TCL COMM TECH (CHENGDU) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510648749.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

The prior art cannot accurately predict the duration of system upgrades under wireless networks, resulting in an increased risk of poor user experience and failure in equipment upgrades.

Method used

By obtaining the influencing factors of multiple preset types, using the genetic algorithm iteratively optimized upgrade time prediction model, gradually fit the residual between the actual time and the predicted time, and construct a convergent prediction model.

Benefits of technology

Accurate prediction of the system upgrade duration is achieved, user experience and device management efficiency is improved, and the risk of upgrade failure is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120583000A_ABST
    Figure CN120583000A_ABST
Patent Text Reader

Abstract

The invention discloses an upgrade duration prediction method and device, a medium and equipment, and the method comprises the steps: obtaining a plurality of preset types of impact factors, inputting the plurality of preset types of impact factors into a convergent upgrade duration prediction model, determining the prediction duration of a to-be-predicted sample according to the output of the upgrade duration prediction model and a reference prediction duration, and carrying out the prediction of the to-be-predicted sample. The upgrading time length prediction model is obtained by gradually fitting the residual error between the actual time length and the prediction time length under different influence factors and iteratively optimizing the model parameters by using the genetic algorithm, so that the obtained upgrading prediction time length can be ensured to be accurate enough, and reliable upgrading time length prediction can be provided for users and equipment managers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of equipment system upgrades, and in particular to an upgrade duration prediction method, device, medium, and equipment. Background Art

[0002] System upgrade duration refers to the time required to perform a firmware upgrade over a wireless network. Many factors influence this duration, including network speed, firmware size, device performance, and system status. Existing technologies cannot accurately predict upgrade duration based on these factors, leading to a series of issues. These issues include users being unable to predict the exact upgrade duration in advance, impacting user experience, and upgrade failures due to network outages or low battery levels. Summary of the Invention

[0003] Based on this, it is necessary to provide an upgrade duration prediction method, device, medium and equipment to solve the problem that the existing technology cannot accurately evaluate the system upgrade duration under different influencing factors.

[0004] In a first aspect, an embodiment of the present application provides an upgrade duration prediction method, the method comprising:

[0005] Obtaining multiple preset types of impact factors; wherein each impact factor is a parameter that affects the system upgrade duration;

[0006] The multiple preset types of influencing factors are input into a converged upgrade duration prediction model, and the predicted durations of the multiple preset types of influencing factors are determined according to the output of the upgrade duration prediction model and the benchmark predicted duration; wherein, the upgrade duration prediction model is obtained by gradually fitting the residuals between the actual duration and the predicted duration under different influencing factors, and using a genetic algorithm to iteratively optimize the model parameters.

[0007] In one embodiment, before inputting the plurality of preset types of impact factors into the converged upgrade duration prediction model, the method further includes:

[0008] Obtaining a training set; wherein the training set includes multiple training samples, each training sample is marked with an actual duration, each training sample includes multiple preset types of influencing factors, and each influencing factor is a parameter that affects the system upgrade duration;

[0009] Iteratively constructing a decision tree based on the training set to fit the residual of the actual duration of each training sample until a preset upper limit of the number of decision trees is reached, and outputting all constructed decision trees as the upgrade duration prediction model;

[0010] The preset set of parameters to be adjusted in the upgrade duration prediction model is iteratively optimized based on a genetic algorithm. When a preset optimization stop condition is met, the currently output set of parameters to be adjusted is obtained as the target parameter set of the upgrade duration prediction model to obtain a converged upgrade duration prediction model.

[0011] In one embodiment, the iterative construction of a decision tree based on the training set to fit the residual of the actual duration of each training sample until a preset upper limit of the number of decision trees is reached, and outputting all constructed decision trees as the upgrade duration prediction model, includes:

[0012] The average of the actual durations of all training samples is used as the benchmark predicted duration of each training sample, and the benchmark predicted duration is used as the current predicted duration;

[0013] Calculate the mth residual between the actual duration of each training sample and the current predicted duration; where the initial value of m is 1;

[0014] All training samples are input into the constructed m-th decision tree to fit the m-th residual of each training sample;

[0015] Update the current prediction duration according to the mth residual of each training sample;

[0016] Let m=m+1, return to the step of calculating the mth residual between the actual duration of each training sample and the current predicted duration and subsequent steps until m is equal to the preset upper limit of the number of decision trees, and output all constructed decision trees as the upgrade duration prediction model.

[0017] In one embodiment, the iterative optimization of the preset set of parameters to be adjusted in the upgrade duration prediction model based on a genetic algorithm includes:

[0018] Constructing an initial current population; wherein the current population includes a plurality of individuals, each individual being the set of parameters to be adjusted;

[0019] Calculate the fitness value of each individual in the current population;

[0020] If it is determined according to the fitness value that the optimization stopping condition is not currently met, selection, crossover and mutation operations are performed on the current population to obtain an updated current population, and the step of calculating the fitness value of each individual in the current population and subsequent steps are returned to execute until it is determined according to the fitness value that the optimization stopping condition is currently met, and the individual with the best fitness value is used as the target parameter set of the upgrade time prediction model.

[0021] In one embodiment, after obtaining the currently output parameter set to be adjusted as the target parameter set of the upgrade duration prediction model to obtain a converged upgrade duration prediction model, the method further includes:

[0022] Obtain a test set; wherein the test set includes multiple test samples, each test sample is marked with an actual duration, and each test sample includes N preset types of impact factors;

[0023] Input each test sample into the upgrade duration prediction model, and determine the predicted duration of each test sample based on the output of the upgrade duration prediction model and the benchmark predicted duration;

[0024] The prediction error is calculated based on the difference between the actual duration and the predicted duration of each test sample;

[0025] Calculating the influence values ​​of the N preset types of influence factors according to the total split gain of each influence factor in the upgrade duration prediction model; wherein the influence value is used to indicate the degree to which the influence factor affects the upgrade duration;

[0026] Eliminate the influencing factor with the smallest influence value in each test sample, set N=N-1, return to the step of inputting each test sample into the upgrade duration prediction model and subsequent steps, until N reaches a preset stop number, and obtain the prediction error of the test sample under different numbers of influencing factors;

[0027] The number of influencing factors in the test sample with the smallest prediction error is taken as the target number, and the influencing factors in the test sample with the smallest prediction error are taken as the target influencing factors.

[0028] In one embodiment, after obtaining the training set, the method further includes:

[0029] If there are non-numerical impact factors among the multiple preset types of impact factors, determining whether there is a sequential relationship among the non-numerical impact factors;

[0030] If the non-numerical impact factors have a sequential relationship, mapping the non-numerical impact factors to corresponding integer values ​​based on the sequential relationship;

[0031] If the non-numerical impact factors do not have an order relationship, the non-numerical impact factors are encoded based on a one-hot encoding method.

[0032] In one embodiment, after obtaining the training set, the method further includes:

[0033] If any of the preset types of influencing factors is missing in the first training sample, the first training sample is deleted; wherein the first training sample is any one of the multiple training samples;

[0034] If the values ​​of the influencing factors of the first training sample and the second training sample are the same, the second training sample is deleted; wherein the second training sample is any one of the multiple training samples except the first training sample.

[0035] In a second aspect, an embodiment of the present application further provides an upgrade duration prediction device, the upgrade duration prediction device comprising:

[0036] An acquisition module is used to obtain multiple preset types of impact factors; wherein each impact factor is a parameter that affects the system upgrade time;

[0037] A prediction module is used to input the multiple preset types of influencing factors into a converged upgrade duration prediction model, and determine the predicted duration of the multiple preset types of influencing factors based on the output of the upgrade duration prediction model and the benchmark predicted duration; wherein, the upgrade duration prediction model is obtained by gradually fitting the residuals between the actual duration and the predicted duration under different influencing factors, and using a genetic algorithm to iteratively optimize the model parameters.

[0038] In a third aspect, an embodiment of the present application further provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps in the above-mentioned upgrade duration prediction method are implemented.

[0039] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned upgrade duration prediction method are implemented.

[0040] In a fifth aspect, embodiments of the present application further provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in the embodiments of the present application.

[0041] The present invention provides an upgrade duration prediction method, apparatus, medium, and equipment. The method first obtains multiple preset types of influencing factors, then inputs these multiple preset types of influencing factors into a convergent upgrade duration prediction model, and determines the predicted duration of a sample to be predicted based on the output of the upgrade duration prediction model and a benchmark predicted duration. Since the upgrade duration prediction model is obtained by gradually fitting the residual between the actual duration and the predicted duration under different influencing factors, and iteratively optimizing the model parameters using a genetic algorithm, it can ensure that the obtained upgrade prediction duration is sufficiently accurate, and can provide users and equipment managers with reliable upgrade duration predictions. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0043] in:

[0044] Figure 1 A flowchart of the upgrade duration prediction method provided in an embodiment of the present application;

[0045] Figure 2 This is a diagram of the training process for the upgrade duration prediction model;

[0046] Figure 3 A flowchart for building an upgrade duration prediction model;

[0047] Figure 4 A flowchart of a preset set of parameters to be adjusted in an iterative optimization and upgrade duration prediction model;

[0048] Figure 5 Schematic diagram of the process for determining the target impact factors in the sample;

[0049] Figure 6 This is a schematic diagram of the structure of the upgrade duration prediction device;

[0050] Figure 7 This is the structural block diagram of the terminal equipment. DETAILED DESCRIPTION

[0051] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0052] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0053] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0054] See also Figure 1 , Figure 1 This is a flowchart of the upgrade duration prediction method provided in an embodiment of the present application. Although the flowchart shows a logical order, in some cases, the steps shown or described may be performed in a different order than shown in the accompanying drawings. Specifically, the specific process of the upgrade duration prediction method is as follows:

[0055] S101: Obtain impact factors of multiple preset types.

[0056] Among them, each influencing factor is a parameter that affects the system upgrade time, such as network speed, firmware size, device performance, system status, etc. These preset types of influencing factors can be classified according to different dimensions or attributes that affect the system upgrade time. For example, they can be divided into numerical type and non-numerical type according to the data nature of the influencing factor. Among them, numerical types include the size of the FOTA package (such as 500MB, 1GB), network speed (such as 50Mbps), etc. Non-numerical types include OTA solutions (such as OEM FOTA, COTA), FOTA types (such as Non AB FOTA, VAB FOTA), etc. Or they can be divided into software-related types, hardware-related types, and network-related types according to the function type. Among them, software-related types include system versions (such as Android 12, Android 13), OTA solutions (such as OEM FOTA, COTA), etc. Hardware-related types include storage capacity, battery status, etc. Network-related types include network types (such as 4G, 5G, Wi-Fi), network speed (such as 10Mbps, 50Mbps), etc. These multiple preset types of influencing factors will be used as inputs to the upgrade time prediction model to generate prediction results.

[0057] It is understandable that based on the different system upgrade methods, the corresponding influencing factors are also different. For example, system upgrade methods include wireless firmware upgrade (Firmware Over-The-Air, FOTA), local upgrade, USB upgrade, etc. Among them, for FOTA upgrade, the relevant influencing factors include system version, OTA solution, FOTA type, FOTA package size, CPU parameters (main frequency and number of cores) and memory read and write speed, etc. For local upgrade, the relevant influencing factors include local file integrity, local device compatibility, etc. For USB upgrade, the relevant influencing factors include USB connection stability, device system environment and upgrade file source reliability, etc.

[0058] For each upgrade type, it's not necessary to obtain all influencing factors; only the important ones are needed. Including too many influencing factors significantly increases the complexity of upgrade duration prediction, increasing analysis costs and computational effort. Interference between factors may also reduce the accuracy of the analysis results. However, too few influencing factors can result in an incomplete assessment of the upgrade situation, making it difficult to accurately grasp potential issues and risks that may arise during the upgrade process. The specific types and number of influencing factors required can be determined through the following methods. First, historical data analysis can be used. Data from a large number of past upgrade cases can be collected. For each upgrade type, the influencing factors that frequently appear and have a critical impact on the results, both in successful and failed cases, can be analyzed to identify these factors. Second, expert judgment can be used to determine the factors. Experts in relevant fields can be convened to discuss and list the key factors that influence upgrades based on their extensive practical experience, specific to each upgrade type.

[0059] It is understood that the method for triggering S101 data acquisition can be flexibly designed according to actual application scenarios and user needs. In some embodiments of the present application, it can be set to automatically trigger S101 data acquisition by default before each system upgrade, which is suitable for scenarios that require real-time monitoring and prediction of upgrade duration.

[0060] In some embodiments of the present application, the user can also actively trigger data acquisition before needing to know the upgrade time. This is suitable for scenarios where the user does not have frequent needs for the upgrade duration, so data is only acquired when needed.

[0061] S102: Inputting multiple preset types of impact factors into a converged upgrade duration prediction model, and determining predicted durations of the multiple preset types of impact factors according to outputs of the upgrade duration prediction model and a benchmark predicted duration.

[0062] Among them, the upgrade duration prediction model is obtained by gradually fitting the residual between the actual duration and the predicted duration under different influencing factors, and iteratively optimizing the model parameters using a genetic algorithm. The output of the upgrade duration prediction model here is actually the residual between the actual duration and the benchmark predicted duration under these multiple preset types of influencing factors, and the benchmark predicted duration can be the mean or median of the actual duration marked by all test samples (each test sample includes multiple known influencing factors), or it can be a fixed constant, which is approximately understood as the actual duration under each influencing factor under the test conditions. Adding the output to the benchmark predicted duration can slightly adjust the benchmark predicted duration, and then determine the predicted duration of multiple preset types of influencing factors.

[0063] In some embodiments of the present application, the entity executing the aforementioned upgrade duration prediction method may be a local device. In this scenario, a user activates the upgrade duration prediction function on the local device. The local device obtains the impact factor of the current device. This factor is input into a locally deployed upgrade duration prediction model to generate a prediction result. Finally, the prediction result is directly displayed on the local device's user interface for the user to view. This is suitable for scenarios where the user needs to view the upgrade duration prediction result in real time.

[0064] In some embodiments of the present application, the subject that executes the above-mentioned upgrade duration prediction method can also be a server. In this scenario, if the server receives an upgrade duration prediction request sent by a client (such as a mobile phone or computer), it obtains the impact factor from the client, and then inputs these acquired impact factors into the upgrade duration prediction model deployed by the server to generate a prediction result. Finally, the prediction result is presented on the server side or returned to the client for the user to view. This is suitable for scenarios where devices are deployed on a large scale, and multiple devices can be monitored and managed at the same time. At the same time, the client does not need to deploy the model on the local device.

[0065] The above-mentioned upgrade duration prediction method first obtains multiple preset types of influencing factors, and then inputs these multiple preset types of influencing factors into a convergent upgrade duration prediction model. The predicted duration of the sample to be predicted is determined according to the output of the upgrade duration prediction model and the benchmark predicted duration. Since the upgrade duration prediction model is obtained by gradually fitting the residual between the actual duration and the predicted duration under different influencing factors, and using a genetic algorithm to iteratively optimize the model parameters, it can ensure that the obtained upgrade prediction duration is accurate enough, and can provide users and equipment managers with reliable upgrade duration predictions.

[0066] Alternatively, as Figure 2 As shown, in a specific embodiment, the upgrade duration prediction method further performs the following steps:

[0067] S201, obtain a training set.

[0068] The training set includes multiple training samples, each annotated with actual duration and multiple pre-set influencing factors. The model makes predictions by learning the relationship between these factors and actual duration. The training set can be obtained through the following methods: 1. Collecting upgrade data under different conditions through simulation or actual testing. 2. Collecting upgrade-related data from user-uploaded data. Other methods are also possible.

[0069] It is understandable that based on the different system upgrade methods, the corresponding influencing factors are also different. System upgrade methods include wireless firmware upgrade (Firmware Over-The-Air, FOTA), local upgrade, USB upgrade and other methods. Among them, for FOTA upgrade, the relevant influencing factors include system version, OTA solution, FOTA type, FOTA package size, CPU parameters (main frequency and number of cores) and memory read and write speed, etc. For local upgrade, the relevant influencing factors include local file integrity, local device compatibility, etc. For USB upgrade, the relevant influencing factors include USB connection stability, device system environment and upgrade file source reliability, etc.

[0070] For ease of explanation, the following text will take FOTA as an example. Optionally, the influencing factors of FOTA are shown in Table 1 below:

[0071]

[0072] Table 1

[0073] Among them, the system version is the version number of the device operating system, such as Android12, Android13, etc.

[0074] The OTA solution is a technology that uses wireless communication technology to remotely update and maintain device firmware or software, such as OEMFOTA, COTA, AOTA, etc.

[0075] The FOTA type refers to the specific system upgrade solution used, such as Non AB FOTA, AB FOTA, and VAB FOTA.

[0076] The size of the FOTA package depends on the differences between the versions before and after the upgrade, such as the number of repair patches, the addition of new system functions, and the optimization of system applications.

[0077] The number of APKs integrated into the software version: The FOTA installation phase involves APK optimization, and the number of APKs is also one of the important factors affecting the FOTA installation time.

[0078] In the Android system, the Central Processing Unit (CPU) is responsible for running various applications, supporting multitasking, managing hardware resources, running system services, and monitoring application behavior. Therefore, the CPU is crucial to FOTA installation and operation, and CPU performance is generally determined by its main frequency (processing speed) and number of cores (the number of tasks it can handle simultaneously).

[0079] Read Only Memory (ROM): ROM is a permanent memory used to store data such as the device's operating system and pre-installed applications.

[0080] Random Access Memory (RAM): RAM is a temporary storage device used to store information such as currently running applications and data. Data in RAM is cleared when the device is turned off or restarted, hence the name "random access memory."

[0081] Memory read / write speed refers to the speed at which a module reads data from or writes data to memory. This is typically expressed in megabytes per second (MB / s) or gigabytes per second (GB / s). Memory read / write speeds are affected by various factors, including memory type, frequency, bandwidth, timing, and system configuration.

[0082] S202, iteratively constructing a decision tree based on the training set to fit the residual of the actual duration of each training sample until a preset upper limit of the number of decision trees is reached, and outputting all constructed decision trees as an upgrade duration prediction model.

[0083] Among them, the decision tree is a tree-structured machine learning model that can handle the regression task of this embodiment. In the decision tree, each node represents the splitting rule of a feature (for example, is the reading rate of Memory greater than the preset rate X?), and each leaf node represents a predicted value. Each decision tree iteratively constructed here is used to fit the residual between the current model prediction value and the actual value, thereby gradually reducing the error of the model until the preset upper limit of the number of decision trees is reached, and all constructed decision trees are output as upgrade time prediction models.

[0084] S203, iteratively optimize the preset set of parameters to be adjusted in the upgrade duration prediction model based on the genetic algorithm. When the preset optimization stop condition is met, obtain the currently output set of parameters to be adjusted as the target parameter set of the upgrade duration prediction model to obtain a converged upgrade duration prediction model.

[0085] Among them, the genetic algorithm is an optimization algorithm based on natural selection and genetic mechanism, which searches for the optimal solution of the set of parameters to be adjusted by simulating the biological evolution process. The set of parameters to be adjusted refers to the parameters that need to be optimized in the upgrade duration prediction model, such as the learning rate. The set of parameters to be adjusted is iteratively adjusted by the genetic algorithm, that is, after each adjustment of the set of parameters to be adjusted, it is necessary to return to execute S202 to reconstruct the model and judge whether the preset optimization stop condition is currently met, such as whether the maximum number of iterations is reached, whether the parameter performance converges, or whether the error is lower than a certain threshold. If the preset optimization stop condition is met after a certain model reconstruction, the set of parameters to be adjusted currently output is obtained as the target parameter set (i.e., the optimal parameter set) of the upgrade duration prediction model to obtain a converged upgrade duration prediction model.

[0086] Optionally, after obtaining the training set in S201, the following steps may be further performed:

[0087] A1. If there are non-numerical impact factors among multiple impact factors, determine whether there is an order relationship among the non-numerical impact factors.

[0088] Among them, non-numerical influencing factors are those whose values ​​are discrete categories rather than numerical values. Taking Table 1 as an example, the FOTA type and OTA solution here are non-numerical influencing factors. Next, determine whether these non-numerical influencing factors have a sequential relationship to facilitate subsequent coding. For example, if FOTA types have a sequential relationship (low version, medium version, and high version), then proceed to step A2. However, OTA solutions do not have a sequential relationship (OEM FOTA, DM FOTA, and GOTA), then proceed to step A3.

[0089] A2: If the non-numerical impact factors have a sequential relationship, the non-numerical impact factors are mapped to corresponding integer values ​​based on the sequential relationship.

[0090] Specifically, this encoding method maps each non-numerical impact factor to an integer value based on a sequential relationship, for example, starting from 0 and increasing in sequence. It can be understood that the encoding method of this step can retain the sequential information between categories.

[0091] A3: If there is no sequential relationship among non-numerical impact factors, the non-numerical impact factors are encoded based on the one-hot encoding method.

[0092] Specifically, one-hot encoding creates a new binary feature for each category of each discrete attribute. For each sample, only one binary feature is 1, indicating that it belongs to the corresponding category, and the other features are 0. Optional, specific processing methods are shown in Table 2 below:

[0093] OTA solution Mapping results OEM FOTA [1,0,0,0,0] DM FOTA [0,1,0,0,0] GOTA [0,0,1,0,0] AOTA [0,0,0,1,0] COTA [0,0,0,0,1]

[0094] Table 2

[0095] It can be understood that the encoding method of this step can avoid introducing false sequential relationships.

[0096] In this way, by reasonably encoding non-numerical influencing factors, non-numerical influencing factors can be converted into numerical forms that can be understood by the model. Therefore, as the training progresses, the model will be able to better analyze and understand the relationship between the influencing factors and the prediction results.

[0097] Optionally, after obtaining the training set in S201, the following steps may be further performed:

[0098] B1. If the first training sample lacks any preset type of influencing factor, the first training sample is deleted.

[0099] The first training sample is any one of the multiple training samples, meaning that the same judgment operation needs to be performed on all training samples. For example, if a first training sample lacks the FOTA type, it is deleted. This ensures that each sample in the training set contains all preset types of influencing factors, avoiding inaccurate model training due to missing data.

[0100] B2: If the impact factor values ​​of the first training sample and the second training sample are the same, the second training sample is deleted.

[0101] The second training sample is any one of the multiple training samples except the first training sample, which means that all training samples need to be compared pairwise. This can avoid overfitting or bias towards certain data by removing duplicate samples.

[0102] Through the preprocessing steps above, the training effect and prediction performance of the model can be significantly improved.

[0103] Alternatively, as Figure 3 As shown, S202 iteratively constructs a decision tree based on the training set to fit the residual of the actual duration of each training sample until the preset upper limit of the number of decision trees is reached, and outputs all constructed decision trees as the upgrade duration prediction model. Specifically, it includes the following sub-steps:

[0104] C1: The average of the actual durations of all training samples is used as the benchmark prediction duration of each training sample, and the benchmark prediction duration is used as the current prediction duration.

[0105] For example, all training samples in the training set are represented as [x1, x2, x3…x i …x n ], and the corresponding actual duration is expressed as [y1, y2, y3…yi …y n ], so n is the total number of training samples.

[0106] The baseline prediction duration here is the starting point of the iterative process and is used to calculate the initial residual later, expressed as:

[0107]

[0108] C2, calculate the mth residual between the actual duration of each training sample and the current predicted duration.

[0109] Among them, the mth residual is expressed as The initial value of m is 1. At the first iteration, the calculation formula for the mth residual is:

[0110]

[0111] C3, input all training samples into the constructed m-th decision tree to fit the m-th residual of each training sample.

[0112] That is, the mth residual of each training sample is used as the target value of each training sample to construct the mth decision tree. In the first iteration, the output of the constructed decision tree is expressed as T1(x i ).

[0113] C4, updates the current predicted duration according to the mth residual of each training sample.

[0114] Correspondingly, the current prediction duration of each training sample after update is expressed as:

[0115] F1(x i )=F0(x)+η·T1(x i )

[0116] In the above formula, η is the preset learning rate.

[0117] C5 determines whether m is equal to the preset upper limit of decision trees. If m is not equal to the preset upper limit, execute C6, set m = m + 1, and return to execute C2 and subsequent steps. If m is equal to the preset upper limit of decision trees, execute C7 and output all constructed decision trees as the upgrade duration prediction model.

[0118] That is to say, if m is not equal to the preset decision tree upper limit, continue to calculate the residual This is used when building the second tree. This process is repeated until m is equal to the preset upper limit M of the number of decision trees. All constructed decision trees are output as the upgrade time prediction model.

[0119] Through the above specific embodiments, an efficient and accurate upgrade duration prediction model can be constructed, which significantly improves user experience and device management efficiency.

[0120] Alternatively, as Figure 4 As shown, S203 iteratively optimizes the preset set of parameters to be adjusted in the upgrade duration prediction model based on the genetic algorithm, specifically including the following sub-steps:

[0121] D1, construct the initial current population.

[0122] The current population includes multiple individuals, each of which represents a set of parameters to be adjusted, used for iterative optimization during subsequent evolution. Optionally, because the number of decision trees M, the learning rate η, and the maximum depth of each decision tree in the upgrade duration prediction model significantly affect the model's prediction results, these three parameters are considered a set of parameters to be adjusted.

[0123] D2, calculate the fitness value of each individual in the current population.

[0124] The fitness value is an indicator used to measure individual performance. Optionally, the fitness formula can be:

[0125]

[0126] Prediction duration i Indicates the actual duration under the i-th parameter set to be adjusted, the actual duration i It represents the actual duration under the i-th parameter set to be adjusted. The smaller the MSE, the better the performance of the upgrade duration prediction model.

[0127] Optionally, the fitness formula can also be:

[0128]

[0129] It is similar to MSE, but the unit of RMSE is consistent with the actual duration, which is easier to interpret.

[0130] Optionally, the fitness formula can also be:

[0131]

[0132] in, is the mean of the actual duration, R 2 To measure the goodness of fit of the model, R 2 The closer it is to 1, the better the model performance.

[0133] D3: Determine whether the optimization stop condition is currently met based on the fitness value. If the fitness value determines that the optimization stop condition is not currently met, execute D4. If the fitness value determines that the optimization stop condition is currently met, execute D5.

[0134] The optimization refers to the preset conditions for stopping the optimization process, such as reaching the maximum number of iterations. Or the fitness value converges (such as the change in the fitness value is less than a certain threshold). Or the fitness value reaches the preset target (such as R 2 If the optimization stopping condition is not met, then D4 is executed to adjust the current population. If the optimization stopping condition is met, then D5 is executed.

[0135] D4, perform selection, crossover and mutation operations on the current population to obtain the updated current population, and return to execute D2 and subsequent steps.

[0136] Selection refers to selecting individuals from the current population using a selection strategy, typically a roulette wheel or tournament selection method. For example, the probability of selection in roulette wheel selection is:

[0137]

[0138] Where N is the size of the population, f i represents the fitness of the i-th individual.

[0139] Crossover refers to the use of crossover operations to generate new individuals. This method uses the single-point crossover method. Assuming that the two parent individuals are p1 and P2, a crossover point k is selected to generate two offspring individuals:

[0140] c1=[p1(1:k),p2(k+1:n)]

[0141] c2=[p2(1:k), p1(k+1:n)

[0142] Mutation operations are often used to introduce randomness and prevent populations from falling into local optima. The mutation formula depends on the encoding method. For example, a simple mutation in binary encoding is: each individual's gene can be 0 or 1, and the mutation operation will change the gene from 0 to 1 or from 1 to 0 with a certain probability, expressed as:

[0143]

[0144] c i ′ (k) is the k-th gene value of individual i after mutation, c i (k) is the k-th gene value of individual i before mutation, 1-c i (k) means to flip the gene, for example, 0 becomes 1, 1 becomes 0, p mis the mutation probability, and when this probability is met, the flip operation is performed.

[0145] D5, the individual with the best fitness value is used as the target parameter set of the upgrade time prediction model.

[0146] It is understandable that if the fitness is calculated based on MSE or RMSE, the individual with the best fitness value is the individual with the smallest fitness value, and if the fitness is calculated based on R 2 , then the individual with the best fitness value refers to the individual close to 1. At this time, the individual with the best fitness value is used as the target parameter set of the upgrade time prediction model.

[0147] By optimizing the parameter set according to the above specific embodiment, the performance of the upgrade duration prediction model can be significantly improved, thereby providing users with more accurate upgrade duration predictions and improving user experience.

[0148] Alternatively, as Figure 5 As shown, after S203 obtains the currently output parameter set to be adjusted as the target parameter set of the upgrade duration prediction model to obtain a converged upgrade duration prediction model, the following steps may be further performed:

[0149] E1, obtain the test set.

[0150] The test set includes multiple test samples, each annotated with actual duration and including N preset influencing factors. This test set is obtained in the same way as the training set, except that it is used to subsequently verify the accuracy of the duration prediction model by upgrading it with different influencing factors.

[0151] E2: Input each test sample into the upgrade duration prediction model, and determine the predicted duration of each test sample based on the output of the upgrade duration prediction model and the benchmark predicted duration.

[0152] The output of the upgrade duration prediction model is a residual. The baseline prediction duration can be taken as the mean of the actual durations of all test samples. Adding these two together gives the predicted duration for each test sample.

[0153] E3, calculate the prediction error based on the difference between the actual duration and the predicted duration of each test sample.

[0154] Similar to step D2 above, the prediction error here can be MSE, RMSE, R 2 The specific calculation process will not be described in detail.

[0155] E4. Calculate the influence values ​​of N preset types of influence factors according to the total split gain of each influence factor in the upgrade duration prediction model.

[0156] Among them, the split gain is used to represent the ability of a certain influencing factor to distinguish the target variable when splitting the node, and its calculation is:

[0157]

[0158] The total splitting gain of a given influencing factor is calculated by adding up the splitting gains across all nodes. Based on this, the total splitting gains of all influencing factors are normalized to obtain the influence values ​​of N pre-set influencing factors. This influence value indicates the degree to which the influencing factor affects the upgrade duration.

[0159] Alternatively, you can randomly shuffle the value of a certain influencing factor each time. Then, calculate the prediction error (e.g., RMSE) of the model after the shuffle. Finally, set the impact value of the influencing factor to the difference between the prediction errors before and after the shuffle. That is, impact value = prediction error after shuffle - original prediction error. Of course, other forms are also possible.

[0160] For example, in a certain example test, the calculated impact values ​​of various impact factors are shown in Table 3 below:

[0161] Feature Type Impact Value Apk quantity 0.247183 Memory read rate 0.200131 CPU main frequency 0.133926 FOTA package size 0.133523 System version 0.092231 Memory write rate 0.082101 ROM 0.078204 RAM 0.024858 Number of CPU cores 0.005537 FOTA type 0.002302 OTA solution 0.000004

[0162] Table 3

[0163] E5, eliminate the influencing factor with the smallest influence value in each test sample.

[0164] E6: Determine whether N is the preset stop number. If N is not the preset stop number, execute E7, set N = N-1, and return to execute E2 and subsequent steps. If N is the preset stop number, execute E8 to obtain the prediction error of the test sample under different numbers of influencing factors.

[0165] In other words, since the "OTA solution" has the smallest impact value in Table 3, the "OTA solution" is removed from each test sample. After obtaining a new test sample, the upgrade duration prediction model is re-entered and predicted. This process is repeated until N reaches a preset stop number (for example, set to 6). In a specific test example, the prediction errors calculated for different numbers of influencing factors are shown in Table 4 below.

[0166]

[0167] Table 4

[0168] E8, the number of influencing factors in the test sample with the smallest prediction error is taken as the target number, and the influencing factors in the test sample with the smallest prediction error are taken as the target influencing factors.

[0169] The error REMS shows that the prediction error is minimized when the model inputs a test sample with 11 features. Therefore, in this method, system version, RAM, ROM, CPU frequency, number of CPU cores, memory read rate, memory write rate, number of APKs, FOTA package size, FOTA type, and OTA solution are selected as target influencing factors.

[0170] It can be seen that this specific embodiment can screen out the most important influencing factors by reasonably calculating the influence values, thereby effectively optimizing the performance of the upgrade duration prediction model.

[0171] To facilitate better implementation of the upgrade duration prediction method of this application, this application also provides an upgrade duration prediction device based on the above upgrade duration prediction method. The meanings of the terms herein are the same as those in the above upgrade duration prediction method. For specific implementation details, please refer to the description in the method embodiment.

[0172] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of the upgrade duration prediction device provided by an embodiment of the present application, which may specifically include:

[0173] The acquisition module 601 is used to acquire multiple preset types of impact factors, wherein each impact factor is a parameter that affects the system upgrade duration;

[0174] Prediction module 602 is used to input multiple preset types of influencing factors into a converged upgrade duration prediction model, and determine the predicted duration of multiple preset types of influencing factors based on the output of the upgrade duration prediction model and the benchmark predicted duration; wherein, the upgrade duration prediction model is obtained by gradually fitting the residuals between the actual duration and the predicted duration under different influencing factors, and using a genetic algorithm to iteratively optimize the model parameters.

[0175] The above-mentioned upgrade duration prediction device, the acquisition module 601, is used to first obtain multiple preset types of influencing factors, and the prediction module 602 is used to input these multiple preset types of influencing factors into a converged upgrade duration prediction model, and determine the predicted duration of the sample to be predicted based on the output of the upgrade duration prediction model and the benchmark predicted duration. Since the upgrade duration prediction model is obtained by gradually fitting the residual between the actual duration and the predicted duration under different influencing factors, and using a genetic algorithm to iteratively optimize the model parameters, it can ensure that the obtained upgrade prediction duration is sufficiently accurate, and can provide users and equipment managers with reliable upgrade duration predictions.

[0176] In addition, the present application also provides a terminal device, such as Figure 7 As shown, it shows a schematic diagram of the structure of the terminal device involved in this application, specifically:

[0177] The terminal device may include one or more processing core processors 701, one or more computer-readable storage media memories 702, a power supply 703, an input unit 704 and other components. Those skilled in the art will understand that Figure 7 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0178] in:

[0179] Processor 701 is the control center of the terminal device. It connects the various components of the entire terminal device using various interfaces and lines. By running or executing software programs and / or modules stored in memory 702 and accessing data stored in memory 702, it performs various terminal device functions and processes data, thereby providing overall monitoring of the terminal device. Optionally, processor 701 may include one or more processing cores. Preferably, processor 701 may integrate an application processor and a modem processor. The application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 701.

[0180] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, etc.; the data storage area may store data created based on the use of the terminal device, etc. In addition, the memory 702 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.

[0181] The terminal device also includes a power supply 703 for supplying power to various components. Preferably, the power supply 703 can be logically connected to the processor 701 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 703 can also include one or more DC or AC power supplies, a recharging system, a power supply device debugging circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0182] The terminal device may further include an input unit 704, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0183] Although not shown, the terminal device may also include a display unit, etc., which will not be described in detail here. Specifically in this embodiment, the processor 701 in the terminal device will load the executable file corresponding to the process of one or more applications into the memory 702 according to the following instructions, and the processor 701 will run the application stored in the memory 702, thereby implementing the steps in any upgrade duration prediction method provided in the embodiment of the present application: obtaining multiple preset types of influencing factors; wherein each influencing factor is a parameter that affects the system upgrade duration; inputting multiple preset types of influencing factors into the converged upgrade duration prediction model, and determining the predicted duration of multiple preset types of influencing factors according to the output of the upgrade duration prediction model and the benchmark predicted duration; wherein the upgrade duration prediction model is obtained by gradually fitting the residual between the actual duration and the predicted duration under different influencing factors, and iteratively optimizing the model parameters using a genetic algorithm.

[0184] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0185] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0186] To this end, the present application provides a computer-readable storage medium having a computer program stored thereon. The computer program can be loaded by a processor to execute the steps in any upgrade duration prediction method provided in the present application.

[0187] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0188] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0189] Since the instructions stored in the computer-readable storage medium can execute the steps in any upgrade duration prediction method provided in this application, the beneficial effects that can be achieved by any upgrade duration prediction method provided in this application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0190] The above is a detailed introduction to the upgrade duration prediction method, device, terminal device and computer-readable storage medium provided by this application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for predicting upgrade duration, characterized in that: The method comprises: Obtaining multiple preset types of impact factors; wherein each impact factor is a parameter that affects the system upgrade duration; The multiple preset types of influencing factors are input into a converged upgrade duration prediction model, and the predicted durations of the multiple preset types of influencing factors are determined according to the output of the upgrade duration prediction model and the benchmark predicted duration; wherein, the upgrade duration prediction model is obtained by gradually fitting the residuals between the actual duration and the predicted duration under different influencing factors, and using a genetic algorithm to iteratively optimize the model parameters.

2. The upgrade duration prediction method according to claim 1, characterized in that: Before inputting the plurality of preset types of impact factors into the converged upgrade duration prediction model, the method further includes: Obtaining a training set; wherein the training set includes multiple training samples, each training sample is marked with an actual duration, and each training sample includes multiple preset types of influencing factors; Iteratively constructing a decision tree based on the training set to fit the residual of the actual duration of each training sample until a preset upper limit of the number of decision trees is reached, and outputting all constructed decision trees as the upgrade duration prediction model; The preset set of parameters to be adjusted in the upgrade duration prediction model is iteratively optimized based on a genetic algorithm. When a preset optimization stop condition is met, the currently output set of parameters to be adjusted is obtained as the target parameter set of the upgrade duration prediction model to obtain a converged upgrade duration prediction model.

3. The upgrade duration prediction method according to claim 2, characterized in that: The iterative construction of a decision tree based on the training set to fit the residual of the actual duration of each training sample until a preset upper limit of the number of decision trees is reached, and outputting all constructed decision trees as the upgrade duration prediction model, includes: The average of the actual durations of all training samples is used as the benchmark predicted duration of each training sample, and the benchmark predicted duration is used as the current predicted duration; Calculate the mth residual between the actual duration of each training sample and the current predicted duration; where the initial value of m is 1; All training samples are input into the constructed m-th decision tree to fit the m-th residual of each training sample; Update the current prediction duration according to the mth residual of each training sample; Let m=m+1, return to the step of calculating the mth residual between the actual duration of each training sample and the current predicted duration and subsequent steps until m is equal to the preset upper limit of the number of decision trees, and output all constructed decision trees as the upgrade duration prediction model.

4. The upgrade duration prediction method according to claim 2, characterized in that: The iterative optimization of the preset set of parameters to be adjusted in the upgrade duration prediction model based on the genetic algorithm includes: Constructing an initial current population; wherein the current population includes a plurality of individuals, each individual being the set of parameters to be adjusted; Calculate the fitness value of each individual in the current population; If it is determined according to the fitness value that the optimization stopping condition is not currently met, selection, crossover and mutation operations are performed on the current population to obtain an updated current population, and the step of calculating the fitness value of each individual in the current population and subsequent steps are returned to execute until it is determined according to the fitness value that the optimization stopping condition is currently met, and the individual with the best fitness value is used as the target parameter set of the upgrade time prediction model.

5. The upgrade duration prediction method according to claim 2, characterized in that: After obtaining the currently output parameter set to be adjusted as the target parameter set of the upgrade duration prediction model to obtain a converged upgrade duration prediction model, the method further includes: Obtain a test set; wherein the test set includes multiple test samples, each test sample is marked with an actual duration, and each test sample includes N preset types of impact factors; Input each test sample into the upgrade duration prediction model, and determine the predicted duration of each test sample based on the output of the upgrade duration prediction model and the benchmark predicted duration; The prediction error is calculated based on the difference between the actual duration and the predicted duration of each test sample; Calculating the influence values ​​of the N preset types of influence factors according to the total split gain of each influence factor in the upgrade duration prediction model; wherein the influence value is used to indicate the degree to which the influence factor affects the upgrade duration; Eliminate the influencing factor with the smallest influence value in each test sample, set N=N-1, return to the step of inputting each test sample into the upgrade duration prediction model and subsequent steps, until N reaches a preset stop number, and obtain the prediction error of the test sample under different numbers of influencing factors; The number of influencing factors in the test sample with the smallest prediction error is taken as the target number, and the influencing factors in the test sample with the smallest prediction error are taken as the target influencing factors.

6. The upgrade duration prediction method according to claim 2, characterized in that: After obtaining the training set, the method further includes: If there are non-numerical impact factors among the multiple preset types of impact factors, determining whether there is a sequential relationship among the non-numerical impact factors; If the non-numerical impact factors have a sequential relationship, mapping the non-numerical impact factors to corresponding integer values ​​based on the sequential relationship; If the non-numerical impact factors do not have an order relationship, the non-numerical impact factors are encoded based on a one-hot encoding method.

7. The upgrade duration prediction method according to claim 2, characterized in that: After obtaining the training set, the method further includes: If any of the preset types of influencing factors is missing in the first training sample, the first training sample is deleted; wherein the first training sample is any one of the multiple training samples; If the values ​​of the influencing factors of the first training sample and the second training sample are the same, the second training sample is deleted; wherein the second training sample is any one of the multiple training samples except the first training sample.

8. An upgrade duration prediction device, characterized in that: The upgrade duration prediction device includes: An acquisition module is used to obtain multiple preset types of impact factors; wherein each impact factor is a parameter that affects the system upgrade time; A prediction module is used to input the multiple preset types of influencing factors into a converged upgrade duration prediction model, and determine the predicted duration of the multiple preset types of influencing factors based on the output of the upgrade duration prediction model and the benchmark predicted duration; wherein, the upgrade duration prediction model is obtained by gradually fitting the residuals between the actual duration and the predicted duration under different influencing factors, and using a genetic algorithm to iteratively optimize the model parameters.

9. A computer-readable storage medium, characterized in that A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the upgrade duration prediction method according to any one of claims 1 to 7.

10. A terminal device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the upgrade duration prediction method according to any one of claims 1 to 7.