Method, device, terminal equipment and computer readable storage medium for starting optimization

CN122756802APending Publication Date: 2026-09-15SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610882920.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-17
Publication Date
2026-09-15

Smart Images

  • Figure CN122756802A_ABST
    Figure CN122756802A_ABST
Patent Text Reader

Abstract

The application discloses a starting optimization method and device, a terminal device and a computer readable storage medium. The method comprises the following steps: acquiring first running data of a system in a starting process; determining first evaluation data of the system in the starting process according to the first running data; and determining a starting optimization strategy according to the first evaluation data. The method can determine the corresponding starting optimization strategy according to the corresponding evaluation result in different starting states, thereby improving the rationality of resource scheduling in the starting process, the execution efficiency of the starting process and the starting performance of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to a startup optimization method, apparatus, terminal device, and computer-readable storage medium. Background Technology

[0002] During startup, existing smart terminals typically need to complete multiple processing steps, including loading system services, initializing resources, and starting functional modules. To shorten startup time, some terminals adopt a fixed-rule optimization approach, uniformly configuring the startup process based on preset rules. During terminal operation, the startup phase still executes the corresponding startup tasks according to the established configuration, thereby optimizing the startup process.

[0003] Because different terminals have different hardware performance, system operating status, and task load during the startup phase, the resource consumption and operating status of each stage during startup will also change. Fixed optimization rules may not be suitable for the current startup scenario, which can easily lead to unreasonable resource scheduling, long waiting times for some startup tasks, or decreased efficiency in the startup process, thus affecting system startup performance. Summary of the Invention

[0004] This application provides a startup optimization method, apparatus, terminal device, and computer-readable storage medium, which can determine corresponding startup optimization strategies based on corresponding evaluation results under different startup states, thereby improving the rationality of resource scheduling and the execution efficiency of the startup process, and improving system startup performance.

[0005] The technical solution adopted by this invention to solve the problem is as follows: On the one hand, this application provides a startup optimization method, including: Obtain the initial runtime data of the system during startup; Based on the initial operational data, determine the initial evaluation data of the system during the startup process; Based on the initial assessment data, an optimization strategy was determined.

[0006] In some embodiments of this application, an optimization strategy is determined based on the first evaluation data, including: Based on the first evaluation data, a candidate strategy library was determined; Determine the startup optimization strategy from the candidate strategy library.

[0007] In some embodiments of this application, a candidate strategy library is determined based on first evaluation data, including: When the first evaluation data is greater than or equal to the first threshold and less than the second threshold, the candidate strategy library is determined as the first strategy library; When the first evaluation data is greater than or equal to the second threshold and less than the third threshold, the candidate strategy library is determined as the second strategy library; When the first evaluation data is greater than or equal to the third threshold and less than or equal to the fourth threshold, the candidate policy library is determined to be the third policy library.

[0008] In some embodiments of this application, an optimization strategy is determined from a candidate strategy library, including: If an optimization strategy that matches the first performance data exists in the candidate strategy library, the matching optimization strategy is determined as the starting optimization strategy, wherein the first performance data is used to characterize the statistical features of the first running data. If no optimization strategy matching the first performance data exists in the candidate strategy library, the optimization strategy with the highest priority in the candidate strategy library is determined as the startup optimization strategy.

[0009] In some embodiments of this application, first evaluation data of the system during startup is determined based on first operational data, including: Statistical analysis of the initial running data is performed to determine the initial performance data of the system during startup. Obtain the weight parameters corresponding to the first performance data; The first performance data is obtained by weighted summation based on the weight parameters.

[0010] In some embodiments of this application, after determining the initiation optimization strategy based on the first evaluation data, the method further includes: Execute the startup optimization strategy and obtain the second runtime data of the system during the startup process after the startup optimization strategy is executed; Based on the second operational data, determine the second evaluation data; Based on the second assessment data and the first assessment data, the change in assessment data is obtained; Based on the changes in the evaluation data, update the weight parameters and / or the priority of the activation optimization strategy.

[0011] In some embodiments of this application, the weight parameters and / or the priority of initiating optimization strategies are updated based on changes in the evaluation data, including: If the change in the evaluation data is less than or equal to the fifth threshold, adjust the weight parameters and / or activate the priority of the optimization strategy based on the change in the evaluation data. If the second evaluation data is greater than the fifth threshold, increase the weight parameters and / or activate the priority of the optimization strategy based on the change in the evaluation data.

[0012] Secondly, embodiments of the present invention also provide a startup optimization device, comprising: The acquisition module is used to acquire weight parameters and the initial running data of the system during startup. The first determination module is used to determine the first evaluation data of the system during the startup process based on the weight parameters and the first running data. The second determination module is used to determine the startup optimization strategy based on the first evaluation data.

[0013] Thirdly, this application also provides a terminal device, which includes: One or more processors; Memory; and One or more applications, wherein the applications are stored in memory and configured to be executed by the processor to implement the startup optimization method of any of the first aspects.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to perform the steps in the startup optimization method of any of the first aspects.

