Sectional loading method and device for firmware in starting process of network set top box

By loading firmware in segmented parts of the network set-top box, establishing a five-dimensional state vector monitoring system and Markov decision-making process, dynamically adjusting the loading strategy, solving the problems of long startup time and resource conflict in traditional firmware loading methods, and achieving an efficient and stable startup process.

CN120407033AActive Publication Date: 2025-08-01SHENZHEN YUEXINTONG TECH CO LTD

Patent Information

Application Number
CN202510901291.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-08-01
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

The traditional network set-top box firmware loading method cannot be dynamically adjusted according to actual network conditions, hardware resources and user needs, resulting in a long startup time and lack of real-time monitoring and optimization of system status, which is prone to resource conflicts and loading failures.

Method used

By loading firmware segments on the network set-top box, a five-dimensional state vector monitoring system is established, combining Markov decision-making process and deep reinforcement learning network, the loading strategy is dynamically adjusted to ensure that the loading strategy matches the hardware environment, and key firmware segments are preferred.

Benefits of technology

Significantly shortens startup time, improves loading efficiency and stability, improves user experience, adapts to changes in the network environment, and ensures intelligent optimization and adaptive adjustment of loading strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407033A_ABST
    Figure CN120407033A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of network set top boxes, and discloses a firmware segmented loading method and device in the starting process of a network set top box. The method comprises the following steps: performing firmware division on the network set top box to obtain a firmware segment set and an inter-segment dependency relationship matrix; determining a real-time state vector of the starting state based on hardware sensor data of the network set top box; performing starting stage identification on the network set top box according to the real-time state vector to obtain a current starting stage identifier and a time sequence optimization condition parameter; carrying out loading decision and Markov state transition analysis on the firmware segment set based on the current starting stage identifier and the inter-segment dependency relationship matrix to obtain a loading action sequence; and carrying out target path loading on the firmware segment set according to the loading action sequence and the time sequence optimization condition parameters to obtain a loading execution result. According to the method, the firmware segments can be flexibly combined and dynamically scheduled according to actual requirements, and the loading efficiency and stability under different network conditions are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network set-top boxes, and particularly to a method and device for segmental firmware loading during the startup process of a network set-top box. Background Art

[0002] Network set-top boxes need to complete complex tasks such as hardware initialization, network connection establishment, audio and video decoder loading, and user interface display during the startup process. The execution efficiency of these tasks directly affects the user's startup experience and the market competitiveness of the device. However, traditional network set-top boxes generally adopt a linear firmware loading method, that is, each firmware module is loaded one by one in a preset fixed order. This method cannot be dynamically adjusted according to the actual network conditions, hardware resources, and user requirements, resulting in a long startup time and an excessive waiting time for users.

[0003] Existing firmware loading technologies have multiple key problems that limit the startup performance of network set-top boxes. Traditional methods lack the ability to monitor and analyze the system state in real time during the startup process, and cannot perceive key parameters such as network bandwidth fluctuations, memory occupancy changes, decoder readiness status, and chip temperature, resulting in a disconnection between the loading strategy and the actual hardware environment. Existing technologies ignore the complex dependencies between firmware segments and fail to build an effective dependency model to guide the optimization of the loading order, easily resulting in resource conflicts and loading failures. Traditional loading methods lack an intelligent decision-making mechanism and cannot dynamically adjust the loading strategy according to the characteristics of the current startup stage and the system state, nor do they consider the requirements of actual application scenarios such as network interruption recovery and hardware thermal protection. Summary of the Invention

[0004] The main object of the present invention is to provide a method and device for segmental firmware loading during the startup process of a network set-top box, which enables the firmware segments to be flexibly combined and dynamically scheduled according to actual needs, ensuring the loading efficiency and stability under different network conditions.

[0005] To achieve the above object, the present invention provides a method for segmental firmware loading during the startup process of a network set-top box, including the following steps: Partition the firmware of the network set-top box to obtain a firmware segment set and an inter-segment dependency matrix; Determine the real-time state vector of the startup state based on the hardware sensor data of the network set-top box; Identify the startup stage of the network set-top box according to the real-time state vector to obtain the current startup stage identifier and the timing optimization condition parameters; Based on the current startup stage identifier and the inter-segment dependency matrix, perform loading decision-making and Markov state transition analysis on the firmware segment set to obtain a loading action sequence; Perform target path loading on the set of firmware segments according to the loading action sequence and the timing optimization condition parameters to obtain a loading execution result.

[0006] Optionally, in the first implementation manner of the first aspect of the present invention, the partitioning of the firmware of the network set-top box to obtain a set of firmware segments and an inter-segment dependency matrix includes: Perform firmware hierarchical partitioning on the network set-top box according to a four-stage startup architecture of a boot layer, a network layer, a decoding layer, and an interaction layer to obtain a boot layer firmware module, a network layer firmware module, a decoding layer firmware module, and an interaction layer firmware module; Perform function analysis based on the boot layer firmware module, the network layer firmware module, the decoding layer firmware module, and the interaction layer firmware module to obtain a set of firmware segments including core function segments and extended function segments; Calculate the inter-segment dependency strength for the call relationships of each firmware segment in the set of firmware segments to obtain an inter-segment dependency matrix.

[0007] Optionally, in the second implementation manner of the first aspect of the present invention, the determining a real-time state vector of the startup state based on the hardware sensor data of the network set-top box includes: Collect data from the temperature sensor, memory monitor, network interface, and decoder status register of the network set-top box to obtain hardware sensor data, where the hardware sensor data includes a chip temperature value, a memory occupancy value, network connection parameters, and decoder status parameters; Classify and quantify the hardware sensor data according to the current loading segment number, network connection status, decoder readiness, memory occupancy rate, and chip temperature to obtain five-dimensional classification and quantification parameters, where the five-dimensional classification and quantification parameters include a current loading segment identification parameter, a network connection status parameter, a decoder readiness parameter, a memory occupancy rate parameter, and a chip temperature parameter; Perform vector conversion on the five-dimensional classification and quantification parameters according to the startup state of the network set-top box to obtain a real-time state vector.

[0008] Optionally, in the third implementation manner of the first aspect of the present invention, the identifying the startup stage of the network set-top box according to the real-time state vector to obtain a current startup stage identifier and timing optimization condition parameters includes: Perform change pattern analysis on the real-time state vector to obtain stage transition determination parameters including a boot layer transition condition, a network layer transition condition, a decoding layer transition condition, and an interaction layer transition condition; Determine a current startup stage identifier corresponding to a boot layer stage, a network layer stage, a decoding layer stage, or an interaction layer stage based on the stage transition determination parameters; Calculate the timing optimization condition parameter according to the current startup phase identifier and the network connection status parameter and decoder readiness parameter in the real-time state vector.

[0009] Optionally, in the fourth implementation manner of the first aspect of the present invention, the calculating the timing optimization condition parameter according to the current startup phase identifier and the network connection status parameter and decoder readiness parameter in the real-time state vector includes: Perform bandwidth utilization rate and connection stability analysis on the network connection status parameter in the real-time state vector to obtain a network bandwidth analysis parameter; Perform bandwidth fluctuation degree analysis based on the network bandwidth analysis parameter to obtain a network bandwidth fluctuation coefficient; Calculate the time delay of the hardware initialization progress and software library loading status of the audio and video decoder according to the decoder readiness parameter in the real-time state vector, and obtain the decoder initialization time delay from the start of the audio and video decoder to full readiness; Determine a threshold for the user interaction response requirement based on the current startup phase identifier, and obtain a timing optimization condition parameter including the network bandwidth fluctuation coefficient, the decoder initialization time delay, and the user interaction response threshold for the current startup phase.

[0010] Optionally, in the fifth implementation manner of the first aspect of the present invention, the performing loading decision and Markov state transition analysis on the firmware segment set based on the current startup phase identifier and the inter-segment dependency matrix to obtain a loading action sequence includes: Construct a hierarchical state space including a boot layer state set, a network layer state set, a decoding layer state set, and an interaction layer state set based on the current startup phase identifier, and a firmware segment loading action space including an immediate loading action, a preloading action, a delayed loading action, and a priority adjustment action; Calculate a dynamic state transition probability parameter according to the inter-segment dependency matrix and the network set-top box hardware limitation conditions; Set constraint conditions and a reward mechanism based on the dynamic state transition probability parameter to obtain a set of constraint conditions including a memory constraint condition, a temperature constraint condition, a dependency constraint condition, and a time constraint condition, and a reward function parameter including a loading success reward, a constraint violation penalty, an early completion reward, and a network interruption recovery reward; Input the hierarchical state space, the firmware segment loading action space, the set of constraint conditions, and the reward function parameter into a Markov decision process to solve for an optimal policy, and obtain a loading action sequence for the firmware segment set.

[0011] Optionally, in the sixth implementation manner of the first aspect of the present invention, the step of inputting the hierarchical state space, the firmware segment loading action space, the set of constraint conditions, and the reward function parameters into a Markov decision process to solve for an optimal policy and obtain a loading action sequence for the set of firmware segments includes: Perform state encoding and action encoding on the hierarchical state space, the firmware segment loading action space, the set of constraint conditions, and the reward function parameters to obtain Markov decision input parameters; Construct a DQN decision network for the startup stage perception of the set-top box based on the Markov decision input parameters. The DQN decision network includes a state input layer, a hidden calculation layer, an action output layer, and a constraint check layer; Perform value function iteration and policy gradient optimization on the firmware segment loading policy according to the DQN decision network to obtain Markov optimal policy parameters; Generate an action sequence for the set of firmware segments based on the Markov optimal policy parameters to obtain a loading action sequence.

[0012] Optionally, in the seventh implementation manner of the first aspect of the present invention, the step of performing target path loading on the set of firmware segments according to the loading action sequence and the timing optimization condition parameters to obtain a loading execution result includes: Identify target loading path parameters based on the immediate loading actions, preloading actions, delayed loading actions, and priority adjustment actions in the loading action sequence; Perform network adaptive segmentation on the set of firmware segments according to the network bandwidth fluctuation coefficient in the timing optimization condition parameters to obtain hierarchical loading scheduling parameters; Perform temperature constraint loading execution on the set of firmware segments according to the hierarchical loading scheduling parameters to obtain a loading execution result.