[0015] The beneficial effects of this invention are as follows: By acquiring the first operating data of the system during the startup process, determining the first evaluation data based on the first operating data, evaluating the current startup process, and determining the startup optimization strategy based on the first evaluation data, the adopted optimization strategy can be matched with the current startup state. Therefore, corresponding startup optimization strategies can be determined based on the corresponding evaluation results under different startup states, thereby improving the rationality of resource scheduling and the execution efficiency of the startup process, and improving system startup performance. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of a startup optimization system provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating one embodiment of the startup optimization method provided in this invention. Figure 3 This is a flowchart illustrating a specific embodiment of the startup optimization process provided in this invention. Figure 4 This is a flowchart illustrating a specific embodiment of the parameter update process provided in this invention. Figure 5 This is a schematic block diagram of the startup optimization device provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of an embodiment of the terminal device provided in this invention. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of the stated features.

[0020] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0021] It should be noted that since the method in this application embodiment is executed in a terminal device, the processing objects of each terminal device exist in the form of data or information, such as time, which is essentially time information. It can be understood that if size, quantity, position, etc. are mentioned in subsequent embodiments, they are all corresponding data that exist so that the terminal device can process them. Specific details will not be elaborated here.

[0022] This application provides a startup optimization method, apparatus, terminal device, and computer-readable storage medium, which will be described in detail below.

[0023] Please see Figure 1 , Figure 1This is a schematic diagram of a startup optimization system provided in an embodiment of this application. The startup optimization system may include a terminal device 100, which integrates a startup optimization device, such as... Figure 1 Terminal devices in the process.

[0024] In this embodiment, the terminal device 100 is mainly used to obtain the first running data of the system during the startup process; determine the first evaluation data of the system during the startup process based on the first running data; and determine the startup optimization strategy based on the first evaluation data. The corresponding startup optimization strategy can be determined according to the corresponding evaluation results under different startup states, thereby improving the rationality of resource scheduling and the execution efficiency of the startup process, and improving the system startup performance.

[0025] In this embodiment, the terminal device 100 can be an independent server, a server network, or a server cluster. For example, the terminal device 100 described in this embodiment includes, but is not limited to, a computer, a network host, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.

[0026] It is understood that the terminal device 100 used in the embodiments of this application can be a device that includes both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such a device may include: cellular or other communication devices having a single-line display, a multi-line display, or a cellular or other communication device without a multi-line display. Specifically, the terminal device 100 may be a desktop terminal or a mobile terminal, and the terminal device 100 may also be one of a mobile phone, tablet computer, laptop computer, etc.

[0027] Those skilled in the art will understand that Figure 1 The application environment shown is merely one application scenario of the solution in this application and does not constitute a limitation on the application scenario of the solution in this application. Other application environments may include those that are more specific to this application. Figure 1 The number of more or fewer terminal devices shown, for example Figure 1 Only one terminal device is shown in the image. It is understood that the startup optimization system may also include one or more other services, which are not specified here.

[0028] In addition, such as Figure 1 As shown, the startup optimization system may also include a memory 200 for storing data, such as running data, such as first running data, second running data, etc., evaluation data, such as first evaluation data, second evaluation data, etc., and startup optimization strategies.

[0029] It should be noted that, Figure 1 The schematic diagram of the startup optimization system shown is merely an example. The startup optimization system and scenarios described in this application are intended to more clearly illustrate the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. As those skilled in the art will know, with the evolution of startup optimization systems and the emergence of new business scenarios, the technical solutions provided in this application are also applicable to similar technical problems.

[0030] First, this application provides a startup optimization method, the execution subject of which is a startup optimization device, which is applied to a terminal device. The startup optimization method includes: acquiring first operating data of the system during startup; determining first evaluation data of the system during startup based on the first operating data; and determining a startup optimization strategy based on the first evaluation data.

[0031] like Figure 2 The diagram shown is a flowchart of an embodiment of the startup optimization method in this application. The startup optimization method may include the following steps S201 to S203, as detailed below: Step S201: Obtain the first running data of the system during the startup process.

[0032] In one specific embodiment, the startup process can be the entire running phase of the smart terminal from power-on and system kernel loading to system service initialization and application framework startup. The first running data is data used to characterize the actual running state of the system during the startup phase, such as processor usage, memory usage, task execution status, thread scheduling status, or service loading status.

[0033] Specifically, core data during the startup process can be collected in real time by leveraging operating system kernel capabilities, tools within the Android system framework for tracing system-level behavior, and application debugging interfaces. Specifically, operating system kernel capabilities can acquire thread scheduling status, CPU running status, and process switching information; tools within the Android system framework for tracing system-level behavior can acquire system service startup status, application framework initialization status, and system message processing status; and application debugging interfaces can be used to obtain information such as application or service execution time, call status, and task execution results during the startup phase.

[0034] The boot process can be understood as a running process formed by the sequential or parallel execution of multiple startup events. For example, kernel initialization, Zygote startup, System Server initialization, and system service loading are all running events in different startup phases. Therefore, running data can be sampled according to different acquisition windows. The acquisition window is a sampling interval used to observe the running status of the current startup phase. This acquisition window can be a fixed time length, such as collecting running status information every 200ms; or it can be divided based on task boundary events, such as collecting the running status of the current phase when System Server initialization is completed, Zygote startup is completed, or a specific system service is loaded. This embodiment of the invention does not impose specific limitations.

[0035] The initial operational data collected through the above methods not only reflects the overall resource utilization of the system but also the execution status of different startup tasks at each stage. For example, thread waiting time reflects task blocking, task execution time reflects the execution efficiency of the current stage, and service startup order reflects the task scheduling status. Without data collection on the current operational status, the system can only execute fixed optimization methods based on preset rules, making it difficult to reflect the true operational status of the current startup stage. Therefore, by acquiring the initial operational data, the system can have the ability to perceive the startup process in real time, thus providing a basis for subsequent evaluation. Furthermore, since the initial operational data comes from the actual startup process, the acquired data can more accurately reflect the current operating status of the system, which is beneficial to improving the accuracy of subsequent analysis results. Step S202: Determine the first evaluation data of the system during the startup process based on the first running data.

[0036] In one specific embodiment, the first evaluation data is the evaluation result obtained from the analysis of the first running data, and is characteristic data used to characterize the running state of the current startup process. For example, it may be data reflecting the resource load, task execution efficiency, or system operating pressure during the current startup phase. Compared to the original running data, the first evaluation data is the result after analysis and processing, and it can provide a more focused and abstract description of the current startup state of the system. This embodiment can determine the state of the startup process, that is, analyze the running data to determine the current running state of the system, and then perform subsequent processing based on the corresponding state.

[0037] Step S203: Determine the activation optimization strategy based on the first evaluation data.

[0038] In one specific embodiment, a startup optimization strategy is a processing scheme used to improve the execution efficiency of the startup process, such as adjusting the execution order of some tasks, adjusting the allocation method of some resources, or delaying the processing of some startup tasks. In this embodiment, the corresponding optimization strategy can be determined based on different evaluation results. Specifically, when the evaluation result indicates that the current resource load is high, a corresponding resource scheduling strategy can be determined; when the evaluation result indicates that some tasks are waiting, the task execution method can be adjusted. In this embodiment, by acquiring the first operating data of the system during the startup process, determining the first evaluation data based on the first operating data, evaluating the current startup process, and determining the startup optimization strategy based on the first evaluation data, the adopted optimization strategy can be matched with the current startup state. Therefore, corresponding startup optimization strategies can be determined based on the corresponding evaluation results under different startup states, thereby improving the rationality of resource scheduling and the execution efficiency of the startup process, and improving system startup performance.

[0039] In one specific implementation, determining the startup optimization strategy based on the first evaluation data includes: determining a candidate strategy library based on the first evaluation data; and determining the startup optimization strategy from the candidate strategy library.

[0040] In one specific embodiment, the candidate strategy library is a pre-established set of strategies, and different strategy libraries can store different startup optimization strategies. For example, some strategies in some strategy libraries are mainly used to solve the problem of long startup time, some strategies in some strategy libraries are mainly used to solve the problem of task blocking, and some strategies in other strategy libraries are used to solve the problem of excessive resource consumption.

[0041] Unlike traditional strategies that directly categorize bottlenecks by a single type, this embodiment does not divide the candidate strategy library solely by problem type. Instead, it further incorporates first evaluation data as the basis for strategy selection. The selection is primarily based on the range within which the evaluation data falls, i.e., the numerical range corresponding to the first evaluation data. For example, when the first evaluation data falls within a certain numerical range, it may indicate that a certain type of operational problem is more likely to occur during the current startup process; conversely, when the first evaluation data falls within another numerical range, it may indicate that multiple operational problems exist simultaneously during the current startup process. Therefore, different ranges correspond to different candidate strategy libraries.

[0042] Specifically, a large amount of historical system startup data can be collected in advance, and corresponding evaluation data can be determined, as well as startup anomalies corresponding to different evaluation values ​​can be analyzed. For example, historical data analysis may reveal that when the evaluation value is in a certain range, there is a high probability of tasks taking too long during startup. Therefore, a candidate strategy library corresponding to this range can be pre-established, and optimization strategies mainly used to reduce task execution time can be configured in it. When the evaluation value is in another range, historical data indicates that the system not only has tasks that take a long time but also tasks that are blocked. Therefore, the corresponding candidate strategy library can include strategies for reducing time consumption and reducing blocking. When the evaluation value is in yet another range, it may indicate that the system has both tasks that take a long time and excessive resource consumption. Therefore, the corresponding strategy library can include combined strategies related to resource scheduling and task execution optimization.

[0043] In other words, this embodiment does not directly match a corresponding strategy after detecting a specific problem. Instead, it first uses the interval in which the evaluation data falls to make an overall scenario judgment on the current startup state, and then filters the corresponding candidate strategy library based on this scenario. Since different intervals can reflect different types of combinations of operational characteristics, the strategies in the candidate strategy library have actually been adapted to the corresponding scenarios in advance. Subsequently, the final startup optimization strategy is determined from this candidate strategy library, which can further improve the targeting of strategy selection.