[0013] Optionally, in the eighth implementation manner of the first aspect of the present invention, the step of performing temperature constraint loading execution on the set of firmware segments according to the hierarchical loading scheduling parameters to obtain a loading execution result includes: Perform temperature safety threshold checks on the high-priority queue, medium-priority queue, and low-priority queue in the hierarchical loading scheduling parameters to obtain a temperature constraint scheduling strategy; Perform temperature change prediction for the loading process based on the temperature constraint scheduling strategy and the current chip temperature parameters to obtain temperature prediction parameters; Perform success rate analysis and pruning on the historical loading decision path according to the temperature prediction parameters to obtain a target loading decision tree; Perform staged temperature constraint loading execution on the set of firmware segments based on the target loading decision tree to obtain a loading execution result.

[0014] The present invention also provides a firmware segmented loading device during the startup process of a network set-top box, including: A firmware partitioning module, configured to partition the firmware of the network set-top box to obtain a firmware segment set and an inter-segment dependency relationship matrix; A status analysis module, configured to determine a real-time status vector of the startup status based on the hardware sensor data of the network set-top box; A stage identification module, configured to identify the startup stage of the network set-top box according to the real-time status vector to obtain a current startup stage identifier and a timing optimization condition parameter; A loading decision module, configured to perform loading decision-making and Markov state transition analysis on the firmware segment set based on the current startup stage identifier and the inter-segment dependency relationship matrix to obtain a loading action sequence; A path loading module, configured to perform target path loading on the firmware segment set according to the loading action sequence and the timing optimization condition parameter to obtain a loading execution result.

[0015] In summary, the technical solution provided by the present invention: By precisely dividing the network set-top box firmware into four-stage startup architectures of the guiding layer, network layer, decoding layer, and interaction layer, and further subdividing it into core function segments and extended function segments, it breaks through the technical limitations of the traditional firmware's overall loading, enabling the firmware segments to be flexibly combined and dynamically scheduled according to actual needs. The present invention establishes a five-dimensional state vector monitoring system including the current loading segment identifier, network connection status, decoder readiness, memory occupancy rate, and chip temperature, overcoming the technical defect of the prior art relying only on a single startup progress indicator, being able to comprehensively perceive the changes in the operating state of the network set-top box, providing multi-dimensional real-time data support for the loading decision, and enabling the loading strategy to accurately match the current hardware environment and system state. The present invention realizes the accurate identification of the startup phase through the analysis of the change pattern of the real-time state vector, getting rid of the technical limitation of the traditional method that relies on fixed time nodes to judge the startup phase, being able to dynamically determine the current startup phase according to the actual operating state of the system, and calculating the timing optimization condition parameters including the network bandwidth fluctuation coefficient, decoder initialization delay, and user interaction response threshold. The present invention models the firmware segmented loading problem as a constrained hierarchical Markov decision process, constructs a complete decision framework including a hierarchical state space, a firmware segment loading action space, a set of constraint conditions, and reward function parameters, solves the technical problem that the traditional static loading strategy cannot adapt to dynamic environmental changes, and realizes the intelligent optimization and adaptive adjustment of the loading strategy through a deep reinforcement learning network. The present invention identifies the critical path during the startup process by analyzing the dependency relationship between firmware segments, and sets the highest loading priority for the firmware segments on the critical path, breaking through the efficiency bottleneck of the traditional sequential loading method, being able to ensure that the critical firmware segments affecting the startup performance are loaded first, thus significantly shortening the overall startup time and improving the user experience. The present invention dynamically adjusts the segmentation granularity of the firmware segments according to the real-time network state, adopts a fine-grained segmentation strategy for parallel loading when the network condition is good, and adopts a coarse-grained segmentation strategy to reduce the network request overhead when the network condition is poor, overcoming the technical defect of the prior art that cannot adapt to network environment changes, and ensuring the loading efficiency and stability under different network conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a schematic diagram of the steps of the firmware segmented loading method during the startup process of a network set-top box in an embodiment of the present invention; Figure 2 is a structural block diagram of the firmware segmented loading device during the startup process of a network set-top box in an embodiment of the present invention.

[0017] The realization, functional features, and advantages of the objectives of the present invention will be further described in conjunction with the embodiments with reference to the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0018] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not used to limit the present invention.

[0019] Referring to Figure 1 , this embodiment provides a method for segmented loading of firmware during the startup process of a network set-top box, including the following steps: S1, partition the firmware of the network set-top box to obtain a firmware segment set and an inter-segment dependency matrix; Among them, according to the four-stage startup architecture of the boot layer, network layer, decoding layer, and interaction layer, the entire system firmware is hierarchically partitioned. Among them, the boot layer is mainly responsible for the initialization of the underlying hardware and the loading of the bootloader, which is the startup basis for all subsequent functions; the network layer is mainly responsible for connection management, IP protocol stack initialization, and configuration tasks, which is the pre-stage for establishing the data channel; the decoding layer is responsible for the driver loading of the audio and video decoders and related media processing tasks, and undertakes the parsing ability of the media content; the interaction layer is the user-visible interface display and interaction logic execution layer, which involves the loading of the application framework, UI response, and control logic. By logically partitioning the entire firmware space according to these four stages, preliminary firmware modules for the boot layer, network layer, decoding layer, and interaction layer are formed. On the basis of completing the logical layer partitioning, a more fine-grained functional module analysis is carried out on the functional composition within each layer to distinguish the core functional segments important for the startup process and the extended functional segments belonging to the category of functional extension and optimization. The core functional segments include the drivers, interface protocols, service routines, etc. required for minimal startup, such as the SOC initialization code, clock manager configuration code, DDR controller configuration program, etc. in the boot layer; while the extended functional segments include components that enhance performance or experience, such as the QoS management unit in the network layer or the animation rendering module in the interaction layer. After summarizing this hierarchical induction result, a firmware segment set containing various roles and different functional depths is formed, and this set reflects the structural organization of the firmware functions in space. Systematically analyze the call relationship between any two firmware segments in the firmware segment set. This analysis process is carried out based on the actual call path and time sequence during the startup process between the firmware segments, and the dependency strength between each pair of segments is comprehensively calculated through means such as static call graph analysis, startup log tracking, and symbol dependency analysis. The dependency strength not only depends on the call frequency and trigger delay, but is also affected by the criticality of the call and the timing sensitivity. For example, if a certain segment must run after another segment is initialized, and there are frequent state references or shared buffers, then its dependency relationship should have a higher weight. Therefore, on this basis, an inter-segment dependency matrix is constructed, which indicates the dependency direction and quantifies the dependency strength coefficient between each pair of segments.

[0020] S2. Determine a real-time state vector of the startup state based on the hardware sensor data of the network set-top box; Specifically, data is collected from the temperature sensor, memory monitor, network interface, and decoder status register of the network set-top box to obtain a hardware operation state data set. The chip temperature value is provided by a thermal sensor integrated in the CPU or GPU and is read through the I 2 C or SPI bus cycle; the memory occupancy value is obtained by the operating system layer acquiring the usage rate information of the heap area and stack area and combining the cache hit rate data to form an overall memory occupancy index; the network connection parameters are output by the connection status register of the Ethernet or WiFi module, involving whether the current connection is established, connection rate, bandwidth usage, and connection packet loss statistics; and the decoder status parameters come from the status register of the decoder driver, which records key information such as the hardware initialization progress of the decoder, decoding ability test feedback, and current operable state. Based on the above data sets from different modules, the original sensor data is classified and quantized according to the key dimensions involved in the startup process to construct five-dimensional classification and quantization parameters with discriminative ability. These five parameters are the current loaded segment identification parameter, network connection status parameter, decoder readiness parameter, memory occupancy rate parameter, and chip temperature parameter. Among them, the current loaded segment identification parameter is constructed based on the status record bitmap of the loaded firmware segment in the startup process control module, and the currently loaded segment set can be marked by setting bit flags; the network connection status parameter combines the bandwidth utilization rate and connection packet loss frequency and is classified by setting the stability level, for example, divided into four levels: disconnected, unstable, available, and high-quality; the decoder readiness parameter comprehensively determines whether it meets the available standard based on the percentage of decoder initialization completion and the operation state flag bit, and represents the current readiness level in percentile; the memory occupancy rate parameter takes the actual memory usage percentage as the core and evaluates the overall resource pressure in combination with the memory fragmentation rate; the chip temperature parameter directly collects the value by the temperature sensor and is classified according to the set safe temperature range to determine whether there is an overheating risk. After the quantization classification of each dimension parameter, it is mapped into a unified vector expression form to form a five-dimensional real-time state vector. This vector encapsulates the dynamic values of all dimensions into a set of joint observation data at time t.

[0021] S3. Identify the startup stage of the network set-top box according to the real-time state vector to obtain the current startup stage identification and timing optimization condition parameters; It should be noted that, based on the real-time state vector as the basic input for dynamic analysis of continuous change trends, by deconstructing the change patterns of the parameters in each dimension of this vector on the time axis, key feature boundaries that can be used to divide the startup stage are extracted. This process integrates the time-series deduction mechanism of historical trends and state jumps, that is, by jointly modeling the change slopes, boundary crossing points, state stable times, and abnormal jitter amplitudes of different dimensions in the real-time state vector sequence, the determination criteria for the transition conditions in the startup stage are derived. During the conversion process of each stage, the corresponding determination parameters are extracted: for the conversion from the boot layer to the network layer, it is determined whether the core function segment of the boot layer has been completely loaded and the current chip temperature is below the safety threshold. Therefore, when the current loading segment identification parameter in the real-time state vector has covered all the core segments of the boot layer and the chip temperature parameter is lower than the set safety temperature threshold, the stage transition from the boot layer to the network layer can be triggered; for the conversion from the network layer to the decoding layer, the stability level and packet loss rate of the network connection state parameters are comprehensively considered to ensure that the network environment is available and address acquisition and connection establishment are completed; and for the conversion from the decoding layer to the interaction layer, it is necessary to determine whether the decoder is fully initialized and passes the readiness test, and at the same time ensure that the memory resources are within the supportable range. Therefore, when the decoder readiness parameter exceeds the specified readiness threshold and the memory occupancy rate is within the controllable range, the system determines that it has entered the interaction layer stage. All these determination bases are uniformly encapsulated into a set of stage transition determination parameters. This set of parameters, as the core threshold vector of the state classifier, is continuously updated and iteratively trained within the system to adapt to the differences in different versions of firmware, hardware specifications, and external operating conditions. Calculate the timing optimization condition parameters according to the current startup stage identifier and the network connection state parameter and decoder readiness parameter in the real-time state vector. Establish a timing sensitivity mapping model specific to the startup stage, that is, there are significant differences in the response characteristics of different stages to resource changes. For example, in the network layer stage, the network connection state parameter has the greatest impact on the loading efficiency. Therefore, the bandwidth fluctuation coefficient, connection stability, and link establishment time are used as input factors with higher weights; while in the decoding stage, the improvement speed and initial delay of the decoder readiness will dominate the sorting of the loading strategy. Therefore, the growth rate of the decoder readiness percentage and the initial loading delay are used to construct the prediction model; in the interaction stage, the memory occupancy rate and chip temperature become the key factors determining the loading order and thread scheduling. The functional relationships between these dynamic variables and the system performance indicators jointly form a set of timing optimization parameter generation algorithms through model training and policy mapping, and finally output a parameter set representing the optimal conditions for the current stage loading priority strategy.