[0044] By employing the above method, direct full-range matching across all strategies can be avoided, thereby reducing irrelevant interference in the strategy selection process and improving strategy selection efficiency. Furthermore, since the candidate strategy library is built upon the correlation between historical operational patterns and evaluation data intervals, the final determined startup optimization strategy is more aligned with the current startup state. Moreover, because different evaluation intervals can correspond to combinations of different operational problems, this solution can not only handle single startup problems but also adapt to complex startup scenarios with multiple operational problems coexisting, thus improving the flexibility of the startup optimization process and the effectiveness of startup performance optimization.

[0045] In one specific implementation, determining the candidate strategy library based on the first evaluation data includes: determining the candidate strategy library as the first strategy library when the first evaluation data is greater than or equal to a first threshold and less than a second threshold; determining the candidate strategy library as the second strategy library when the first evaluation data is greater than or equal to the second threshold and less than a third threshold; and determining the candidate strategy library as the third strategy library when the first evaluation data is greater than or equal to the third threshold and less than or equal to a fourth threshold.

[0046] In one specific embodiment, the first evaluation data can be a normalized value. In this way, the evaluation results obtained from different devices and different startup scenarios can be represented using a unified numerical standard, which facilitates subsequent interval division and strategy matching.

[0047] In this embodiment, when the first evaluation data is less than the first threshold (which can be 0.5), the current startup state can be considered to be in a relatively normal or stable state. For example, at this time, the system resource usage is relatively reasonable, task execution waiting time is low, and the startup process runs smoothly overall. Therefore, in this state, dynamic optimization is unnecessary. Because dynamic optimization itself also incurs certain scheduling, analysis, or strategy switching overhead, frequently performing dynamic optimization when the startup state is already good may actually increase the additional system burden.

[0048] Furthermore, when the first evaluation data falls into different threshold ranges, it indicates that the current startup state corresponds to different degrees of operational anomalies or performance pressure. For example, when the first evaluation data is between the first threshold (which could be 0.5) and the second threshold (which could be 0.6), it indicates that there has been some performance fluctuation during the current startup process, but the overall problem is relatively minor, so the first strategy library can be identified as a candidate strategy library; when the first evaluation data further increases and falls between the second threshold (which could be 0.6) and the third threshold (which could be 0.8), it indicates that the performance problem in the current startup stage is more obvious, so the second strategy library can be switched to; and when the first evaluation data continues to increase and approaches the fourth threshold (which could be 1.0), it indicates that the current startup state may have more complex or more serious operational problems, so the third strategy library can be further identified to adapt to more complex optimization scenarios.

[0049] Because the startup states corresponding to different numerical ranges vary significantly, it is unnecessary to apply the same optimization strategy to all startup scenarios. Instead, the strategy selection range can be gradually adjusted based on the range in which the evaluation data falls. This makes the startup optimization process more hierarchical, improves strategy selection efficiency, and enhances the fit between the final startup optimization strategy and the current startup state, thereby improving system startup performance and resource scheduling rationality. When the system startup state is good, unnecessary dynamic optimization overhead can be avoided; as the system startup state gradually deteriorates, the targeting and intensity of the optimization strategy can be gradually increased, thus achieving more refined startup optimization control.

[0050] In one specific implementation, determining the startup optimization strategy in the candidate strategy library includes: if there is an optimization strategy in the candidate strategy library that matches the first performance data, determining the matching optimization strategy as the startup optimization strategy, wherein the first performance data is used to characterize the statistical characteristics of the first running data; if there is no optimization strategy in the candidate strategy library that matches the first performance data, determining the optimization strategy with the highest priority in the candidate strategy library as the startup optimization strategy.

[0051] In one specific embodiment, the first performance data refers to statistical characteristics used to characterize the first operational data. These statistical characteristics can be data features obtained after analyzing the operational data that reflect system operational problems, rather than simply raw operational values. For example, the first performance data may include latency performance data, blocking performance data, and resource consumption performance data. Latency performance data can reflect task execution time; blocking performance data can reflect thread waiting, task blocking, or task dependency conflicts; and resource consumption performance data can reflect CPU, memory, or I / O resource consumption. By analyzing the specific values ​​corresponding to these performance data, the main types and severity of problems existing in the current startup process can be further identified.

[0052] In this embodiment, each optimization strategy in the candidate strategy library not only has its own corresponding optimization function, but can also correspond to different problem types and different priorities. For example, some optimization strategies are suitable for solving task execution delay problems, some are suitable for reducing task blocking, and some are suitable for reducing resource consumption pressure. Furthermore, when multiple strategies are available for execution, the strategy more suitable for priority execution can be determined based on pre-configured priorities.

[0053] After determining the strategy library corresponding to the current overall startup scenario, the system further searches for optimization strategies that can address the problem based on the actual characteristics of the current system issues. For example, if the initial performance data shows a primary task latency issue, optimization strategies to reduce task latency can be prioritized; if the performance data shows significant blocking issues, strategies to optimize thread scheduling or reduce waiting conflicts can be prioritized; and if resource consumption performance data is high, resource scheduling optimization strategies can be prioritized. If no optimization strategy matching the current initial performance data is found in the candidate strategy library, it indicates that the current problem may not belong to the typical problem scenarios preset in the strategy library, or the current problem characteristics are too complex to find a direct corresponding strategy. In this case, the highest priority optimization strategy in the candidate strategy library can be selected as the startup optimization strategy. In this way, even if the current performance problem cannot completely match the preset strategy type, the system can still select a relatively more important, more applicable, or historically better optimization strategy to execute, thereby ensuring that the startup optimization process can continue.