[0022] Analyze the bandwidth utilization and connection stability of the network connection status parameters in the real-time status vector. During the startup process of the network set-top box, when the system is in the network layer or about to transition to the decoding layer, the real-time evaluation of the network connection status has a high influence on the decision-making of the firmware loading order. Therefore, the network connection status parameters in the real-time status vector are used as input data to jointly analyze the current network bandwidth utilization and connection stability. During the analysis of bandwidth utilization, monitor the proportional relationship between the current throughput capacity and the target connection bandwidth, and combine indicators such as the number of connection interruptions, average response latency, and retransmission rate to form an overall evaluation of the connection stability status. By modeling the change trend of these data in the time dimension, calculate the network bandwidth fluctuation coefficient representing the degree of network condition fluctuation. This coefficient is understood as the inverse representation of network stability. When this value approaches 1, it indicates that the network state is stable and predictable. When it exceeds 1.5, it means that the network state fluctuates violently and there is a potential latency risk. When it is below 0.5, it means that the network is extremely unstable and connection interruptions may occur, so it is not suitable for loading large segments of firmware. The result of this coefficient will be used as the judgment basis for the startup scheduling system to evaluate "whether the network module should be loaded first". At the same time, when the system is about to enter the decoding stage or in the middle of the decoder initialization process, calculate the hardware initialization and software library loading progress of the audio and video decoder based on the decoder readiness parameter. The decoder readiness is not the result of a single-value mapping, but covers multiple subprocesses such as the initialization of underlying hardware registers, driver loading, codec algorithm library linking and testing. Therefore, by parsing the corresponding readiness value in the real-time status vector and reverse-deriving its growth path, calculate the time experienced from the decoder startup trigger point to the executable state, that is, the decoder initialization latency. According to the specific identifier of the current stage, such as whether it has entered the interaction stage or is at the critical point of decoding to the interaction stage, quantitatively set the user interaction response requirements with reference to the stage context, and then determine a reasonable user response time threshold. This threshold is formulated based on user experience research. For example, in the interaction layer stage, the system should complete the response within the set millisecond range after the first user click, otherwise it will affect the perceived fluency. In the decoding layer stage, this threshold can be appropriately relaxed. Therefore, dynamically adjust this threshold in combination with the startup stage determination result and the current hardware state to reflect the balance between the realistic performance goal and the stage-by-stage fault tolerance requirement. Integrate the network bandwidth fluctuation coefficient, decoder initialization latency, and user interaction response threshold corresponding to the current startup stage obtained in the above analysis to form a set of composite timing optimization condition parameters.

[0023] S4. Based on the current startup stage identifier and the inter-segment dependency matrix, make a loading decision on the firmware segment set and perform a Markov state transition analysis to obtain a loading action sequence; Specifically, a hierarchical state space is constructed based on the current startup phase of the network set-top box. According to the four-phase startup architecture, the state space divides the state set into a boot layer state set, a network layer state set, a decoding layer state set, and an interaction layer state set. Each state set contains multiple sub-states representing the loading state, such as not loaded, loading, loaded, etc., thus forming a state space system that covers the complete startup process and has phase specificity. The corresponding loading action space includes four basic types of control behaviors, namely, the immediate loading action, which is used for rapid loading in case of emergency or dependence on critical segments; the preloading action, which is used to prepare the required modules in advance for the upcoming phase; the delayed loading action, which is used for sequential postponed scheduling when resources are limited; and the priority adjustment action, which is used to reorder the loading priorities of firmware segments when sudden condition changes occur to achieve global resource reallocation. Based on the construction of the state space and the action space, combined with the inter-segment dependence relationship matrix and hardware operation limitations (such as the current CPU load, memory margin, chip temperature, etc.), the transition probability between states is dynamically modeled. The core of the transition probability function is to quantify the likelihood of transitioning from one firmware segment loading state to another in the current environment. This process comprehensively considers the structural dependence strength between firmware segments, whether the current available resources meet the loading conditions of the next segment, and the execution result of the previous loading action, thus generating a set of dynamic state transition probability parameters. These parameters will be adjusted as the real-time state vector is updated during operation, enabling the Markov process to have self-adaptability and environmental awareness. After obtaining the state transition probability model, a set of constraint condition sets for controlling the loading decision boundary and reward function parameters for guiding the system policy towards the optimal path are introduced. The constraint condition set includes a memory constraint condition, which is used to ensure that stack overflow or memory fragmentation deterioration will not occur during the loading process; a temperature constraint condition, which is used to prevent the chip from operating at a high temperature for a long time, resulting in performance degradation or even damage; a dependence relationship constraint condition, which is used to enforce the integrity of all dependence paths and ensure that the dependent segment is loaded before the dependent segment; and a time constraint condition, which ensures that the firmware segments on the critical path are loaded within the maximum tolerance time to meet the user experience requirements. The reward function parameters are used to evaluate the policy benefits of the loading behavior. For example, a positive reward can be obtained for successfully completing the loading of a certain firmware segment, an additional reward can be obtained for completing the loading of a critical segment in advance, while a large negative penalty will be imposed if any of the above constraints are violated. At the same time, a positive incentive is also given to the action of restoring the connection and completing the loading in the network fluctuation scenario. These reward and punishment mechanisms act together on the policy convergence process, guiding the system to select the path sequence with the best performance and the least risk among numerous possible loading paths.Input the constructed hierarchical state space, firmware segment loading action space, dynamic state transition probability parameters, set of constraint conditions, and reward function parameters into the Markov decision process model, and solve for the optimal policy through reinforcement learning algorithms such as value iteration or policy iteration. The goal of this solution process is to maximize the long-term cumulative reward under the given constraint conditions, so as to obtain a set of optimal loading action sequences for the set of firmware segments.

[0024] Discretize or perform embedded encoding on the elements in each state set, mapping information such as the loading status, resource occupancy, and dependency completion of each specific firmware segment in the boot layer, network layer, decoding layer, and interaction layer into a vectorized state representation. At the same time, control instructions such as "load immediately", "preload", "delayed load", and "priority adjustment" in the loading action space are transformed into action vectors of a fixed dimension through an independent action encoding function. On this basis, a numerical expression form of the constraint function is generated for each type of constraint condition (including memory limit, temperature boundary, dependency integrity, and time requirement), and each reward function (such as loading success reward, early completion reward, constraint violation penalty, network recovery reward) is subjected to amplitude setting and weight normalization processing, and combined to form the input parameters of the Markov decision, and this parameter set constitutes the standard interaction structure between state-action-feedback. After obtaining the structured input, a deep Q-network (DQN) decision-making architecture with stage perception ability is constructed, which includes a state input layer, a hidden calculation layer, an action output layer, and a nested constraint check layer. The state input layer is used to receive the state vector of the current system and send it into the subsequent calculation network; the hidden calculation layer consists of multiple fully connected neural networks, and its task is to extract features and perform non-linear mapping on the high-dimensional interaction relationship of the complex state and action space; the action output layer outputs the Q-value estimation results of all executable actions, indicating the value of executing a certain action in the long-term return under the current state; and the constraint check layer, as an important feature module of this architecture, performs a round of compliance screening based on the constraint set before outputting the action, eliminating all action candidates that violate constraints such as temperature threshold, memory upper limit, dependency order, or loading timeout, and only retaining the feasible subset in the policy space, so as to avoid generating decisions that pose a threat to the system stability. Based on the above network structure, DQN is trained and updated by combining value function iteration and policy gradient optimization. The value function iteration part uses the temporal difference update method (such as Q-learning), obtains state transition samples through continuous interaction with the environment, and continuously iteratively updates the Q-value of each state-action pair, so that the network finally converges to the optimal estimate. The policy gradient optimization part is used to finely adjust the weight parameters in the network, so that the policy not only converges in the direction of the maximum expected return, but also considers the smoothness and practical operability of the policy execution path, thereby enhancing the generalization ability and convergence speed of the policy. The entire training process ensures high-performance rewards while meeting multiple system boundary conditions such as high-temperature protection, dependency integrity, and resource constraints, ensuring that the learned policy has real deployment value. When the optimal policy parameters are completed training, this parameter set is used to generate the loading action sequence for the current firmware segment set.For each firmware segment in the unloaded state, the optimal policy function is input according to the current state, the best loading action is output, and combined with the dependency graph and resource situation, a loading path graph is dynamically constructed in real time, so as to form an efficient loading sequence containing various types of loading behaviors.

[0025] S5. Perform target path loading on the firmware segment set according to the loading action sequence and timing optimization condition parameters to obtain the loading execution result.