[0054] Compared to methods that directly select a strategy based on a single problem type, this embodiment considers not only an independent performance problem but also performs a comprehensive analysis of the overall system operation by combining multiple types of performance data. For example, a slow system startup is not necessarily caused by a single time-consuming task; it may also be accompanied by thread blocking, resource contention, or excessive resource consumption. If strategy matching is based solely on a single problem type, the interrelationships between multiple problems can easily be overlooked. This solution, however, analyzes the overall system operation status using primary performance data and then selects strategies based on problem types and priorities in the candidate strategy library. This ensures that the final startup optimization strategy better reflects the actual operating state of the current system.

[0055] In one specific implementation, determining the first evaluation data of the system during startup based on the first running data includes: statistically analyzing the first running data to determine the first performance data of the system during startup; obtaining the weight parameters corresponding to the first performance data; and performing a weighted summation of the first performance data based on the weight parameters to obtain the first evaluation data.

[0056] In one specific embodiment, during the startup process, running data can be collected and statistically analyzed according to a preset collection window to obtain first performance data. Specifically, the start and end times of each task within the window can be recorded, and the execution time of each task can be further statistically analyzed. For example, the execution time of a single task, the cumulative execution time of multiple tasks, and the proportion of the window duration occupied by the execution time of a single task can be statistically analyzed, which can reflect the task execution efficiency in the current startup phase. Waiting events that occur during task execution can also be recorded, such as mutex lock waits, I / O waits, or thread synchronization waits, and the corresponding blocking time and the proportion of the blocking time to the window duration can be accumulated, which can reflect whether there are obvious waiting conflicts or scheduling blockages between tasks. Resource consumption information such as CPU utilization, memory usage, number of disk I / O requests, and average I / O latency can also be recorded, thereby reflecting the resource pressure in the current startup phase.

[0057] In one specific embodiment, time consumption ratio, blocking ratio, and resource usage ratio can be defined as performance data. For example, the time consumption ratio (Time_ratio) is used to represent the proportion of a single task's time to the total window duration, i.e.: Time_ratio = (end_time) / ... The window duration is calculated as follows: `end_time` / `time_total`, where `end_time` is the end time of the task, `start_time` is the start time of the task, and `time_total` is the total window duration. The `Block_ratio` represents the proportion of task blocking time to the total window blocking time, i.e., `Block_ratio = Block_time_task / Block_time_total`, where `Block_time_task` is the blocking time of a specific task, and `Block_time_total` is the total window blocking time. The `Resource_ratio` represents the proportion of task resource usage to the total system resources, i.e., `Resource_ratio = Resource_Usage / System_total_Resource`, where `Resource_Usage` can include CPU usage, memory usage, and I / O bandwidth usage, and `System_total_Resource` represents the corresponding total system resources.

[0058] It can also obtain the weight parameters corresponding to various types of performance data. For example, the time consumption weight Wt can be used to represent the importance of time consumption issues, the blocking weight Wb can be used to represent the importance of blocking issues, and the resource weight Wr can be used to represent the importance of resource consumption issues. Subsequently, the system performs a weighted summation of different performance data based on each weight parameter to obtain the first evaluation data, namely the bottleneck index BI: BI = Wt × Time_ratio + Wb × Block_ratio + Wr × Resource_ratio. The bottleneck index is actually a comprehensive quantitative result of the current startup state. Since different performance indicators may have different degrees of influence on startup performance, weighting through weight parameters can make the final evaluation result more consistent with the actual startup scenario. For example, in some devices, task time consumption issues have a greater impact on startup performance, so the time consumption weight can be increased; while in some resource-constrained devices, resource consumption issues may be more prominent, so the resource weight can be increased.

[0059] Furthermore, the weight parameters can be preset based on the equipment type and historical statistical results, such as Wt=0.5, Wb=0.3, and Wr=0.2. At the same time, the weight parameters in this scheme are not fixed but can be dynamically updated based on the execution effect of subsequent optimization strategies. For example, after each optimization strategy execution, the corresponding weights can be adjusted based on the optimization effect, and the updated weights can be used in the next startup. By dynamically adjusting the weights, the evaluation model can gradually adapt to the actual operating characteristics of the current equipment.

[0060] This embodiment comprehensively analyzes and weights various performance data, including time consumption, blocking, and resource usage, to more fully reflect the overall operation during the startup process. Furthermore, by dynamically updating the weight parameters, the system can gradually develop an evaluation model that better reflects the actual operating characteristics of the device, thereby further improving startup optimization and system startup performance.

[0061] In one specific implementation, after determining the startup optimization strategy based on the first evaluation data, the method further includes: executing the startup optimization strategy and obtaining the second running data of the system during the startup process after executing the startup optimization strategy; determining the second evaluation data based on the second running data; obtaining the change in evaluation data based on the second evaluation data and the first evaluation data; and updating the weight parameters and / or the priority of the startup optimization strategy based on the change in evaluation data.