[0026] Among them, various loading behaviors included in the loading action sequence are parsed, and target path parameters for guiding the construction of the subsequent firmware segment loading path are extracted. The loading action sequence consists of various operation instructions such as immediate loading, preloading, delayed loading, and priority adjustment. Each instruction has different scheduling weights and timing requirements during execution. By parsing the action types and target firmware segment identifiers in this sequence, the firmware segment set is classified and mapped. Firmware segments with strong dependencies or high priorities are extracted as key nodes to form a loading topology graph with a path structure. Combining with the dependency relationship matrix, target loading path parameters are constructed. This parameter set describes the loading order of each firmware segment, the corresponding relationship of the startup phase, the expected resource occupancy, and the action execution priority, thus constituting the scheduling basis of the loading path. To enable the loading path to adapt to changes in the network state during actual execution, a network bandwidth fluctuation coefficient from the timing optimization condition parameters is introduced to perform network adaptive segmentation operations on the firmware segment set. The network bandwidth fluctuation coefficient reflects the stability of the current network transmission and the bandwidth utilization efficiency. When this coefficient is high, it indicates that the network environment is stable and the throughput capacity is strong. The system can select a fine-grained segmentation method, split large firmware modules into multiple sub-segments, and improve the overall loading efficiency through parallel loading. On the contrary, when the coefficient is low, the system determines that the network is in an unstable or low-bandwidth state. At this time, a coarse-grained merging strategy is adopted to combine small firmware segments with similar functions into one to reduce the number of network requests and the probability of congestion and packet loss during transmission. Through this mechanism, hierarchical loading scheduling parameters are dynamically generated according to the current network conditions. The scheduling parameters record the target granularity, loading method (parallel or serial), and loading window time of each firmware segment, thus realizing the dynamic adjustment of the loading strategy driven by the network state. On the basis of network adaptive scheduling, the temperature load situation in the chip operating environment is considered to avoid system instability or performance degradation caused by overheating of the hardware during the loading process. When executing the loading path, a temperature constraint loading mechanism is introduced. The real-time temperature data from the temperature sensor is compared with the preset safety temperature threshold, and combined with the loading intensity index of the firmware segment in the hierarchical loading scheduling parameters, it is judged whether there is a risk of thermal shock. If the loading of a certain firmware segment in the current temperature environment may cause the temperature to exceed the safety threshold, the system temporarily transfers this segment to the delayed queue or reduces its priority, and performs thermal load balancing by adjusting the loading order of other firmware segments. In extreme cases, a frequency reduction mechanism or cooling control measures are triggered to ensure that the hardware does not exceed its thermal tolerance due to the firmware loading process. The target path loading is executed under the dual regulation of the network state and the hardware thermal load. The loading result forms a loading execution result report by comparing information such as the actual loading time of each firmware segment, whether it is completed as planned, whether any constraint is violated, and the change in the system state after loading.

[0027] Perform a thermal safety check on the firmware segment priority classification in the hierarchical loading scheduling parameters. The scheduling parameters divide the firmware segments to be loaded into a high-priority queue, a medium-priority queue, and a low-priority queue. Each queue represents the scheduling priority weight occupied by the corresponding firmware segment in the loading strategy. Before the loading execution, temperature safety threshold checks are performed on these three types of queues based on the current chip temperature parameters. The temperature safety threshold check includes a static judgment on whether the current chip core temperature exceeds the limit, and combines the power consumption increase and heat generation intensity caused by each firmware segment during the loading process to evaluate its incremental risk to the overall chip thermal load. If loading a certain high-priority firmware segment may cause the temperature to exceed the threshold at the current temperature level, the system transfers it to a restricted loading state and adjusts the scheduling weight accordingly, thus forming a temperature-constrained scheduling strategy to ensure that the loading order of high-load firmware does not conflict with the system's thermal tolerance. Perform a temperature change prediction for the loading process based on this temperature-constrained scheduling strategy and the current actual chip temperature parameters. This process uses a temperature prediction model to deduce the temperature evolution trend in the future time period. The model takes variables such as the current temperature, loading intensity parameters, environmental heat conduction characteristics, and external heat dissipation efficiency as inputs, and calculates the temperature rise rate and peak prediction when different firmware segments are executed in each loading stage by superimposing the heat change rate generated in the loading stage and the chip environmental temperature rise factor. The obtained temperature prediction parameters include the quantitative numerical change of the temperature, as well as the identification result of the inflection point of the temperature change curve in the loading path. Based on the prediction results, perform a success rate analysis and path pruning operation on the loading decisions that have been executed in the historical loading path. The success rate analysis is based on factors such as the completion probability, average loading time, and whether the temperature exceeds the limit in the past actual execution of each firmware loading node to construct a set of execution confidence models for the loading path. For the path nodes with significantly low success rates or those that frequently cause temperature anomalies, remove them from the current decision tree through pruning operations to generate a new target loading decision tree. Based on the target loading decision tree optimized by pruning, perform a phased temperature-constrained loading process on the entire firmware segment set. In each stage, preferentially select the firmware segments with low temperature sensitivity and high path confidence in the current stage for loading. During the process, continuously monitor the chip temperature change and compare it with the temperature prediction parameters. If it is found that the prediction deviation exceeds the safety tolerance range, immediately execute correction actions such as priority adjustment, loading delay, or low-power switching to ensure that the system operates within a controllable temperature range at any stage. As the loading progresses, automatically update the target loading tree for the next stage according to the stage switching situation and reuse the prediction results for forward scheduling to ensure that the temperature constraint remains effective under dynamic conditions. After all loading operations are completed, summarize the loading results and temperature control behaviors of each stage to generate a loading execution result report.

[0028] In one example, firmware partitioning is performed on a network set-top box to obtain a firmware segment set and an inter-segment dependency matrix, including: According to the four-stage startup architecture of the boot layer, network layer, decoding layer, and interaction layer, the firmware of the network set-top box is hierarchically partitioned to obtain a boot layer firmware module, a network layer firmware module, a decoding layer firmware module, and an interaction layer firmware module; Based on the boot layer firmware module, network layer firmware module, decoding layer firmware module, and interaction layer firmware module, functional analysis is performed to obtain a firmware segment set including core function segments and extended function segments; The inter-segment dependency strength of the call relationships of each firmware segment in the firmware segment set is calculated to obtain an inter-segment dependency matrix.

[0029] In this example, as a multi-functional integrated embedded device, the firmware startup process of the network set-top box has an obvious hierarchical progression, that is, it gradually transitions from the lowest-level hardware initialization to upper-layer functions such as network connection, audio and video decoding, and user interaction. Each stage has functional independence and logically forms a dependency chain. Therefore, the firmware is layered according to the four-stage startup architecture of the boot layer - network layer - decoding layer - interaction layer. In this architecture, the boot layer is at the bottom of the startup sequence, mainly responsible for initializing basic hardware resources such as the main control chip, memory, and bus system, and loading and starting the Bootloader as the entry for subsequent firmware loading and execution. Therefore, the firmware modules in the boot layer include system startup vector configuration code, hardware clock control module, power supply and reset control driver, storage controller initialization program, and basic exception handling framework, etc.; the network layer is responsible for configuring and activating network card drivers, initializing protocol stacks, completing address allocation, and performing remote connection verification, etc. Its firmware modules include Ethernet / WiFi driver programs, DHCP client protocol libraries, SSL / TLS security handshake code, DNS and routing policy initialization logic, etc.; the decoding layer focuses on the processing of audio and video streams, and its firmware modules include audio and video codec drivers, decoding algorithm library link logic, video output frame buffer configuration interface, audio playback channel control code, etc.; the interaction layer is the user-visible interface logic and input response module, and its firmware modules include graphic interface rendering engines, remote control / touch input recognition modules, menu system loading modules, main application framework bootstrappers, etc. After completing the preliminary layer division, functional analysis is carried out on the firmware modules within each layer to clarify which parts are the minimum bootable units, that is, core function segments, and which belong to performance optimization or extended functions, that is, extended function segments. The judgment criteria for core function segments include whether they are necessary conditions for stage startup, whether they affect key hardware activation, whether they participate in basic communication initialization, and whether they directly participate in the startup of the decoding pipeline or the initialization of interface drawing. For example, in the boot layer, the system clock initialization module belongs to a typical core function segment, while the debug serial port driver is classified as an extended function segment; in the network layer, the network address acquisition logic is the core, and remote log uploading is classified as an extended function; in the decoding layer, decoder driver loading is the core, and the image sharpening algorithm module can be loaded later; in the interaction layer, the UI layout manager is the core, and the startup animation module is regarded as an optimization function. Through this analysis method, each layered module is further refined to form a set of firmware segments with controllable granularity and clear semantics. Model the call relationships of the firmware segment set. By using static code analysis techniques to extract function call graphs, driver registration chains, and resource usage dependency graphs, and combining with actual runtime logs and hardware initialization timing analysis, identify the startup sequence and resource mutual exclusion situations between firmware segments. The call relationships are not limited to explicit function calls, but also involve implicit logics such as module initialization order, interface dependencies, and the activation sequence of hardware controllers.To quantify this relationship, an inter-segment dependence strength model is constructed. This model is a weighted combination based on the call strength, temporal coupling degree, and resource contention situation between each pair of firmware segments (i, j), and a dependence strength value is obtained. The higher the dependence strength, the stronger the startup dependence of firmware segment i on firmware segment j, and the less likely its loading order can be swapped. Violating this will lead to system initialization failure or unavailable functions. The call strength is weighted based on the call frequency and call hierarchy. The temporal coupling degree is dynamically evaluated according to the parallelism and blocking characteristics of firmware segments in the startup sequence. Resource dependence can be identified by accessing the same hardware registers, DMA channels, or cache regions, and the conflict probability is quantified. Under the action of the above multiple weight factors, the constructed inter-segment dependence relationship matrix reflects the startup order constraints between each firmware segment and is used in subsequent critical path extraction, loading priority sorting, and scheduling optimization algorithms. This matrix is a data structure in the form of a sparse directed graph. The elements on the main diagonal represent the importance of the firmware segment itself, while the off-diagonal elements represent the dependence strength between two different firmware segments. The larger the value in the matrix, the stronger the dependence.

[0030] In one example, a real-time state vector of the startup state is determined based on the hardware sensor data of a network set-top box, including: Data collection is performed on the temperature sensor, memory monitor, network interface, and decoder status register of the network set-top box to obtain hardware sensor data, which includes chip temperature values, memory occupancy values, network connection parameters, and decoder status parameters; According to the current loading segment number, network connection status, decoder readiness, memory occupancy rate, and chip temperature, the hardware sensor data is classified and quantified to obtain five-dimensional classification and quantification parameters, which include the current loading segment identification parameter, network connection status parameter, decoder readiness parameter, memory occupancy rate parameter, and chip temperature parameter; According to the startup state of the network set-top box, vector conversion is performed on the five-dimensional classification and quantification parameters to obtain a real-time state vector.

[0031] In this example, structural mapping and signal access are performed on the internal hardware resources of the network set-top box. The system is connected to the temperature sensor, memory usage monitoring unit, network interface controller, and decoder status register in the core subsystem through a bus or on-chip sensing network, and through I 2The C, SPI, or SoC bus interface establishes a low-latency and highly synchronous reading mechanism between the operating system driver layer and the upper-layer acquisition module to ensure that the data of all acquisition points can be synchronously updated within a unified time window. Among them, the chip temperature value is obtained through the on-board temperature sensor, and the sensor data is transmitted to the temperature control management unit via the temperature sampling controller. During the acquisition process, the environmental drift factor and the dynamic response offset of the chip load temperature rise are calibrated, so that the obtained chip temperature has sufficient stability and traceability; the memory occupancy value is output by the memory controller interface, and the memory pressure is comprehensively calculated by combining the current stack area usage ratio, page swap-out rate, and cache hit rate; the network connection parameters are read through the data path status register of the Ethernet MAC layer or the WiFi interface chip, and the obtained parameters include connection status indicators, bandwidth utilization rate, packet loss rate, and average response time, etc., which further characterize the availability and stability of network operation; the decoder status parameters are read through the status register or driver interface of the audio and video hard decoding chip, and its output includes the decoding hardware initialization flag bit, codec library loading status, task queue idle degree, and decoding frame rate index, which can effectively measure whether the decoding module has executable capabilities. After obtaining the original hardware sensor data, these original physical quantities are mapped into classification quantization parameters that are more computable and comparable. To achieve this goal, the acquisition system introduces a method based on rule mapping and statistical interval division, and each sampling item is respectively mapped to five dimensions with clear semantics during the startup process: the current loaded segment number, network connection status, decoder readiness, memory occupancy rate, and chip temperature. The current loaded segment number is extracted through the loading bitmap in the boot logic or the status variable of the task scheduler, and a fixed number can be used to represent the currently active firmware segment; the network connection status parameter divides the network status into levels such as "not connected", "weak connection", "medium connection", "strong connection", etc. by setting discrete thresholds for the bandwidth utilization rate and packet loss rate; the decoder readiness parameter is standardized and mapped through the initialization completion ratio and function library loading status. For example, a readiness coefficient between 0 and 1 is set to express the state process of the decoder from not ready to fully activated; the memory occupancy rate parameter is fused and normalized by the ratio of the currently used memory to the total system memory and the fragmentation rate index to reflect the degree of system resource tension; the chip temperature parameter sets different safe operating ranges according to the chip model, classifies the temperature into low temperature, normal temperature, high temperature, overheating, and further sets gradient quantization to make it have trend perception ability. Through the above process, the physical acquisition data in five dimensions are uniformly mapped into a set of classification quantization parameters, that is, five-dimensional classification quantization parameters. After synchronously integrating these five-dimensional parameter sets on the time axis, by constructing a vector space structure, they are encapsulated into a real-time state vector in a standard format, where each vector element corresponds to the above five classification dimensions: the current loaded segment identification parameter, network connection status parameter, decoder readiness parameter, memory occupancy rate parameter, and chip temperature parameter.

[0032] In one example, the startup phase of the network set-top box is identified according to the real-time state vector to obtain the current startup phase identifier and the timing optimization condition parameters, including: Analyze the change pattern of the real-time state vector to obtain the phase transition determination parameters including the boot layer transition condition, network layer transition condition, decoding layer transition condition, and interaction layer transition condition; Determine the current startup phase identifier corresponding to the boot layer phase, network layer phase, decoding layer phase, or interaction layer phase based on the phase transition determination parameters; Calculate the timing optimization condition parameters according to the current startup phase identifier and the network connection status parameter and decoder readiness parameter in the real-time state vector.

[0033] In this example, trend analysis is performed on the real-time state vector to identify the change speed, direction, stability, and jump characteristics of each dimension. By setting a threshold perception mechanism and state transition judgment rules, phase boundaries are identified in the vector sequence. For example, the termination of the boot layer phase is manifested as the current loading segment identification parameter covering all the core firmware segments of the boot layer, and the rising amplitude of the chip temperature tends to be stable; the key determination for the network layer transition lies in the network connection status parameter jumping to the "stable connection" or "bandwidth utilization meets the standard" state; the decoding layer transition depends on the decoder readiness parameter rising rapidly and exceeding the executable threshold, while the memory occupancy rate is within a controllable range; the determination of the interaction layer phase combines the stability of the foregoing parameters, especially when the decoder readiness reaches the upper limit and there are no network or memory bottlenecks. On this basis, these state change characteristics are abstracted into phase transition judgment parameters, that is, a set of data structures used to determine phase switching conditions, which internally contain numerical thresholds of different dimension variables, jump detection logic, time smoothing windows, and jitter tolerance coefficients. Each phase transition judgment parameter corresponds to a specific start phase transition logic. For example, the boot layer transition condition is set to cover all the boot segment indexes in the loading segment number sequence, and the chip temperature growth rate is less than a certain threshold within five consecutive sampling periods; the network layer transition condition requires the network connection status to remain stable for at least three seconds, and the connection packet loss rate is lower than the set value; the decoding layer transition condition is based on all the decoder initialization flags being set and the frame rate reaching the test standard; the interaction layer transition condition combines the graphical interface initialization completion signal and the feedback status of the user input detection module. When the output of the phase transition judgment parameter meets any phase condition, the system updates the current start phase identifier to the corresponding phase and notifies the loading scheduler to switch the scheduling policy through an event trigger mechanism to adapt to the operating characteristics of the new phase. Based on the network connection status parameter and the decoder readiness parameter in the real-time state vector, the derivation and calculation of the timing optimization condition parameters are carried out when the current start phase identifier is determined. The core goal of timing optimization is to balance the loading speed, system stability, and user interaction experience. Therefore, multiple factors such as network bandwidth fluctuation, connection quality persistence, decoder response speed, and resource occupancy change curve are comprehensively considered in the calculation process. Among them, the network connection status parameter is used to analyze the available degree of network bandwidth and its fluctuation trend. The system uses a sliding window algorithm to calculate the current bandwidth fluctuation coefficient. The larger this coefficient is, the more unstable the network connection is. Therefore, it is not suitable to load high-volume firmware segments in a high-fluctuation state; the decoder readiness parameter is used to calculate its change slope and initialization delay to deduce the estimated time required for the decoder to transition from the activated state to the executable state, that is, the decoder initialization delay, which reflects the response performance of the decoding subsystem. For a system in the critical state of the interaction layer, a response time threshold is constructed according to the user interaction expectation. This threshold is extracted from historical usage data and user experience feedback, and the expected interface response time window is deduced according to the current phase, so as to determine the sorting strategy of the loading scheduling priority.The network bandwidth fluctuation coefficient, the decoder initialization delay, and the interactive response threshold will be combined into a timing optimization condition parameter set to guide key loading behavior decisions such as loading action priority, loading segment granularity selection, scheduling window adjustment, and temperature control policy embedding.

[0034] In one example, the timing optimization condition parameters are calculated according to the current startup phase identifier and the network connection status parameter and decoder readiness parameter in the real-time status vector, including: Analyze the bandwidth utilization and connection stability of the network connection status parameter in the real-time status vector to obtain network bandwidth analysis parameters; Based on the network bandwidth analysis parameters, analyze the bandwidth fluctuation degree to obtain the network bandwidth fluctuation coefficient; Calculate the delay of the hardware initialization progress and software library loading status of the audio-visual decoder according to the decoder readiness parameter in the real-time status vector to obtain the decoder initialization delay from the start of the audio-visual decoder to full readiness; Based on the current startup phase identifier, determine the threshold for user interaction response requirements to obtain the timing optimization condition parameters including the network bandwidth fluctuation coefficient, the decoder initialization delay, and the user interaction response threshold for the current startup phase.

[0035] In this example, the data dimension related to the network connection status in the real-time status vector is parsed. The network connection status parameter is a composite parameter composed of multiple sub-indicators. It not only reflects whether the network is in a connected state, but also includes multiple indicators reflecting network quality, such as the current utilization rate of network bandwidth, the average latency of data transmission, the packet loss rate, the number of connection interruptions, and the connection recovery period. To extract network bandwidth analysis parameters with decision-making value from these data, a multi-dimensional statistical model is constructed. This model continuously records the changes of the above network indicators within a set time window, calculates the trend of bandwidth utilization using the weighted moving average method, and at the same time characterizes the instability of the network by monitoring the jump frequency of connection stability, the peak frequency of packet loss, and the number of handshake failures at the TCP or UDP protocol layer. The network bandwidth analysis parameters are input into the fluctuation measurement model for further processing, thereby deriving the network bandwidth fluctuation coefficient. This fluctuation coefficient is a dynamically calculated indicator, defined as the ratio of the change standard deviation of the bandwidth utilization rate to its expected value, and characterizes the stability of the network connection quality per unit time. By setting the minimum sampling period and the fluctuation sliding window, the maximum deviation amplitude of the network throughput within a certain period is analyzed, and it is normalized with the physical bandwidth capacity of the network interface to form an interval coefficient value. If this coefficient is less than 0.5, it indicates that the network is in a highly stable state and is suitable for parallel loading of large segments of firmware; if the coefficient is between 0.5 and 1.5, it shows that network fluctuations exist but are within a controllable range, and small segment concurrent loading can be supported; when this value exceeds 1.5, it means that the current network environment is highly uncertain, and the loading strategy needs to be switched to serial loading or low-load mode. At the same time, the decoder-related status parameters are analyzed in parallel, especially the decoder readiness dimension in the real-time status vector. This parameter is not a static value, but a comprehensive indicator jointly evolved based on the initialization states of multiple decoder components, including the power-on and register configuration status of the decoder hardware, the driver loading completion flag, the initialization progress of the codec algorithm library, the buffer configuration completion status, and the output link establishment completion signal. The system records the complete process experienced by the decoder from receiving the start command to entering the workable state according to the initialization timestamp and the ready event response time of each sub-module, and through the aggregation of this time series, obtains the decoder initialization delay. The threshold for the user interaction response requirement is determined based on the current startup phase identifier. This threshold is a critical parameter related to the user experience, which defines the longest allowed response time for the system's feedback to user operations within the current phase. For example, in the interaction layer phase, this threshold is set within 300 milliseconds to ensure immediate response after interface clicks; while in the decoding layer phase, it is set to about 500 milliseconds to allow the system to reserve a certain buffer time for decoding operations.The system constructs a response model based on historical usage behaviors, fault statistical distributions, and user test feedback data, thereby automatically generating corresponding interactive response thresholds at each stage. These thresholds can be dynamically adjusted to adapt to real-time condition changes such as the current chip temperature, memory resource occupancy rate, and network fluctuation level. Integrating the network bandwidth fluctuation coefficient, decoder initialization delay, and user interactive response threshold forms a set of timing optimization condition parameters. This set has the ability to react immediately to the current environment and contains stage-specific policy guidance information for subsequent adjustment of the scheduling weights of the firmware loading path, reordering of the loading sequence, dynamic switching of granularity policies, and immediate verification of resource limitations.