[0062] In one specific embodiment, the second running data is the running status data re-collected after the startup optimization strategy is executed, and the collection method can be the same as that of the first running data. Subsequently, the second evaluation data can be recalculated based on the second running data. The second evaluation data can also be the aforementioned bottleneck index BI, which is used to characterize the running status corresponding to the current startup state after the optimization strategy is executed. This scheme obtains the change in evaluation data through the difference between the first evaluation data and the second evaluation data, which is used to characterize the degree of change in the system running status before and after optimization. For example, the change in evaluation data can be the difference between the evaluation data before and after the optimization strategy is executed, i.e., BI_before. BI_after; The optimization effect can also be represented by the relative improvement magnitude, i.e., the relative improvement magnitude Effect_score = (BI_before) / (BI_before). BI_after) / BI_before, where Effect_score is used to characterize the degree of improvement that the current startup optimization strategy has on the system startup state.

[0063] The main performance issues affecting system startup are not static; the factors truly impacting startup efficiency can change across different devices, operating environments, and even different startup phases. Therefore, relying solely on preset weight parameters or fixed policy priorities is insufficient for long-term adaptation to real-world operating environments. This solution re-collects operational data after each policy execution and analyzes the changes in evaluation data before and after optimization, essentially enabling the system to provide "feedback evaluation" of the optimization effect.

[0064] After obtaining the changes in the evaluation data, the weight parameters and the priority of the optimization strategies can be updated based on the optimization effect. For example, if a certain type of optimization strategy can significantly reduce the bottleneck index after multiple executions, the priority of that strategy can be increased, making it more likely to be selected in subsequent executions; conversely, if the optimization effect of a certain type of strategy is weak, its priority can be decreased, thereby reducing the frequent execution of ineffective strategies.

[0065] Meanwhile, regarding weighting parameters, if the system consistently finds that a certain performance metric has a more significant impact on startup performance—for example, if blocking issues have a greater impact on BI changes—then the corresponding blocking weight Wb can be gradually increased. Conversely, if resource consumption issues have a smaller impact, the resource weight Wr can be appropriately decreased. In this way, the system can gradually learn the most significant performance bottlenecks during the actual operation of the current device, making the subsequently generated evaluation data more consistent with the actual operating characteristics of the current device.

[0066] In one specific implementation, the priority of the weight parameters and / or the activation of the optimization strategy is updated based on the amount of change in the evaluation data, including: if the amount of change in the evaluation data is less than or equal to a fifth threshold, the priority of the weight parameters and / or the activation of the optimization strategy is lowered based on the amount of change in the evaluation data; if the second evaluation data is greater than the fifth threshold, the priority of the weight parameters and / or the activation of the optimization strategy is increased based on the amount of change in the evaluation data.

[0067] In one specific embodiment, the change in system operating status before and after implementing the startup optimization strategy can be determined by judging the relationship between the change in evaluation data and the fifth threshold. Specifically, the change in evaluation data can be represented by the difference between the evaluation data before and after implementing the optimization strategy, or by the relative improvement magnitude. Both methods can reflect the relationship between the first and second evaluation data, that is, whether the system operating status has improved after implementing the startup optimization strategy. For example, when BI_before is greater than BI_after, it indicates that the bottleneck index of the system has decreased after implementing the optimization strategy, indicating that the time consumption, blocking, or resource consumption during the current startup process has been alleviated, i.e., the system operating status has improved. Conversely, when BI_before is less than or equal to BI_after, it indicates that the current optimization strategy has not produced a significant optimization effect, and may even lead to a decline in the system operating status. The fifth threshold is only used to divide the change in evaluation data into intervals or to determine the effect. It can be understood as a pre-set reference threshold. For example, when the change in evaluation data is greater than the fifth threshold, it can be considered that the improvement effect of the current optimization strategy is relatively significant; when the change in evaluation data is less than or equal to the fifth threshold, it can be considered that the current optimization effect is limited. Since the fifth threshold is only used as an evaluation standard, its specific value can be flexibly set according to the equipment type, historical statistical results or system performance requirements, and is not limited to a fixed value.

[0068] Based on this, when the change in evaluation data indicates that the current optimization strategy has a good optimization effect, the corresponding weight parameters and / or the priority of the startup optimization strategy can be increased. For example, if the bottleneck index decreases significantly after a startup optimization strategy is executed, it indicates that the strategy can effectively improve the performance problem in the current startup scenario. In this case, the weight parameters of the corresponding performance indicator can be increased, making subsequent evaluations focus more on this type of performance characteristic. At the same time, the priority of this startup optimization strategy in the corresponding strategy set can also be increased, making the system more inclined to choose this strategy in subsequent startups. Conversely, when the change in evaluation data indicates that the current optimization strategy has a poor optimization effect or does not significantly improve the system's operating state, the corresponding weight parameters and / or the priority of the startup optimization strategy can be decreased. For example, if the bottleneck index changes little or even increases further after a strategy is executed, it indicates that the strategy has low adaptability to the current startup scenario. In this case, the priority of the corresponding strategy can be decreased to reduce the likelihood of repeated execution of the strategy in the future. At the same time, the weight parameters of the corresponding performance indicator can also be decreased to avoid assigning too much influence to this type of performance characteristic in subsequent evaluations. Specifically, an adjustment step size can be preset, and the adjustment amount can be obtained by multiplying the change in the evaluation data by the adjustment step size.