[0036] In one example, based on the current startup stage identifier and the inter-segment dependency matrix, loading decisions and Markov state transition analysis are performed on the firmware segment set to obtain a loading action sequence, including: Construct a hierarchical state space including a boot layer state set, a network layer state set, a decoding layer state set, and an interaction layer state set based on the current startup stage identifier, as well as a firmware segment loading action space including immediate loading actions, preloading actions, delayed loading actions, and priority adjustment actions; Calculate the dynamic state transition probability parameters by computing the state transition probability function according to the inter-segment dependency matrix and the set-top box hardware limitation conditions; Set the constraint conditions and reward mechanism based on the dynamic state transition probability parameters to obtain a set of constraint conditions including memory constraint conditions, temperature constraint conditions, dependency constraint conditions, and time constraint conditions, as well as reward function parameters including loading success rewards, constraint violation penalties, early completion rewards, and network interruption recovery rewards; Input the hierarchical state space, firmware segment loading action space, set of constraint conditions, and reward function parameters into a Markov decision process for optimal policy solving to obtain a loading action sequence for the firmware segment set.

[0037] In this example, in the startup management system, with the current startup phase identifier as the core variable, a multi-layer state space with phase awareness ability is constructed. This state space has the dual representation ability for the firmware loading progress and the system running state. Therefore, the system divides the state space into four main sets according to the startup structure of the boot layer, network layer, decoding layer, and interaction layer. Each set contains multiple sub-state nodes internally, and state transitions occur between the nodes through the firmware loading behavior. The state set of the boot layer mainly includes nodes such as "boot segment not loaded", "boot segment partially loaded", and "boot segment loaded". The state set of the network layer includes stages such as "network driver initialization", "connection establishing", and "network connection successful". The state set of the decoding layer consists of states such as "decoder hardware initialization", "algorithm library loading", and "decoding function activation". The state set of the interaction layer involves state change paths such as "interface resource preparation", "user input recognition", and "interaction system activation". This structure ensures that the system can completely cover the loading state of the current functional module with a finite state set at each stage, and at the same time provides a clear state index space for the decision-making model. While constructing the state space, a supporting firmware segment loading action space is defined, which covers all types of behaviors that affect the firmware segment loading path. For this purpose, the system designs four types of core loading actions, namely immediate loading action, preloading action, delayed loading action, and priority adjustment action. The immediate loading action means that the current firmware segment directly starts the loading process without delay, which is applicable to the firmware with strong core dependencies and small resource occupancy. The preloading action means that the current firmware segment is first transferred into memory or cache to prepare for the upcoming new stage. The delayed loading action means that the execution of the current firmware segment is postponed due to resource bottlenecks or thermal management requirements. The priority adjustment action is used to rearrange the priorities of the existing loading tasks when the policy changes or external conditions mutate, so as to dynamically optimize the policy path. To ensure that the loading behavior can dynamically adapt to the system running state and resource changes, a state transition probability function is constructed based on the inter-segment dependency matrix and the hardware constraints during the operation of the set-top box (such as available memory, CPU usage rate, chip temperature, etc.). The system performs transition modeling on each pair of state-action pairs (s,a), considering whether there are upstream segments that have not been satisfied in the dependency path, whether the loading of the target segment will trigger resource bottlenecks or temperature increases, and combining the fluctuation trend of the network state, to calculate the probability that the system successfully enters the next state s' after executing the action a, forming the transition function P(s'|s,a). This function not only reflects the sequential relationship between firmware segments but also includes the dynamic adjustment effect of the environmental adaptation factor, thus forming a dynamic state transition probability parameter system that is strongly coupled with the external resource state. After completing the transition modeling, the system sets the constraint condition set and the reward function structure in the loading decision-making process.Among the set of constraint conditions, the memory constraint condition is used to prevent page overflow or a sharp increase in memory fragmentation during the loading process, and requires that the loading action can only be triggered when the memory usage rate is lower than a certain threshold; the temperature constraint condition is based on the association model between the chip temperature and the loading intensity to ensure that the loading of high-heat firmware segments is restricted within the temperature safety range; the dependency constraint condition is directly derived from the inter-segment dependency matrix and requires that a segment cannot be executed until its dependent segments have not completed loading; the time constraint condition sets the maximum tolerable loading duration for each stage through phased response metrics to avoid delays during the startup process. At the same time, to guide the policy to converge towards the optimal system performance, a set of reward function parameters is constructed. Among them, the loading success reward is used to enhance the incentive for the successful execution of actions; the constraint violation penalty is used to suppress resource abuse or policy violations; the early completion reward is used to encourage compressing the loading time in the compression stage; and the network interruption recovery reward gives positive feedback when a connection anomaly is encountered during the loading process and can be successfully reconnected and restored. The above four types of information, namely the hierarchical state space, the firmware segment loading action space, the set of constraint conditions, and the reward function parameters, are input into the Markov decision process model for optimal policy solution. A reinforcement learning algorithm based on value iteration or policy iteration is used for model training. During the execution of each state-action pair, the state value function is continuously corrected, the policy is converged using the Bellman optimality principle, and the transition probability is dynamically adjusted to adapt to environmental changes. After a certain number of rounds of iteration, a stable policy function π(s) is finally obtained. This function can output the corresponding optimal loading action under any given state, and a set of loading action sequences with time, resource, and dependency adaptability is generated therefrom.

[0038] In an example, the hierarchical state space, the firmware segment loading action space, the set of constraint conditions, and the reward function parameters are input into the Markov decision process for optimal policy solution, and a loading action sequence for the set of firmware segments is obtained, including: State encoding and action encoding are performed on the hierarchical state space, the firmware segment loading action space, the set of constraint conditions, and the reward function parameters to obtain the Markov decision input parameters; Based on the Markov decision input parameters, a DQN decision network perceived in the startup stage of the network set-top box is constructed. The DQN decision network includes a state input layer, a hidden calculation layer, an action output layer, and a constraint check layer; Value function iteration and policy gradient optimization are performed on the firmware segment loading policy according to the DQN decision network to obtain the Markov optimal policy parameters; Based on the Markov optimal policy parameters, action sequence generation is performed on the set of firmware segments to obtain the loading action sequence.

[0039] In this example, unified encoding conversion is performed on the hierarchical state space, firmware segment loading action space, set of constraint conditions, and reward function parameters to meet the formatting requirements of the reinforcement learning model for numerical input vectors. The hierarchical state space is a state set composed of four types of startup phases (boot layer, network layer, decoding layer, interaction layer) and their respective state nodes, while the firmware segment loading action space consists of four types of action types, namely immediate loading, preloading, delayed loading, and priority adjustment. To enable these semantic information to be input into the deep reinforcement learning network, a state encoder and an action encoder are used to vectorize the above structures. State encoding is achieved through a combination of one-hot encoding, phase bit-marking method, and multi-dimensional normalization. Among them, phases such as the boot layer and network layer represent the macroscopic state progress of the startup process in the form of position bit encoding, while the specific sub-states in each phase are mapped to state vectors of a fixed dimension. For example, the loading state of each firmware segment is represented by three bits indicating its unloaded, loading, and completed states, and a global state vector is generated by combining the state bits of all relevant segments. In the action encoding part, an independent encoding vector is assigned to each loading control instruction. For example, immediate loading is [1,0,0,0], preloading is [0,1,0,0], delayed loading is [0,0,1,0], and priority adjustment is [0,0,0,1], and it is combined with the identifier of the firmware segment to be executed to form an action feature representation with semantic binding. At the same time, the set of constraint conditions and reward function parameters are embedded in the model through numerical mapping. Memory constraints, temperature constraints, dependency constraints, and time constraints, etc., are represented by boolean flag bits indicating whether the current state value exceeds their respective thresholds, and the reward function parameters are encoded in the form of a reward matrix, where each state-action-next state triple corresponds to an immediate reward value, which is used to guide the gradient direction of policy optimization. After completing the above input encoding, a deep Q-network (DQN) is constructed to achieve the optimal solution of the startup strategy. This network needs to have the capabilities of startup phase recognition, state feature understanding, action output control, and behavior constraint verification. Therefore, its architecture design needs to include four core structures, namely the state input layer, hidden calculation layer, action output layer, and constraint check layer.The main function of the state input layer is to receive the high-dimensional vector representation output by the state encoder and perform normalization processing to ensure that features in different stages have a unified input scale; the hidden calculation layer consists of multiple fully-connected neural networks, and each layer is equipped with a ReLU or Leaky ReLU activation function to extract the non-linear combination of state features and enhance the representation ability for complex state spaces; the action output layer calculates the Q-value vector of all possible actions based on the current state and outputs the expected cumulative return value corresponding to each action in the current state for the policy selection module to make decisions; the constraint check layer is embedded in the action output as a policy correction mechanism, and its role is to perform feasibility detection on each candidate action based on the resource metrics (such as memory utilization, chip temperature, etc.) and the dependency matrix structure of the current state. When it is found that a certain action violates the preset constraint conditions, its Q-value is set to negative infinity or masked to avoid the system failure caused by incorrect actions in the policy. After the above DQN network is constructed, the system enters the training stage. In this stage, value function iteration and policy gradient optimization are alternately performed, and the goal is to make the Q-network approximate the value function under the Bellman optimal equation. During the training process, the system interacts with the environment, continuously makes state-action decisions and records the transfer results, that is, the (s, a, r, s') quadruple, and stores it in the experience replay pool. The network randomly extracts batch samples from the pool for training, uses the difference between the target network and the current network as the Q-value target, and optimizes the network parameters through backpropagation by minimizing the mean square error loss function. In the policy gradient optimization stage, the system maps the Q-value to the policy probability distribution through the softmax function, combines the policy gradient algorithm to increase the probability weight of high-return actions, and adjusts the temperature constraint of the gradient direction at the same time to ensure that the policy learning converges to a stable solution under the premise of meeting the hardware resource limitations. After multiple rounds of iteration, the DQN network converges, and the output value function and policy function together constitute the Markov optimal policy parameter set. The system uses this policy parameter to perform the action sequence generation operation on the set of all firmware segments, that is, according to the current state s, selects the action a with the largest Q-value through the policy function π(s), and sequentially executes the firmware segment loading behavior until all segments are loaded or the preset termination state is reached. During this process, the state is updated in real time according to the action type, and the loading policy is dynamically switched. For example, in case of high temperature or memory overrun, it is automatically adjusted to the delayed loading action; when a certain segment is loaded and the dependency chain is satisfied in advance, the next segment is immediately advanced through the priority adjustment action. The loading action sequence output by the system includes the loading order of each firmware segment, and also identifies the execution time point, loading method and trigger condition of each step action.

[0040] In one example, the target path loading is performed on the set of firmware segments according to the loading action sequence and the timing optimization condition parameters, and the loading execution results are obtained, including: Identify the target loading path parameters based on the immediate loading action, preloading action, delayed loading action, and priority adjustment action in the loading action sequence; Perform network adaptive segmentation on the firmware segment set according to the network bandwidth fluctuation coefficient in the timing optimization condition parameters to obtain hierarchical loading scheduling parameters; Perform temperature-constrained loading execution on the firmware segment set according to the hierarchical loading scheduling parameters to obtain the loading execution result.

[0041] In this example, the loading action sequence is parsed. This sequence is the optimal loading behavior sequence generated by a Markov decision process or a deep reinforcement learning policy model. Each loading action not only points to a specific firmware segment but also carries the operation type that the firmware segment should currently execute. On this basis, through a logical parsing process, the loading actions are classified into four types: The immediate loading action is used to indicate that the firmware segment must be loaded within the current scheduling cycle; the pre-loading action indicates that although the firmware segment is not within the current priority execution range, it needs to be pre-loaded into the buffer or memory in advance for quick startup in subsequent stages; the delayed loading action indicates that when the current system resources are insufficient or the execution conditions are not met, the segment should pause scheduling and enter the low-priority waiting queue; while the priority adjustment action means that due to dependency changes, resource fluctuations, or external event triggers, the scheduling level of this segment needs to be re-ordered and it will be under scheduling control at the new priority. Through the classification and structured processing of the entire action sequence, the complete target loading path parameters are identified, including the loading timing relationship, scheduling priority level, pre-loading window, dependency path structure, and execution condition dependencies of each firmware segment, thus constructing a logical loading path with the triple attributes of sequential constraint, resource dependency, and policy control. After the loading path is identified, combined with the current timing optimization condition parameters, especially the key dynamic index of the network bandwidth fluctuation coefficient, the firmware segment set is adjusted in granularity and the scheduling policies are graded. The network bandwidth fluctuation coefficient is an important parameter characterizing the stability of the current network transmission environment. When the coefficient value is lower than a certain stable threshold, it indicates that the bandwidth usage tends to be stable. At this time, a fine-grained segmentation strategy is adopted to disassemble a larger firmware module into multiple small segments, and parallel loading or parallel scheduling methods are used to improve network utilization; while when the coefficient value exceeds a certain fluctuation critical point, it indicates that the network state is unstable, the risk of packet loss or delay increase rises. At this time, the system switches to a coarse-grained segmentation strategy, combining multiple firmware segments with high functional coupling into a single transmission unit, reducing the number of requests and shortening the network continuous occupancy duration, thereby enhancing the fault tolerance ability to bandwidth mutations. The system calculates the segmentation strategy factor based on this coefficient and combines the size, call frequency, and loading timing of the firmware segment itself to generate hierarchical loading scheduling parameters, including the current scheduling granularity identifier of each firmware segment, the belonging loading priority queue (such as high-priority queue, medium-priority queue, and low-priority queue), loading window delay, retry tolerance, and whether it has the condition for combined loading and other scheduling policy features. The firmware segment set is loaded and executed with temperature constraints according to the hierarchical loading scheduling parameters. The causal relationship between the current chip temperature and the loading operation is predicted and controlled. First, the thermal state of each core module of the current chip is read through a temperature sensor, and a temperature growth model is established by combining the temperature rise curves after the execution of each type of firmware segment in the historical loading data. Then, this model is used to predict the loading intensity of the firmware segment to be scheduled and judge whether its execution will cause the temperature to exceed the set threshold.If a firmware segment belongs to a critical module with high loading intensity, long duration, or dependency overlap, it must pass a temperature tolerance assessment before scheduling. If the current chip temperature is close to the threshold, the system will automatically perform a delayed loading operation on this segment and re-arrange the alternative segment or pre-loaded segment to fill the scheduling cycle. On the contrary, for low-intensity modules or firmware segments with a cooling assistance effect, the system will execute them first to achieve the dual goals of thermal balance and function startup. Under the combined action of network adaptive segmentation control and temperature-constrained loading mechanism, the dynamic loading process of the firmware segment set is completed, and the loading execution result is returned in the form of a structured log, including detailed information such as the execution status, loading time point, loading delay, whether the scheduling change is triggered, the loading granularity selection method, and whether it is affected by temperature constraints during the loading process.

[0042] In one example, the temperature-constrained loading execution of the firmware segment set is performed according to the hierarchical loading scheduling parameters, and the loading execution result is obtained, including: Perform a temperature safety threshold check on the high-priority queue, medium-priority queue, and low-priority queue in the hierarchical loading scheduling parameters to obtain a temperature-constrained scheduling strategy; Based on the temperature-constrained scheduling strategy and the current chip temperature parameters, perform a temperature change prediction during the loading process to obtain temperature prediction parameters; According to the temperature prediction parameters, perform a success rate analysis and pruning process on the historical loading decision path to obtain the target loading decision tree; Based on the target loading decision tree, perform a phased temperature-constrained loading execution on the firmware segment set to obtain the loading execution result.

[0043] In this example, temperature safety threshold checks are performed on the high-priority queue, medium-priority queue, and low-priority queue in the hierarchical loading scheduling parameters. By combining the current real-time temperature parameter of the chip with the historical loading heat load curve of the firmware segment itself, the "expected temperature rise" of each segment is estimated, and it is determined whether its loading will trigger the chip temperature to exceed the critical value of the temperature threshold. If a segment is expected to cause the temperature to exceed the upper limit after loading in the current temperature environment, the system marks this segment as "restricted execution" and defers its loading or rearranges the priority according to the temperature control response mechanism, thus forming a temperature constraint scheduling strategy. This strategy is a matrix structure containing firmware segment identifiers, scheduling time windows, execution delay parameters, and safety flag bits, which is used to guide the subsequent scheduler to automatically skip or postpone the execution of high-heat segments during loading scheduling, thereby avoiding system risks caused by sudden temperature increases. Based on the temperature constraint scheduling strategy and the current chip temperature parameter, a prediction of the temperature change during the loading process is performed. This process takes the current chip temperature, the queue of firmware segments to be executed in the current stage, and the temperature rise rate per unit time generated by these segments during historical execution as inputs, and calls the temperature rise prediction model to simulate the temperature change within the time window. The model converts hardware behavior indicators such as CPU occupancy, bus read / write rate, and cache hit rate required for the execution of the firmware segment into temperature rise contribution factors by establishing a mapping function between temperature and power consumption, and then calculates the temperature rise value in each loading cycle by combining the chip heat dissipation capacity model and the environmental temperature perturbation factor, finally forming a set of temperature prediction parameters. According to the temperature prediction parameters, a success rate analysis and pruning process are performed on the historical loading decision path to construct a target loading decision tree adapted to the current temperature control situation. This historical analysis is based on the number of successful executions, the frequency of temperature anomalies, loading interruption or rollback records, average loading time, and resource occupancy recorded in the past firmware segment loading logs. Through a statistical model, the execution stability and success probability of each path under similar temperature control conditions are evaluated. If the overheating failure rate of a certain path exceeds the tolerance threshold under the background of the current temperature prediction parameters, the system marks this path as a high-risk path and removes it from the loading policy tree through pruning operations. The pruning operation removes the paths that caused temperature control anomalies in history, and reconstructs the decision tree structure by retaining the segments with high stability and slow temperature rise in the remaining paths as key nodes, making it have better temperature adaptability and execution success rate. Based on the target loading decision tree, a phased temperature constraint loading process is performed on the firmware segment set. This process is divided into multiple loading windows, and each window corresponds to an execution stage. The system re-evaluates the target path nodes according to the current temperature parameter before entering each stage, preferentially loads the key segments on the premise of ensuring that the temperature rise does not exceed the expected range, and defers the non-critical but high-risk segments to the next stage, or transfers them to the pre-loading buffer mechanism to wait for the opportunity of temperature drop.During the loading process, the system continuously reads the chip temperature and compares it with the predicted curve. If the temperature deviates too much from the prediction, the compensation strategy will be automatically invoked. For example, it can be corrected by temporarily pausing the high-load segment, inserting a cooling cycle, or switching to the low-power segment loading path, and the parameters of the prediction model will be dynamically adjusted. After the loading is completed, the system records the actual loading time of each firmware segment, the temperature rise amplitude caused by the loading, whether the scheduling rearrangement is triggered, and whether the frequency reduction or delay is executed, etc., to form a complete loading execution result. This result is used to update the decision tree path weights, improve the subsequent policy training efficiency, and serve as the evaluation feedback of the system thermal protection mechanism, thereby constructing an intelligent firmware loading temperature control scheduling system with thermal perception, prediction control, path reconstruction, and stage scheduling capabilities.

[0044] Referring to Figure 2 , this embodiment provides a firmware segmented loading device during the startup process of a network set-top box, including: A firmware partitioning module 1 for partitioning the firmware of the network set-top box to obtain a firmware segment set and an inter-segment dependency matrix; A status analysis module 2 for determining the real-time state vector of the startup state based on the hardware sensor data of the network set-top box; A stage identification module 3 for identifying the startup stage of the network set-top box according to the real-time state vector to obtain the current startup stage identifier and the timing optimization condition parameters; A loading decision module 4 for making a loading decision and Markov state transition analysis on the firmware segment set based on the current startup stage identifier and the inter-segment dependency matrix to obtain a loading action sequence; A path loading module 5 for performing target path loading on the firmware segment set according to the loading action sequence and the timing optimization condition parameters to obtain a loading execution result.

[0045] In this embodiment, for the specific implementation of each unit in the above device embodiment, please refer to that described in the above method embodiment, and details will not be repeated here.

[0046] In the embodiments of the present invention, the firmware of the network set-top box is accurately hierarchically divided according to a four-stage startup architecture of a guiding layer, a network layer, a decoding layer, and an interaction layer, and is further subdivided into a core function segment and an extended function segment, breaking through the technical limitation of the traditional firmware's overall loading, enabling the firmware segments to be flexibly combined and dynamically scheduled according to actual needs. The present invention establishes a five-dimensional state vector monitoring system including the current loading segment identifier, network connection status, decoder readiness, memory occupancy rate, and chip temperature, overcoming the technical defect of the prior art relying only on a single startup progress indicator, being able to comprehensively perceive the changes in the operating state of the network set-top box, providing multi-dimensional real-time data support for the loading decision, and enabling the loading strategy to accurately match the current hardware environment and system state. The present invention realizes the accurate identification of the startup stage through the analysis of the change pattern of the real-time state vector, getting rid of the technical limitation of the traditional method that depends on fixed time nodes to judge the startup stage, being able to dynamically determine the current startup stage according to the actual operating state of the system, and calculating the timing optimization condition parameters including the network bandwidth fluctuation coefficient, decoder initialization delay, and user interaction response threshold. The present invention models the firmware segmented loading problem as a constrained hierarchical Markov decision process, constructs a complete decision framework including a hierarchical state space, a firmware segment loading action space, a set of constraint conditions, and reward function parameters, solves the technical problem that the traditional static loading strategy cannot adapt to dynamic environmental changes, and realizes the intelligent optimization and adaptive adjustment of the loading strategy through a deep reinforcement learning network. The present invention identifies the critical path during the startup process by analyzing the dependency relationship between firmware segments, and sets the highest loading priority for the firmware segments on the critical path, breaking through the efficiency bottleneck of the traditional sequential loading method, being able to ensure that the critical firmware segments affecting the startup performance are loaded first, thus significantly shortening the overall startup time and improving the user experience. The present invention dynamically adjusts the segmentation granularity of the firmware segments according to the real-time network state, adopting a fine-grained segmentation strategy for parallel loading when the network condition is good, and adopting a coarse-grained segmentation strategy to reduce the network request overhead when the network condition is poor, overcoming the technical defect of the prior art that cannot adapt to network environment changes, and ensuring the loading efficiency and stability under different network conditions.

[0047] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, device, article or method. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, device, article or method including that element.

[0048] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present invention.

Claims

1. A method for segmented loading of firmware during the startup process of a network set-top box, characterized in that, Including: Partition the firmware of the network set-top box to obtain a firmware segment set and an inter-segment dependency matrix; Determine the real-time state vector of the startup state based on the hardware sensor data of the network set-top box; Identify the startup phase of the network set-top box according to the real-time state vector to obtain the current startup phase identifier and timing optimization condition parameters; Based on the current startup phase identifier and the inter-segment dependency matrix, perform loading decision-making and Markov state transition analysis on the firmware segment set to obtain a loading action sequence; Perform target path loading on the firmware segment set according to the loading action sequence and the timing optimization condition parameters to obtain a loading execution result.

2. The method for segmental firmware loading during the startup process of the network set-top box according to claim 1, wherein, The partitioning of the firmware of the network set-top box to obtain a firmware segment set and an inter-segment dependency matrix includes: According to the four-stage startup architecture of the boot layer, network layer, decoding layer, and interaction layer, perform firmware hierarchical partitioning on the network set-top box to obtain a boot layer firmware module, a network layer firmware module, a decoding layer firmware module, and an interaction layer firmware module; Based on the boot layer firmware module, the network layer firmware module, the decoding layer firmware module, and the interaction layer firmware module, perform function analysis to obtain a firmware segment set including core function segments and extended function segments; Calculate the inter-segment dependency strength of the call relationships between the firmware segments in the firmware segment set to obtain an inter-segment dependency matrix.

3. The method for segmental loading of firmware during the startup process of the network set-top box according to claim 1, characterized in that, The determination of the real-time state vector of the startup state based on the hardware sensor data of the network set-top box includes: Collect data from the temperature sensor, memory monitor, network interface, and decoder status register of the network set-top box to obtain hardware sensor data, which includes chip temperature values, memory occupancy values, network connection parameters, and decoder status parameters; Classify and quantify the hardware sensor data according to the current loaded segment number, network connection status, decoder readiness, memory occupancy rate, and chip temperature to obtain five-dimensional classification and quantification parameters, which include the current loaded segment identification parameter, network connection status parameter, decoder readiness parameter, memory occupancy rate parameter, and chip temperature parameter; Perform vector conversion on the five-dimensional classification and quantification parameters according to the startup state of the network set-top box to obtain a real-time state vector.

4. The method for segmental loading of firmware during the startup process of the network set-top box according to claim 1, characterized in that The identification of the startup phase of the network set-top box according to the real-time state vector to obtain the current startup phase identifier and timing optimization condition parameters includes: Perform change mode analysis on the real-time state vector to obtain phase transition determination parameters including a boot layer transition condition, a network layer transition condition, a decoding layer transition condition, and an interaction layer transition condition; Determine the current startup phase identifier corresponding to the boot layer phase, network layer phase, decoding layer phase, or interaction layer phase based on the phase transition determination parameters; Calculate the timing optimization condition parameters according to the current startup phase identifier and the network connection status parameter and decoder readiness parameter in the real-time state vector.

5. The method for segmented firmware loading during the startup process of the network set-top box according to claim 4, wherein The calculation of the timing optimization condition parameters according to the current startup phase identifier and the network connection status parameter and decoder readiness parameter in the real-time state vector includes: Analyze the bandwidth utilization and connection stability of the network connection status parameters in the real-time state vector to obtain network bandwidth analysis parameters; Based on the network bandwidth analysis parameters, analyze the degree of bandwidth fluctuation to obtain a network bandwidth fluctuation coefficient; Calculate the time delay of the hardware initialization progress and software library loading status of the audio and video decoder according to the decoder readiness parameter in the real-time state vector, and obtain the decoder initialization time delay from the start of the audio and video decoder to full readiness; Based on the current startup phase identifier, determine the threshold for the user interaction response requirement, and obtain the timing optimization condition parameters including the network bandwidth fluctuation coefficient, the decoder initialization time delay, and the user interaction response threshold for the current startup phase; 6. The method for segmental firmware loading during the startup process of the network set-top box according to claim 1, wherein Perform a loading decision and Markov state transition analysis on the firmware segment set based on the current startup phase identifier and the inter-segment dependency matrix to obtain a loading action sequence, including: Based on the current startup phase identifier, construct a hierarchical state space including a boot layer state set, a network layer state set, a decoding layer state set, and an interaction layer state set, and a firmware segment loading action space including an immediate loading action, a preloading action, a delayed loading action, and a priority adjustment action; Calculate the state transition probability function according to the inter-segment dependency matrix and the network set-top box hardware limitation conditions to obtain dynamic state transition probability parameters; Based on the dynamic state transition probability parameters, set the constraint conditions and reward mechanism to obtain a set of constraint conditions including memory constraint conditions, temperature constraint conditions, dependency constraint conditions, and time constraint conditions, and reward function parameters including loading success rewards, constraint violation penalties, early completion rewards, and network interruption recovery rewards; Input the hierarchical state space, the firmware segment loading action space, the set of constraint conditions, and the reward function parameters into a Markov decision process for optimal policy solution to obtain a loading action sequence for the firmware segment set; 7. The method for segmental loading of firmware during the startup process of the network set-top box according to claim 6, characterized in that, The step of inputting the hierarchical state space, the firmware segment loading action space, the set of constraint conditions, and the reward function parameters into a Markov decision process for optimal policy solution to obtain a loading action sequence for the firmware segment set includes: Perform state encoding and action encoding on the hierarchical state space, the firmware segment loading action space, the set of constraint conditions, and the reward function parameters to obtain Markov decision input parameters; Based on the Markov decision input parameters, construct a DQN decision network for network set-top box startup phase perception, where the DQN decision network includes a state input layer, a hidden calculation layer, an action output layer, and a constraint check layer; According to the DQN decision network, perform value function iteration and policy gradient optimization on the firmware segment loading strategy to obtain Markov optimal policy parameters; Based on the Markov optimal policy parameters, generate an action sequence for the firmware segment set to obtain a loading action sequence; 8. The method for segmental loading of firmware during the startup process of the network set-top box according to claim 1, wherein The step of performing target path loading on the firmware segment set according to the loading action sequence and the timing optimization condition parameters to obtain a loading execution result includes: Identify target loading path parameters based on the immediate loading action, preloading action, deferred loading action, and priority adjustment action in the loading action sequence; Perform network adaptive segmentation on the firmware segment set according to the network bandwidth fluctuation coefficient in the timing optimization condition parameters to obtain hierarchical loading scheduling parameters; Perform temperature-constrained loading execution on the firmware segment set according to the hierarchical loading scheduling parameters to obtain a loading execution result.

9. The method for segmented loading of firmware during the startup process of the network set-top box according to claim 8, wherein The performing temperature-constrained loading execution on the firmware segment set according to the hierarchical loading scheduling parameters to obtain a loading execution result includes: Perform temperature safety threshold checks on the high-priority queue, medium-priority queue, and low-priority queue in the hierarchical loading scheduling parameters to obtain a temperature-constrained scheduling strategy; Perform temperature change prediction during the loading process based on the temperature-constrained scheduling strategy and the current chip temperature parameters to obtain temperature prediction parameters; Perform success rate analysis and pruning on the historical loading decision path according to the temperature prediction parameters to obtain a target loading decision tree; Perform phased temperature-constrained loading execution on the firmware segment set based on the target loading decision tree to obtain a loading execution result.

10. A firmware segmented loading device during the startup process of a network set-top box, characterized in that, Steps for implementing the firmware segmented loading method during the startup process of the network set-top box according to any one of claims 1 to 9 include: A firmware partitioning module for partitioning the network set-top box firmware to obtain a firmware segment set and an inter-segment dependency matrix; A status analysis module for determining a real-time status vector of the startup status based on the hardware sensor data of the network set-top box; A phase identification module for identifying the startup phase of the network set-top box according to the real-time status vector to obtain the current startup phase identifier and timing optimization condition parameters; A loading decision module for performing loading decision and Markov state transition analysis on the firmware segment set based on the current startup phase identifier and the inter-segment dependency matrix to obtain a loading action sequence; A path loading module for performing target path loading on the firmware segment set according to the loading action sequence and the timing optimization condition parameters to obtain a loading execution result.

Citation Information

Patent Citations

  • Game resource updating method, system and equipment and storage medium

    CN116850598A

  • AI model parallel loading and serial reasoning method and system under Serverless architecture

    CN119129752A

  • Offline data loading method based on dynamic priority adjustment

    CN119690543A

  • Quick starting and content preloading method and device of network high-definition player

    CN119835486A

  • Apparatus and methods for optimally using available computer resources for task execution during idle-time for future task instances exhibiting incremental value with computation

    US5784616A

Cited By

  • Firmware loading method, control circuit, medium and program product

    CN121116414A

  • Firmware loading method, processing system, chip and electronic equipment

    CN121277580A

  • Firmware loading method and device of processor, storage medium and program product

    CN121349563A

  • A processor firmware loading method, device, storage medium and program product

    CN121349563B

  • Risc-v heterogeneous system starting method, device, equipment, medium and product

    CN122614431A