[0069] Through the above methods, the system can dynamically adjust the evaluation model and strategy ranking relationship based on historical optimization results, thereby gradually forming a startup optimization mechanism that is more in line with the current operating characteristics of the equipment, further improving the accuracy of subsequent startup optimization strategy selection and system startup performance.

[0070] As a specific embodiment, such as Figure 3 As shown, during device startup, real-time operational data is collected, such as task time, blocking time, and CPU, memory, and I / O resource usage. Subsequently, pre-stored weight parameters are read, and the current bottleneck index (BI) is calculated based on the collected operational data to characterize the operational status during the current startup phase. After obtaining the bottleneck index BI, a corresponding candidate strategy library is determined based on the BI's range, and a matching startup optimization strategy is selected and executed from the candidate strategy library. For example, when the main problem during the current startup process is task time consumption, optimization strategies that reduce task time consumption can be prioritized; when both blocking and resource consumption problems exist, a corresponding combined optimization strategy can be selected. Further, as... Figure 4As shown, after the startup optimization strategy is executed, running data is re-collected, and the optimized bottleneck index (BI) is recalculated. Then, the optimization effect score (Effect_score) is calculated based on the bottleneck index before and after optimization to determine whether the current strategy effectively improves startup performance. Next, the original priority and weight parameters of the current strategy are read, and updated according to the Effect_score. For example, when the optimization effect of a strategy is good, the priority and corresponding weight parameters of the strategy can be increased; when the optimization effect is poor, the corresponding priority and weight parameters are decreased. Finally, the updated parameters are stored for continued use in subsequent boot processes, thus forming a dynamic closed-loop optimization mechanism to improve system startup performance.

[0071] To better implement the startup optimization method in the embodiments of this application, a startup optimization device is also provided in the embodiments of this application, such as... Figure 5 As shown, the startup optimization device 500 includes: The acquisition module 510 is used to acquire weight parameters and the first running data of the system during startup; The first determining module 520 is used to determine the first evaluation data of the system during the startup process based on the weight parameters and the first running data. The second determining module 530 is used to determine the startup optimization strategy based on the first evaluation data.

[0072] In this embodiment, by acquiring the first operating data of the system during the startup process, determining the first evaluation data based on the first operating data, evaluating the current startup process, and determining the startup optimization strategy based on the first evaluation data, the adopted optimization strategy can be matched with the current startup state. Therefore, corresponding startup optimization strategies can be determined based on the corresponding evaluation results under different startup states, thereby improving the rationality of resource scheduling and the execution efficiency of the startup process, and improving system startup performance.

[0073] In some embodiments of this application, the second determining module 530 determines the activation optimization strategy based on the first evaluation data, including: Based on the first evaluation data, a candidate strategy library was determined; Determine the startup optimization strategy from the candidate strategy library.

[0074] In some embodiments of this application, the second determining module 530 determines a candidate strategy library based on the first evaluation data, including: When the first evaluation data is greater than or equal to the first threshold and less than the second threshold, the candidate strategy library is determined as the first strategy library; When the first evaluation data is greater than or equal to the second threshold and less than the third threshold, the candidate strategy library is determined as the second strategy library; When the first evaluation data is greater than or equal to the third threshold and less than or equal to the fourth threshold, the candidate policy library is determined to be the third policy library.

[0075] In some embodiments of this application, the second determining module 530 determines a startup optimization strategy from a candidate strategy library, including: If an optimization strategy that matches the first performance data exists in the candidate strategy library, the matching optimization strategy is determined as the starting optimization strategy, wherein the first performance data is used to characterize the statistical features of the first running data. If no optimization strategy matching the first performance data exists in the candidate strategy library, the optimization strategy with the highest priority in the candidate strategy library is determined as the startup optimization strategy.

[0076] In some embodiments of this application, the first determining module 520 determines the first evaluation data of the system during the startup process based on the first running data, including: Statistical analysis of the initial running data is performed to determine the initial performance data of the system during startup. Obtain the weight parameters corresponding to the first performance data; The first performance data is obtained by weighted summation based on the weight parameters.

[0077] In some embodiments of this application, after determining the startup optimization strategy based on the first evaluation data, the startup optimization device 500 is further configured to: Execute the startup optimization strategy and obtain the second runtime data of the system during the startup process after the startup optimization strategy is executed; Based on the second operational data, determine the second evaluation data; Based on the second assessment data and the first assessment data, the change in assessment data is obtained; Based on the changes in the evaluation data, update the weight parameters and / or the priority of the activation optimization strategy.

[0078] In some embodiments of this application, the initiation optimization device 500 updates the weight parameters and / or the priority of the initiation optimization strategy based on the change in evaluation data, including: If the change in the evaluation data is less than or equal to the fifth threshold, adjust the weight parameters and / or activate the priority of the optimization strategy based on the change in the evaluation data. If the second evaluation data is greater than the fifth threshold, increase the weight parameters and / or activate the priority of the optimization strategy based on the change in the evaluation data.

[0079] This application embodiment also provides a terminal device that integrates any of the startup optimization devices provided in this application embodiment. The terminal device includes: One or more processors; Memory; and One or more applications, wherein the applications are stored in memory and configured to be executed by a processor from the steps of the startup optimization method in any of the above-described startup optimization method embodiments.

[0080] This application also provides a terminal device that integrates any of the startup optimization devices provided in this application. For example... Figure 6 As shown, it illustrates a structural schematic diagram of the terminal device involved in the embodiments of this application. Specifically: The terminal device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will understand that... Figure 6 The terminal device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 601 is the control center of the terminal device. It connects various parts of the terminal device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 602, and by calling data stored in the memory 602, it performs various functions and processes data of the terminal device, thereby providing overall monitoring of the terminal device. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 601.

[0081] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 602 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 602 may also include a memory controller to provide the processor 601 with access to the memory 602.

[0082] The terminal device also includes a power supply 603 that supplies power to the various components. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 603 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

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

[0084] 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 601 in the terminal device loads the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 runs the applications stored in the memory 602 to realize various functions, as follows: Obtain the initial runtime data of the system during startup; Based on the initial operational data, determine the initial evaluation data of the system during the startup process; Based on the initial assessment data, an optimization strategy was determined.

[0085] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0086] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the startup optimization methods provided in embodiments of this application. For example, the computer program loaded by the processor can execute the following steps: Obtain the initial runtime data of the system during startup; Based on the initial operational data, determine the initial evaluation data of the system during the startup process; Based on the initial assessment data, an optimization strategy was determined.

[0087] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.

[0088] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, which will not be repeated here.

[0089] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0090] The above provides a detailed description of a startup optimization method, apparatus, terminal device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A start-up optimization method, characterized by, include: Obtain the initial runtime data of the system during startup; Based on the first operational data, determine the first evaluation data of the system during the startup process; Based on the first evaluation data, an optimization strategy is determined.

2. The startup optimization method according to claim 1, characterized in that, The step of determining the activation optimization strategy based on the first evaluation data includes: Based on the first evaluation data, a candidate strategy library is determined; The startup optimization strategy is determined from the candidate strategy library.

3. The startup optimization method according to claim 2, characterized in that, The step of determining the candidate strategy library based on the first evaluation data includes: When the first evaluation data is greater than or equal to the first threshold and less than the second threshold, the candidate strategy library is determined to be the first strategy library; When the first evaluation data is greater than or equal to the second threshold and less than the third threshold, the candidate strategy library is determined to be the second strategy library; When the first evaluation data is greater than or equal to the third threshold and less than or equal to the fourth threshold, the candidate strategy library is determined to be the third strategy library.

4. The startup optimization method according to claim 2, characterized in that, Determining the startup optimization strategy from the candidate strategy library includes: If an optimization strategy that matches the first performance data exists in the candidate strategy library, the matching optimization strategy is determined as the startup optimization strategy, wherein the first performance data is used to characterize the statistical features of the first running data. If no optimization strategy matching the first performance data exists in the candidate strategy library, the optimization strategy with the highest priority in the candidate strategy library is determined as the startup optimization strategy.

5. The startup optimization method according to claim 1, characterized in that, The step of determining the first evaluation data of the system during the startup process based on the first operational data includes: The first running data is statistically analyzed to determine the first performance data of the system during the startup process; Obtain the weight parameters corresponding to the first performance data; The first performance data is obtained by weighted summation based on the weight parameters.

6. The startup optimization method according to claim 5, characterized in that, After determining the activation optimization strategy based on the first evaluation data, the method further includes: Execute the startup optimization strategy and obtain the second running data of the system during the startup process after executing the startup optimization strategy; Based on the second operational data, determine the second evaluation data; Based on the second evaluation data and the first evaluation data, the change in evaluation data is obtained; Based on the changes in the evaluation data, the weight parameters and / or the priority of the startup optimization strategy are updated.

7. The startup optimization method according to claim 6, characterized in that, The step of updating the weight parameters and / or the priority of the activation optimization strategy based on the changes in the evaluation data includes: If the change in the evaluation data is less than or equal to the fifth threshold, the weight parameter and / or the priority of the activation optimization strategy shall be reduced according to the change in the evaluation data. If the second evaluation data is greater than the fifth threshold, the priority of the weight parameter and / or the activation optimization strategy is increased based on the change in the evaluation data.

8. A startup optimization device, characterized in that, include: The acquisition module is used to acquire weight parameters and the initial running data of the system during startup. The first determining module is used to determine the first evaluation data of the system during the startup process based on the weight parameters and the first running data; The second determining module is used to determine the startup optimization strategy based on the first evaluation data.

9. A terminal device, characterized in that, The terminal device includes: one or more processors, a memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the startup optimization method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to perform the steps of the startup optimization method according to any one of claims 1 to 7.