Method and device for optimizing service startup sequence, electronic device, and storage medium
By obtaining multimodal data and Monte Carlo tree search algorithm to optimize the service startup sequence, the flexibility problem of the startup process in the substrate management controller is solved, and fast and stable service startup is achieved to adapt to the dynamic environment.
Patent Information
- Application Number
- CN202510832042.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-06-20
AI Technical Summary
In the prior art, the service startup process in the substrate management controller has poor flexibility, resulting in too long or failure of startup time, making it difficult to adapt to dynamic environments with frequent resource fluctuations and load changes.
By obtaining multimodal data of the service, creating an objective function to minimize the total startup time, and using the Monte Carlo tree search algorithm to optimize the service startup sequence, ensure the dependencies and resource utilization among services, and dynamically adjust the startup sequence.
It realizes flexibility and stability of the service startup process, reduces the overall startup time, avoids resource conflicts, and improves the startup efficiency and stability of the server.
Smart Images

Figure CN120371479B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for optimizing a service startup sequence, an electronic device, and a storage medium. Background Art
[0002] With the rapid development of the Internet of Things and big data, the demand for high-performance computing in servers is growing. Among them, the baseboard management controller is the core control unit of the server. The startup order of each service within it directly affects the server's startup status and resource allocation.
[0003] Related technologies typically use a static startup sequence definition method, presetting the startup order of each service to achieve a balance between resource management and service dependencies. However, this static approach struggles to meet requirements in dynamic environments with fluctuating resources and frequent load changes. For example, this can result in excessively long startup times or even startup failures for the control system within the baseboard management controller. In other words, the service startup process in related technologies suffers from a lack of flexibility. Summary of the Invention
[0004] The present application provides a method and device for optimizing a service startup sequence, an electronic device, and a storage medium, so as to at least solve the problem of poor flexibility in the service startup process within a baseboard management controller in the related art.
[0005] According to one aspect of an embodiment of the present application, a method for optimizing a service startup sequence is provided, comprising: obtaining a multimodal data set of a group of services, wherein the group of services includes at least one service within a baseboard management controller, and the multimodal data set includes memory occupancy, resource utilization, and dependencies between services of the at least one service; creating an objective function based on the multimodal data set, wherein the optimization goal of the objective function is to minimize the total startup time of a group of services; determining a target node corresponding to an optimal evaluation index in each layer of the structure based on the objective function and a target tree structure, and obtaining a group of serialized nodes, wherein the evaluation index is used to describe the balance between the reward and access of the node, the number of layers of the target tree structure is equal to the number of services in the group, and a node in the target tree structure represents a service in the group of services; and starting a group of services according to the startup sequence indicated by the optimal path formed by the group of serialized nodes.
[0006] According to another aspect of an embodiment of the present application, a device for optimizing the service startup sequence is also provided, including: a first acquisition unit, used to acquire a multimodal data set of a group of services, wherein the group of services includes at least one service within a baseboard management controller, and the multimodal data set includes the memory occupancy rate, resource utilization rate and dependency relationship between services of at least one service; a creation unit, used to create an objective function based on the multimodal data set, wherein the optimization goal of the objective function is to minimize the total startup time of a group of services; a first processing unit, used to determine the target node corresponding to the optimal evaluation index in each layer structure based on the objective function and the target tree structure, and obtain a group of serialized nodes, wherein the evaluation index is used to describe the balance between the reward and access of the node, the number of layers of the target tree structure is equal to the number of services in a group, and a node in the target tree structure represents a service in a group of services; a startup unit, used to start a group of services according to the startup sequence indicated by the optimal path composed of a group of serialized nodes.
[0007] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the steps of any of the above-mentioned service startup sequence optimization methods through the computer program.
[0008] According to another aspect of the embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned service startup sequence optimization methods when running.
[0009] According to another aspect of an embodiment of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the steps of the aforementioned method for optimizing the service startup sequence.
[0010] By adopting the above-mentioned embodiment provided by the present application, by obtaining multimodal data of each service, such as memory occupancy, resource utilization, and dependencies between services, the comprehensiveness and accuracy of the startup decision are ensured; secondly, by creating an objective function, the goal of minimizing the total startup time can be achieved, and at the same time, resource conflicts and startup delays are effectively avoided by combining the dependencies between services; finally, by searching the optimal path obtained by using the target tree structure, each service is started in the optimal order, which not only reduces the overall startup time of the basic management controller, but also enables the startup order of each service to adapt to the current operating environment, achieving the technical effect of improving the flexibility of the service startup process, and enhancing the startup stability and robustness of the OpenBMC server. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0012] Figure 1 This is a schematic diagram of an application scenario of a method for optimizing the service startup sequence according to an embodiment of the present application.
[0013] Figure 2 This is the process intention of an optional service startup sequence optimization method according to an embodiment of the present application.
[0014] Figure 3 This is a schematic diagram of an optional Monte Carlo tree network topology structure according to an embodiment of the present application.
[0015] Figure 4 This is an optional Monte Carlo tree search workflow diagram according to an embodiment of the present application.
[0016] Figure 5 This is Example 1 of performing simulation iterations according to the Monte Carlo tree structure.
[0017] Figure 6 This is Example 2 of performing simulation iterations based on the Monte Carlo tree structure.
[0018] Figure 7 This is Example 3 of performing simulation iterations according to the Monte Carlo tree structure.
[0019] Figure 8 This is an overall schematic diagram of an optional service startup sequence optimization method according to an embodiment of the present application.
[0020] Figure 9This is a structural block diagram of an optional service startup sequence optimization device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0022] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0023] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0024] According to one aspect of the embodiment of the present application, a method for optimizing the service startup sequence is provided. Optionally, in this embodiment, the above-mentioned method for optimizing the service startup sequence can be applied to, but is not limited to, Figure 1 In the hardware scenario shown, the server device may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. The server device may also include a transmission device 106 and an input / output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0025] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for optimizing the service startup sequence in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0026] Transmission device 106 is used to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by a communication provider of the server device. In one embodiment, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0027] The embodiments of the present application can be applied to, but are not limited to, adaptive adjustment and optimization scenarios of the service startup sequence of multiple services within a control system, for example, optimization scenarios of the startup sequence of each service within a baseboard management controller. For ease of understanding, specific examples of several application scenarios are given below.
[0028] (1) Automated Operation and Maintenance of Data Centers: In large-scale data centers, there are tens of thousands of servers, and the dependencies between services are complex and changeable. The embodiments of the present application can monitor the resource usage of each service and the dependencies between services in real time, dynamically adjust the startup sequence, reduce unnecessary waiting time, and effectively avoid resource competition and dependency issues, thereby accelerating the overall startup process of the data center and improving operation and maintenance efficiency.
[0029] (2) Rapid configuration of high-performance computing clusters: High-performance computing clusters often need to complete a large number of computing tasks in a short period of time, placing extremely high demands on startup speed and resource scheduling. The embodiments of the present application can minimize cluster initialization time by intelligently optimizing the service startup sequence, ensuring the timely execution of computing tasks while reducing CPU and memory loads during the startup process, thereby providing a more stable and efficient operating environment for high-performance computing clusters.
[0030] (3) Elastic scaling of cloud computing platforms: In cloud computing platforms, dynamic resource allocation and scaling are the norm. By optimizing the startup sequence using the embodiments of the present application, the platform can flexibly adjust the startup priority of services based on the current actual load and resource usage, ensuring that necessary services can be started quickly and accurately even in the case of large resource fluctuations, achieving efficient resource utilization and rapid system response.
[0031] (4) Instant startup of edge computing devices: Edge computing devices are typically deployed at the edge of the network to reduce data transmission latency and alleviate the load on core data centers. These devices may face limited computing resources and unpredictable network environments. The technical solution of this application helps such devices quickly establish correct dependencies between services when they start up, reducing initial startup time, ensuring that the devices can be put into operation in the shortest possible time, responding to edge data processing needs in a timely manner, and improving user experience.
[0032] By applying the technical solution of the present application to the above-mentioned scenarios, whether in resource-intensive data centers, high-performance computing clusters with strict requirements on computing speed, elastic scaling environments of cloud services, or instant computing scenarios at the edge of the network, the technical solution of the present application can give full play to its advantages and provide strong guarantees for the efficient startup and stable operation of the server through intelligent startup sequence optimization.
[0033] The service startup sequence optimization method of the embodiment of the present application can be executed by a server device, or by the server device in conjunction with at least one of the terminal devices (also understood as input / output devices 108). The service startup sequence optimization method of the embodiment of the present application can also be executed by a client installed on the terminal device.
[0034] Taking the optimization method of the service startup sequence in this embodiment executed by the server as an example, Figure 2 This is a flow chart of an optional service startup sequence optimization method according to an embodiment of the present application. Figure 2 As shown, the process of the method may include steps S202 to S208.
[0035] Step S202 : obtaining a multimodal data set of a group of services, wherein the group of services includes at least one service in a baseboard management controller, and the multimodal data set includes memory occupancy, resource utilization, and dependencies between services of the at least one service.
[0036] Step S204 : creating an objective function based on the multimodal data set, wherein the optimization goal of the objective function is to minimize the total startup time of a group of services.
[0037] Step S206: Based on the objective function and the target tree structure, determine the target node corresponding to the optimal evaluation indicator in each layer of the structure to obtain a set of serialized nodes, where the evaluation indicator is used to describe the balance between the reward and access of the node. The number of layers of the target tree structure is equal to the number of services in a group, and a node in the target tree structure represents a service in a group of services.
[0038] Step S208: Start a group of services according to the startup sequence indicated by the optimal path formed by a group of serialized nodes.
[0039] Before explaining the technical solution of this application, the meaning of the professional terms or professional nouns involved is briefly introduced.
[0040] OpenBMC: Open Baseboard Management Controller is an open source software architecture used to build a dedicated Linux system image of a complete BMC (Baseboard Management Controller). It can also be understood as the code logic of the BMC internal control system on the server motherboard.
[0041] BMC: A microcontroller or chip used for server hardware monitoring and management. It can monitor and control the server's hardware status in real time, such as temperature, voltage, fan speed, etc. OpenBMC allows for efficient management and maintenance of servers.
[0042] Monte Carlo Tree Search (MCTS): An algorithm used for decision support, particularly in game AI, that uses simulation and statistical evaluation to find optimal actions. MCTS progressively builds and optimizes a search tree through four stages: selection, expansion, simulation, and backpropagation, ultimately finding the optimal solution.
[0043] Multimodal data fusion: This can include, but is not limited to, collecting information from different types of sensors or data sources and combining them to obtain more comprehensive and accurate data. In this embodiment of the present application, multimodal data includes, but is not limited to, service memory usage, resource utilization, and dependencies between services.
[0044] like Figure 3 As shown, the basic process of the Monte Carlo tree search model includes the following steps.
[0045] (1) Selection
[0046] Specifically, starting from the root node (the initial state), nodes are selected as they progress down the tree structure. The selection is based on the number of visits to each node and the evaluation values of its children. An upper confidence bound formula is often used to balance exploration (exploring under-visited nodes) and exploitation (selecting the currently optimal node).
[0047] In this embodiment, it is possible but not limited to start from the root node and recursively select child nodes according to a certain strategy (such as the UCT strategy).
[0048] (2) Expansion
[0049] When a leaf node is reached (i.e., a node with no child nodes to choose from during the selection phase), if the game state corresponding to this leaf node has not been fully explored (i.e., there are still unexplored legal moves), one or more new child nodes are expanded from this leaf node. These new nodes represent new possible game states. In other words, the leaf node is expanded to generate new child nodes.
[0050] (3) Simulation
[0051] Starting from the newly expanded node, a random simulation (also called a "rollout") is performed. In this phase, the algorithm no longer searches the tree structure, but instead randomly selects legal moves until a terminal state (such as the end of the game) is reached. This process can use simple heuristics to quickly evaluate the outcome of the game. For example, in a chess game, moves can be randomly selected until a winner is determined.
[0052] In this embodiment, simulation can refer to, but is not limited to, starting with a new node selected from the expanded nodes, and the algorithm performs a series of random simulations. During the simulation, a default strategy (such as a random strategy or a heuristic-based strategy) is typically used to select actions, thereby achieving the purpose of quickly estimating the node value.
[0053] (4) Back propagation
[0054] After the simulation concludes, the simulation results (such as wins, losses, rewards, and penalties) are propagated back from the newly expanded node to the root of the tree. During this process, the visit count and reward value (such as wins and losses) of each node are updated. For chess games, a win can be recorded as a plus of 1 (reward) and a loss as a minus of 1 (penalty). The specific reward value depends on the rules and goals of the specific scenario.
[0055] In this embodiment, back propagation can be understood as, but is not limited to, after the simulation is completed, the algorithm will back propagate the obtained results back to the root node of the search tree and update the statistical data of each node on the path.
[0056] The aforementioned set of services can include, but is not limited to, multiple types. Each service plays a specific role in system startup and operation. The following are several typical services. Optimizing their startup order is key to achieving high-performance servers.
[0057] (1) Basic hardware and firmware services
[0058] POST (Power-On Self Test): The first step when the server starts up, which performs a comprehensive check on the hardware to ensure that all components are working properly.
[0059] BMC service: manages the health status of the server, monitors temperature, voltage, fan speed, etc., and ensures that the hardware runs in a safe environment.
[0060] (2) Network services
[0061] Network interface initialization service: Initializes the server's network interface, such as the Ethernet card, to ensure that the server can connect to the network.
[0062] DHCP (Dynamic Host Configuration Protocol) service: obtains an IP address and other configuration information from a network server, enabling the server to communicate over the network.
[0063] SSH (Secure Shell) service: provides secure remote login and management, allowing administrators to control the server through the network.
[0064] (3) Storage services
[0065] RAID (Redundant Array of Independent Disks) initialization service: configures disk arrays to provide data redundancy and performance improvements.
[0066] (4) File system mounting service.
[0067] Mount the server's hard disk partition to prepare for reading and writing data.
[0068] (5) Operating system and system management services
[0069] Initialize system services: load core system components such as the kernel, drivers, system libraries, etc.
[0070] Log service: records events and status during system operation, which is crucial for problem diagnosis and system maintenance.
[0071] Monitoring service: Continuously monitors server resource usage, such as CPU, memory, and disk I / O, to aid in resource management and fault detection.
[0072] (6) Application Services
[0073] Database services, such as MySQL and PostgreSQL, provide data storage and retrieval capabilities and are crucial for database-dependent applications.
[0074] (7) Web Services
[0075] Start a web server (such as Apache or Nginx) to prepare to process web requests.
[0076] (8) Application Services
[0077] Launch specific applications, such as mail servers, game servers, video transcoding services, etc.
[0078] During the operation of the control system within the BMC, the multimodal data set S={s1,s2,...,s n}, for example, including each service's memory usage, resource utilization (such as CPU usage), and service dependencies. n For example, the multimodal data obtained is s1~s n , you need to obtain their respective memory consumption and CPU usage at startup, as well as s1~s n Is there a dependency conflict issue, such as service s1 must be before service s2.
[0079] Based on the acquired multimodal data set, an objective function is created to minimize the total time of the entire server startup process. The objective function is designed to take into account the startup time and resource usage of services, as well as their dependencies, to ensure that there is no resource competition or dependency conflicts, achieving a fast and stable startup.
[0080] Based on the aforementioned objective function and target tree structure (a tree structure representing all possible startup sequences, also known as the MCTS algorithm), an iterative process determines the target node corresponding to the optimal evaluation metric (maximum UCT value) at each layer of the structure, ultimately resulting in a set of sequenced nodes. This sequence of nodes represents the order of nodes from the root node, and the order of these nodes represents the optimal order for service startup.
[0081] In this embodiment, the above evaluation indicators can be used, but are not limited to, to balance the node reward (based on the optimization result of the objective function) and the number of visits, to ensure a balance between the exploration and utilization of the node.
[0082] The UCT (Upper Confidence bounds applied to Trees) value is a key concept in the Monte Carlo Tree Search (MCTS) algorithm, used to guide search and decision-making under uncertain environmental factors.
[0083] Among them, the network topology structure of the Monte Carlo tree search model can be referred to Figure 3 As shown, the processing process mainly includes the following points.
[0084] (1) Selection: Starting from the root node, recursively select child nodes according to a certain strategy (such as the UCT strategy).
[0085] (2) Expansion: Expand the leaf nodes to generate new child nodes.
[0086] (3) Simulation: Starting from a new node selected in the expansion phase, the algorithm performs a series of random simulations. During the simulation, a default strategy (such as a random strategy or a heuristic-based strategy) is usually used to select actions. This allows for a quick estimation of the node's value.
[0087] (4) Backpropagation: After the simulation is completed, the algorithm will backpropagate the obtained results back to the root node of the search tree and update the statistics of each node on the path.
[0088] The following combination Figure 4 , explains the specific workflow of Monte Carlo tree search.
[0089] S402, start searching.
[0090] S404: Select one service from the service set and use its corresponding node as the root node.
[0091] S406: Determine whether the current node has a branch.
[0092] If yes, execute step S408; otherwise, jump to step S414.
[0093] Starting from the current node, determine whether there is a branch under the node (that is, whether the current node is a leaf node).
[0094] S408, determining whether all current nodes have been simulated (emulated).
[0095] If yes, execute step S410; otherwise, execute step S412.
[0096] That is, if there is a branch, each branch node simulates the game, backpropagates, and then calculates the UCT value of each node. The largest one is used as the current node, and then returns to step S406.
[0097] S410, calculate the UCT value of each branch node, and use the child node with the largest UCT value as the current node. The calculation formula and method of the UCT value will be described in detail below with reference to specific embodiments.
[0098] S412 , simulating the unsimulated branch nodes, and back-propagating to the root node based on the statistical data after simulation, while updating the statistical data of the path nodes.
[0099] S414, enumerate all possible actions of the current node.
[0100] For example, expand (add) a branch node for the current node and add the expanded branch node to the search tree. Figure 3 The expansion steps are shown.
[0101] That is, if there is no branch (proving that the node is already a leaf node), then add a branch below it (a better move in this state), take the first one as the current node, and then simulate a game with the opponent and backpropagate.
[0102] S416, after simulating the expanded branch node, obtain the simulation result (such as reward value, number of visits) of the branch node, and backpropagate from the branch node to the root node based on the simulation result.
[0103] During this process, the statistics of each node on the backpropagation path are updated, and this round of iteration ends. This cycle repeats until the termination condition is met (for example, the number of iterations reaches a preset threshold).
[0104] For example, in Figure 5In the first iteration shown, starting from the root node, the UCT values of all child nodes are considered infinite due to the lack of historical data. Therefore, a service can be randomly selected for simulation. For example, node 2 is selected (assuming that node 2 corresponds to service S2). In each subsequent iteration, the most promising service is selected for in-depth exploration based on the UCT calculation formula, until the tree depth reaches the total number of services. This means that a complete startup sequence path has been explored. This process is repeated multiple times, each time backpropagating based on the simulation results to update the node statistics, ultimately forming a tree that contains all possible startup sequences and their scores. The UCT calculation formula is described in detail below in conjunction with specific examples.
[0105] After multiple iterations, the MCTS algorithm converges to at least one high-scoring service startup path. The highest-scoring path is selected, becoming the optimal path, and the services within the OpenBMC server are started in the order indicated by this path. For example, if the optimal path indicates the startup order of services S1 → S3 → S2 → S4, the next time the BMC is started, the services will be started in this order, achieving the shortest startup time, lowest resource consumption, and highest startup success rate.
[0106] The method provided by the embodiments of this application overcomes the limitations of traditional static service startup ordering and is particularly suitable for modern server environments with fluctuating resources, numerous services, and complex dependencies. Through dynamic adjustment, it can significantly shorten OpenBMC service startup time, reduce resource consumption, and improve startup stability and reliability. It is suitable for data centers, cloud computing platforms, and any server cluster requiring rapid response and efficient operation and maintenance.
[0107] In summary, this embodiment of the application introduces multimodal data fusion technology and the Monte Carlo tree search model (or Monte Carlo tree search algorithm) to propose a new dynamic service startup sequence optimization solution, providing strong technical support for the efficient startup of BMC control systems. Through continuous simulation and optimization, this technology can automatically adjust the service startup sequence, effectively addressing the challenges of dynamic resource changes and improving overall server performance.
[0108] By acquiring multimodal data of each service, such as memory occupancy, resource utilization, and inter-service dependencies, the comprehensiveness and accuracy of startup decisions are ensured. Secondly, by creating an objective function, the goal of minimizing the total startup time can be achieved. At the same time, by combining the dependencies between services, resource conflicts and startup delays are effectively avoided. Finally, by searching the optimal path using a target tree structure, each service is started in the optimal order. This not only reduces the overall startup time of the basic management controller, but also enables the startup order of each service to adapt to the current operating environment, achieving the technical effect of improving the flexibility of the service startup process and enhancing the startup stability and robustness of the OpenBMC server.
[0109] In an exemplary embodiment, the above-mentioned method determines the target node corresponding to the optimal evaluation index in each layer structure based on the objective function and the target tree structure to obtain a set of serialized nodes, including: when the number of layers of the target tree structure is n, starting from the root node of the target tree structure, performing simulation iterations in each layer structure in turn to obtain the final cumulative reward and final number of visits of each child node after the last round of iterative update, where n is a positive integer greater than or equal to 2; based on the final cumulative reward and the final number of visits, determining the final evaluation index of each node in the target tree structure to obtain an evaluation index set; determining the target node corresponding to the optimal evaluation index in each layer structure from the evaluation index set to obtain a set of serialized nodes.
[0110] In this embodiment, the target tree structure may be, but is not limited to, a tree data structure constructed by a Monte Carlo tree search algorithm, such as Figure 5 As shown, service S1 represents node 1. Each node represents a service. The number of tree levels n is equal to the number of services in the service set. Based on this target tree structure, simulation iterations are performed to explore different service startup sequences to find the optimal path.
[0111] The so-called simulation iteration is one of the key steps of the Monte Carlo tree search algorithm. It starts from a node in the target tree structure, randomly or based on a specific strategy, selects service execution, records the results, and then backtracks to update the node statistics on the path, thereby gradually optimizing the tree structure and approaching the optimal solution.
[0112] The final cumulative reward and final visit count can refer to, but are not limited to, the cumulative reward and visit count recorded for each node during the MCTS iteration process. The cumulative reward reflects the minimum cumulative score of the objective function (minimizing total startup time) after launching the service sequence along the node's path; the visit count indicates how frequently the node has been explored. Together, these two factors determine the node's final evaluation metric.
[0113] For example, during a search iteration (which can also be understood as a simulation iteration), suppose a city is triggered from the root node and executes a startup sequence, such as starting the network service first, then the database service, and finally the application service. If this startup sequence results in a shorter server startup time and no resource conflicts, the algorithm will give this set of actions a positive reward (indicating that it is a good performance action).
[0114] The positive reward is then propagated back to each node along this path in the decision tree, updating their cumulative reward (Q value) and number of visits (N value). In particular, the node representing the decision to start the network service first will be marked as a "proven action" because it leads to a positive result in the current context.
[0115] As the algorithm continues to simulate and update statistics, actions or policy paths that consistently produce positive rewards will gradually become dominant, as their UCT values will become increasingly higher. Ultimately, at the end of the search process or when convergence occurs, the algorithm will tend to select those "proven effective" paths with the highest average reward as the optimal policies for actual server startup order optimization.
[0116] When optimizing the service startup sequence according to the aforementioned objective function and target tree structure, if a particular service startup sequence enables faster and more stable server startup, without resource conflicts or dependency issues, then this service startup sequence can be considered a "proven action." The algorithm uses a positive reward feedback mechanism to increase the probability of this sequence being chosen again, thereby utilizing this strategy more frequently in future searches. This mechanism ensures that the algorithm accurately finds and utilizes the best-performing decision paths in uncertain environments.
[0117] By executing multiple rounds of simulation iterations, the evaluation metrics for each node in the target tree structure were meticulously optimized, ultimately determining the optimal path for service startup. This process effectively accumulated extensive data on service performance under different startup sequences, and through statistical analysis, the most promising startup sequence was identified. This significantly improved OpenBMC server startup efficiency and resource management capabilities, reducing startup delays, avoiding resource contention, and enhancing system stability and reliability.
[0118] In an exemplary embodiment, the above-mentioned simulation iteration is performed in each layer structure in sequence starting from the root node of the target tree structure to obtain the final cumulative reward and the final number of visits of each child node in the last round of iterative update, including: performing simulation iteration on the i-th layer structure through the following steps, i is a positive integer greater than or equal to 1 and less than or equal to n: based on the current evaluation index of the i-th subgroup node in the i-th layer structure, selecting the j-th node from the i-th subgroup node, wherein the j-th current evaluation index of the j-th node is the evaluation index with the largest value in the i-th subgroup node, and j is a positive integer less than or equal to the number of nodes included in the i-th layer structure; in the case where the j-th node has a branch node, based on the target function number, determine the jth cumulative reward of the jth node, and update the current number of visits to the jth node to the jth number of visits, wherein each time the jth node is visited, the reward and the number of visits of the jth node are updated, and the branch node includes the child node of the jth node or the leaf node of the jth node; determine the jth path consisting of the jth subgroup nodes that need to be visited between the jth node and the root node; according to the jth path, backpropagate from the jth node to the root node, and based on the jth cumulative reward and the jth number of visits, update the statistical data of the remaining nodes in the jth subgroup node except the jth node, wherein the statistical data includes the cumulative reward, the number of visits and the evaluation index.
[0119] Before executing the simulation iteration, it is necessary to collect the system startup data and construct the objective function. The specific steps are as follows: S11 to S18.
[0120] S11, get the service set: .
[0121] S12, obtain the service startup time using the following formula (1):
[0122] (1)
[0123] in, Representation Service The startup time, i is a positive integer greater than or equal to 1 and less than or equal to n, Represents the multimodal data of the i-th service.
[0124] S13, using the following formula (2) and formula (3), respectively obtain the service's CPU usage F2 and memory usage F3:
[0125] (2)
[0126] (3)
[0127] S14, construct a directed acyclic graph to represent the dependency relationship between services.
[0128] S15, using weighted data fusion, 、 、 Perform fusion processing to obtain fused data or data features .
[0129] S16, construct the objective function shown in the following formula (4) to achieve the goal of minimizing the total startup time:
[0130] (4)
[0131] in, Indicates the cumulative time from the start time to the completion of the i-th service startup. In other words, is the startup time of the i-th service, which depends on the time after all predecessor services (all services started before the i-th service) are completed. Represents the data after fusion processing of multimodal data of the i-th service. Obviously, It exists in the form of a mathematical function.
[0132] S17, construct the positive reward function shown in the following formula (5):
[0133] (5)
[0134] That is, the positive reward of a node is the inverse of the total startup time; the negative reward depends on the maximum penalty value given when the startup fails due to a conflict, for example, R=−1000.
[0135] S18, construct the UCT formula as shown in the following formula (6).
[0136] (6)
[0137] in, Indicates the accumulated rewards of child nodes, Indicates the number of child node visits, represents the number of parent node visits, and C is a hyperparameter that controls the exploration weight (usually set to ).
[0138] After the modeling is completed, a Monte Carlo tree is constructed, i.e., the target tree structure. The specific steps are as follows S22 to S25.
[0139] S21, constructing a root node, selecting a service from the service set S and making its corresponding node the root node.
[0140] For example, Figure 5 As shown in the figure, it is assumed that node 1 corresponding to the first service is taken as the root node, and its Q value (reward) and N value (number of visits) are both 0.
[0141] S22: Since node 1 is a new node, expand it.
[0142] Since nodes 2 to n have not been simulated, the cumulative rewards of nodes 2 to n are Q2~Q n are all 0, and none of the child nodes have been visited, so N2~N n Both are 0.
[0143] S23, selecting (Selection) a node that meets the preset conditions from the second layer structure (the i-th layer structure, when i=2).
[0144] Will When the node information (i.e., the number of visits) is substituted into the above formula (6), the UCT values are all infinite because the denominators are all zero. By default, from all nodes in the second layer (which can also be understood as the nodes in the i=2 subgroup), node 2 is preferentially selected as the target object of the current traversal in a left-to-right order.
[0145] S24: Since node 2 is selected as a leaf node in step S23 (ie, there is no branch node below node 2), and node 2 is a new node, simulation is required first.
[0146] According to the minimum startup time formula and reward function shown in the above formula (4), the cumulative reward Q2 value of node 2 is calculated. Assume that Q2=a, and update the number of visits N2 value of node 2 at the same time.
[0147] S25, backpropagation, backpropagates back to the root node of the target tree structure (which can also be understood as the search tree) and updates the statistics of each node on the path.
[0148] like Figure 5 As shown, after simulating node 2 and updating the cumulative reward and number of visits of node 2, the cumulative reward Q1 of the root node is updated to the value a through back propagation.
[0149] At this point, the first round of simulation is completed and the second round of simulation begins.
[0150] S31, selecting (Selection) a node that meets the preset conditions from the second-level structure.
[0151] According to the UCT values of all nodes in the second layer obtained in step S23 above, the largest one is selected. After the first round of simulation above, Q2=a, Q3~Q n are all 0, and according to the default order from left to right, the current round of selection is as follows Figure 6 Node 3 is shown as the target object.
[0152] S32, performing a current round of simulation on the target object.
[0153] According to the startup time minimization formula and reward function shown in the above formula (4), the cumulative reward Q3 value of node 3 is calculated. Assume that Q3 = b, and update the number of visits N3 value of node 3 at the same time.
[0154] S33, backpropagation, backpropagates back to the root node of the target tree structure (which can also be understood as the search tree) and updates the statistics of each node on the path.
[0155] like Figure 6 As shown, after simulating node 3 and updating the cumulative reward and number of visits of node 3, the cumulative reward Q1 of the root node is updated to the value a+b through back propagation.
[0156] At this point, the second round of simulation is completed. According to the method in the first and second rounds of simulation, the simulation iteration is continued until the n-1th round of simulation is reached, completing the simulation traversal of all nodes in the second layer structure.
[0157] like Figure 6 As shown, after the simulation traversal of the second-level structure is completed, the cumulative reward Q1 of the root node is updated to the value a+b+...z.
[0158] After the n-1th round of simulation is completed, the nth round of simulation begins, with specific steps such as S41 to S44.
[0159] S41, selecting the target object at the current moment.
[0160] According to the above step S33, after completing the n-1th round of simulation, the updated cumulative reward Q value and visit count N value of all nodes in the second layer structure are obtained. The UCT values of all nodes in the second layer are recalculated, and the one with the largest value is selected as the current target object.
[0161] Assuming that the UCT value of node 2 is the largest at this time, node 2 is selected as the current target object. Figure 7 shown.
[0162] S42: Since node 2 has been simulated and has no branch nodes under it, it is expanded and the n+1th node is created.
[0163] Among them, the n+1th node can be but is not limited to node 3, or other nodes that meet the dependency relationship. The node n+1 here does not represent other nodes beyond n nodes. On the contrary, the node n+1 is still a node included in the n nodes corresponding to a set of services.
[0164] S43, performing a current round of simulation on the target object.
[0165] Still according to the minimum startup time formula and reward function shown in the above formula (4), calculate the cumulative reward Q of node n+1 n+1 value, assuming Q n+1 =z, and update the number of visits to node n+1, N n+1 value.
[0166] S44, backpropagation, backpropagates back to the root node of the target tree structure (which can also be understood as the search tree) and updates the statistics of each node on the path.
[0167] like Figure 7 As shown, after simulating node n+1 and updating the cumulative reward and number of visits of node n+1, the cumulative reward Q1 of the root node is updated to the value a+b+...+z through back propagation.
[0168] Follow the above method to simulate iterations in sequence and complete n layers of iterations. Then, starting from the root node, recalculate the UCT values of all nodes in each layer of the structure and select the node with the largest UCT value in each layer to form the final optimization path. For example, Figure 7 As shown in Figure 2, it is assumed that the final optimal path is node 1 → node 2 (obtained by the second layer selection) → node 3 (obtained by the third layer selection).
[0169] Through the technical solution in this embodiment, the service startup sequence of the baseboard management controller can be finely adjusted, not only focusing on the resource usage and startup time of the service itself, but also considering the dependencies and resource competition between services. The efficiency and stability of the startup process are significantly improved, avoiding the problem that the static startup sequence cannot adapt to the dynamically changing environment. For example, when resources are tight, the algorithm can intelligently select those services with less resource usage or simpler dependencies to start first, thereby shortening the overall startup time and reducing the possibility of startup failure. Through dynamic simulation and statistical analysis, an efficient and flexible startup strategy optimization tool is provided for server management.
[0170] In an exemplary embodiment, the above-mentioned determination of the jth cumulative reward of the jth node based on the objective function and updating the current number of visits to the jth node to the jth number of visits include: determining the minimum cumulative startup time from the start of startup along the jth path to the completion of startup of the jth service corresponding to the jth node based on the objective function; when the jth service and the predecessor service of the jth service are successfully started, determining the inverse of the minimum cumulative startup time as the jth cumulative reward; performing an addition operation on the current number of visits to obtain the jth number of visits.
[0171] In this embodiment, the key steps of how to determine the minimum cumulative time for service startup based on the objective function, calculate the cumulative reward based on this, and how to update the number of node visits are further refined.
[0172] Assume that according to the above formula (4), the minimum cumulative time from the start of startup to the completion of startup of the jth service along the jth path is calculated. This objective function reflects the comprehensive consideration of CPU / memory resource usage, inter-service dependencies, and startup time during the service startup process, aiming to find the optimal path that minimizes the overall startup time.
[0173] For example, assume that the startup process of all services includes 5 service sequences, service 1 to service 5. The startup of service 3 depends on services 1 and 2, and the startup time function of service 3 is the following formula (7):
[0174] T(s3)=T(s1)+T(s2)+t(s3) (7)
[0175] Here, T(s1) and T(s2) represent the startup times of Service 1 and Service 2, respectively, and t(s3) is the startup time of Service 3 itself. Through multiple simulations of the MCTS algorithm, it is easy to see that the cumulative startup time along path P3 (node 1 → node 2 → node 3) is 5 seconds. This is the shortest time from startup to completion of Service 3 among all possible paths. Therefore, 5 seconds is determined to be the minimum cumulative startup time.
[0176] After determining the minimum cumulative startup time, this embodiment further describes how to determine a cumulative reward based on time efficiency when the jth service and its predecessor services are successfully launched. Specifically, the reciprocal of the minimum cumulative startup time is used as the cumulative reward. This positive incentive mechanism effectively guides the algorithm to prioritize paths that can quickly launch services.
[0177] For example, let's continue with the launch of Service 3. If all services along path P3 (Node 1 → Node 2 → Node 3) are successfully launched, and the cumulative time is 5 seconds, then the cumulative reward R3 for this path is 1 / 5. This means that path P3 receives a higher reward for its efficient launch of Service 3, which incentivizes the MCTS algorithm to prioritize this path, or similar time-efficient paths, in future explorations.
[0178] After the service is successfully started, the node's visit count is updated. This step is crucial for the algorithm's convergence and path optimization. It enables the algorithm to more accurately assess the value of the path based on historical data, thereby making more accurate choices in subsequent iterations.
[0179] For example, after successfully starting service 3 along path P3, the current access count for node 3 (representing service 3) is incremented by 1, updating to the incremented value. Assume that initially, the current access count for node 3 is 0, and after a successful start, it becomes 1. As the algorithm iterates, the access count for node 3 gradually increases. This update process reflects the frequency with which node 3 and its corresponding path are successfully explored, helping the algorithm dynamically adjust its search strategy to more frequently explore proven paths.
[0180] This example provides a precise evaluation method for the Monte Carlo Tree Search algorithm in optimizing service startup sequences by quantifying the minimum cumulative startup time, determining a cumulative reward mechanism, and updating the number of visits. This method not only accurately reflects the time efficiency of service startup paths but also guides the algorithm to explore efficient paths through a positive incentive mechanism. It also ensures that the algorithm can dynamically adjust its search direction based on historical data, avoiding ineffective exploration and improving search efficiency and path optimization accuracy.
[0181] In an exemplary embodiment, the above method also includes: when the j-th node does not have a branch node, expanding the target branch node for the j-th node, wherein the target branch node includes nodes other than the j-th node in a group of nodes, and a group of nodes corresponds to a group of services; based on the objective function, determining the target cumulative reward of the target branch node, and updating the target number of visits to the target branch node; determining the j+1th path consisting of the j+1th sub-group node that needs to be visited between the target branch node and the root node; according to the j+1th path, backpropagating from the target branch node to the root node, and updating the statistical data of the remaining nodes in the j+1th sub-group node except the target branch node based on the target cumulative reward and the target number of visits.
[0182] Combine Figure 7As shown in the figure, assuming that the jth path is node 1→node 2 before expansion, after the branch node (node 3) is expanded for node 2, the j+1th path is node 1→node 2→node 3.
[0183] When the MCTS algorithm reaches the jth node in the search tree and finds no branch nodes, it means that the subsequent startup sequence of the jth service corresponding to the jth node has not been fully explored. Then, it considers expanding the target branch node for this node. The target branch node here is created from the set of services other than the jth service itself. This expansion process is intended to increase the breadth of the algorithm's exploration, ensuring that all potential service startup sequences are considered.
[0184] For example, suppose the service startup sequence includes Service 1, Service 2, Service 3, Service 4, and Service 5. Service 3 is a leaf node with no downstream branches. In this case, node 4 corresponding to Service 4 is selected from the service set {Service 4, Service 5} associated with Service 3 as the target branch node for expansion. This step essentially introduces the possibility of directly attempting to start Service 4 after Service 3 successfully starts, expanding the algorithm's search scope.
[0185] After expanding the branch nodes, the objective function is to minimize the cumulative startup time. Specifically, by simulating the startup of Service 4 multiple times, a set of data is generated, from which the minimum cumulative startup time and the corresponding reward are calculated. The visit count for Node 4 is then updated, indicating the number of times Node 4 has been successfully explored. This provides important guidance for subsequent algorithm selection.
[0186] For example, after successfully expanding the target branch node (node 4), simulations show that the startup times from node 3 to node 4 are 7 seconds, 6 seconds, and 6.5 seconds, respectively. Based on this data, the average startup time is determined to be 6.33 seconds, which is the minimum cumulative startup time. To determine the cumulative reward, the inverse of the minimum cumulative startup time (6.33 seconds) is used as the target cumulative reward for node 4. Finally, the number of visits to node 4 is updated based on the number of simulations. Assuming three simulations, the number of visits is updated from the initial 0 to 3, reflecting the number of effective explorations of node 4.
[0187] Based on the target cumulative reward and target number of visits calculated above, update the statistical data of the j+1th subgroup node, including but not limited to updating the cumulative reward and number of visits of each node.
[0188] For example, the path from the target branch node (node 4) back to the root node might include nodes 3, 2, and 1. Based on the target cumulative reward and target visit count of 3 for node 4, backpropagate along the path from node 4 to node 3 to node 2 to node 1. For each node, update its statistics. For example, update node 3's cumulative reward so that the updated cumulative reward includes node 4's reward, and the visit count increases accordingly. Repeat this process until all statistics for the root node are updated.
[0189] Through a series of steps involving branch node expansion, target reward determination, and backpropagation to update statistical data, comprehensive exploration and optimization of service startup paths are achieved. The introduction of new nodes and iterative simulation not only broadens the search horizon but also ensures that every effective exploration is accurately recorded and reported, promoting rapid convergence of the algorithm to an efficient startup path. Furthermore, the statistical data update mechanism during backpropagation enhances the intelligence and adaptability of the service startup sequence optimization process, enabling flexible response to changes in the number of services and the uncertainty of service dependencies.
[0190] In an exemplary embodiment, the above-mentioned determination of the final evaluation index of each node in the target tree structure based on the final cumulative reward and the final number of visits includes: obtaining each node in turn from a group of nodes as the current node; determining the current final cumulative reward of the current node from the final cumulative reward, and determining the current final number of visits of the current node from the final number of visits; obtaining a first value by obtaining the ratio between the current final cumulative reward and the current final number of visits; determining a second value based on the number of visits of the parent node of the current node, the current final number of visits and the target hyperparameter, wherein the target hyperparameter is used to control the exploration weight in the simulation iteration process using the target tree structure; and determining the sum of the first value and the second value as the current final evaluation index of the current node.
[0191] After all nodes in the target tree structure have been simulated and traversed, the UCT value of each node is recalculated. For details, please refer to the above formula (6).
[0192] Each node is selected from all nodes in turn as the current node. For each selected node, the current final cumulative reward and current final visit count are determined based on the accumulated results of the previous search tree. These values are calculated after multiple iterations of the node and reflect the node's exploration status and potential value.
[0193] For example, assume a group of nodes includes Node 1, Node 2, and Node 3. After multiple rounds of simulation according to the above embodiment, the final cumulative reward and visit count for each node are obtained. For example, the current final cumulative reward for Node 2 is 0.2, and the current final visit count is 50.
[0194] Based on the ratio between the current final accumulated reward and the current final number of visits, the first value is calculated. As shown in the above formula (6): This actually reflects the average reward size of each node visit and is an important indicator for measuring node value. For example, taking node 2 as an example, its current final cumulative reward is 0.2 and the number of visits is 50. Then the first value is 0.2 / 50 = 0.004.
[0195] Secondly, the second value is determined based on the number of visits to the parent node of the current node (such as node 2), the current final number of visits, and the target hyperparameter. The target hyperparameter here is used to balance the exploration and utilization of the algorithm and control the exploration tendency of the algorithm when facing unknown nodes. For example, assuming that the number of visits to the parent node of node 2 (assuming it is node 1) is 200, and the number of visits to node 2 is 50, the target hyperparameter is set to Then the second value can be calculated by the above formula (6), and the larger the second value is, the more the algorithm tends to further explore the node.
[0196] The final evaluation metric for the current node is determined by adding the first and second values. This metric combines the node's historical performance (the first value) with the algorithm's exploration tendency (the second value), providing a comprehensive basis for selecting subsequent nodes. A higher UCT value indicates a higher overall value for the current node, and the algorithm is more inclined to select paths containing the current node for in-depth exploration.
[0197] In this embodiment, the calculation of the first and second values, and the combined evaluation metric between them, provides a more detailed evaluation mechanism for intelligent optimization of service startup order. It not only considers the historical statistical performance of nodes, ensuring the utilization of known efficient paths, but also introduces an exploration weight factor to maintain the algorithm's exploration of unknown potential optimization paths. This significantly improves the effectiveness of the Monte Carlo Tree Search algorithm in the OpenBMC server startup process, ensuring rapid convergence to the optimal startup order even in complex service dependencies and resource allocation environments.
[0198] In an exemplary embodiment, the above-mentioned creation of an objective function based on a multimodal data set includes: obtaining the cumulative startup time from the start of startup to the completion of startup of the kth service in a group of services, where k is a positive integer greater than or equal to 1 and less than the number of services in a group of services; determining the kth group of multimodal data of the kth service from the multimodal data set; obtaining a fused function by fusing the kth group of multimodal data; and obtaining the objective function by minimizing the sum of the cumulative startup time and the fused function.
[0199] Multimodal data involves integrating, jointly analyzing, and processing information from different modalities (such as images, text, speech, and sensor data) to enable comprehensive understanding, reasoning, and application. Multimodal fusion encompasses a variety of mathematical methods for feature-level fusion. In the embodiments of this application, weighted fusion is primarily used to determine the resulting data from the fusion of multimodal data.
[0200] Assume that the multimodal data of each service includes K data sources in total, and the output of each data source is x k , the corresponding weight is , then the fusion data of each service can be determined by, but not limited to, the following formula (8):
[0201] (8)
[0202] Among them, the constraints are ,and The distribution of weights is the core issue. In this embodiment, the minimum variance weighting method is adopted. Assuming that the errors of each data source are independent, the variance is , then the optimal weight is the result of inverse variance normalization.
[0203] By combining the accumulated startup time with the fused data, we construct the objective function shown in formula (4). This objective function aims to simultaneously consider time efficiency and the comprehensive state of the startup environment to ensure that the optimized startup sequence is not only fast but also optimal in terms of resource allocation and dependency handling. By minimizing this objective function, we can find the optimal service startup path.
[0204] By integrating multimodal data and constructing a comprehensive objective function, we have achieved in-depth optimization of the OpenBMC server startup process. Specifically, by combining the cumulative startup time of the service with a function fused with multimodal data from the node startup environment, we form an objective function that comprehensively reflects startup efficiency and resource status. By minimizing this objective function, the algorithm, while pursuing the goal of shortening startup time, comprehensively considers resource utilization and dependency management, avoiding startup delays and system instability caused by excessive resource concentration or dependency conflicts. This improves the level of intelligent automation of service startup, enhances the overall performance and robustness of the system, and ensures that service startup can be completed quickly and smoothly even in complex and changing environments.
[0205] In an exemplary embodiment, the above-mentioned starting of a group of services according to the starting order indicated by the optimal path composed of a group of serialized nodes includes: starting the services corresponding to each node on the optimal path in sequence according to the node relationship between a group of serialized nodes, wherein the node relationship includes the association relationship and sequence between the root node, parent node, child node and leaf node of the target tree structure.
[0206] After the optimal path is obtained according to the Monte Carlo tree search algorithm in the above embodiment, each service is started in sequence according to the association relationship and sequence between each node on the optimal path.
[0207] Before starting a service, it is crucial to accurately understand and analyze the node relationships along the optimal path. These node relationships include the associations and startup order between the root node, parent node, child node, and leaf node in the target tree structure.
[0208] For example, suppose the Monte Carlo tree search algorithm determines the optimal path. The serialized nodes on this path are the root node, node 2 (a child of the root node), and node 3 (a child of node 2). The node relationships here indicate the order in which services should be started, such as starting service 1 first, then service 2, and finally service 3.
[0209] Secondly, services must be started based on node relationships. This means that after determining the service startup order, dependencies between services must be strictly followed to ensure that there are no conflicts between services started in the current order. For example, service 1 must start before service 2, and service 3 must start only after service 2 has fully started. This order ensures efficient resource allocation and avoids startup failures due to unmet service dependencies.
[0210] The technical solution in this embodiment eliminates the need for a static, pre-set order during service startup. Instead, the algorithm dynamically explores the optimal path, effectively reducing resource competition and dependency issues during startup and improving service startup flexibility. Furthermore, the startup sequence automatically determined by the algorithm intelligently responds to resource fluctuations and load changes, ensuring efficient and smooth service startup even in dynamic environments, providing a solid foundation for continuous server operation and task processing.
[0211] In order to understand the above technical solution more clearly, Figure 8 The overall representation is a schematic diagram for further description.
[0212] like Figure 8As shown, the overall system for implementing the above-mentioned service startup sequence optimization method includes a collection module, a transmission module, a service module, and an application module. Among them, the collection module is used to collect multimodal data of each service, such as CPU usage, memory usage, dependency topology between services, startup time, etc.
[0213] After using weighted multimodal fusion technology to fuse the multimodal data of each service, the fused data is obtained. This fused data is used to create the initial objective function. For details, please refer to the above formula (4). The created initial objective function is transmitted to the service layer through the transmission module, and a node corresponding to each service is created in the service-based module to create a Monte Carlo tree model.
[0214] Based on the tree structure and objective function of the Monte Carlo tree, simulation iterations are performed on the nodes contained in each layer of the tree structure to obtain the final evaluation index (UCT value) of each node after the iteration.
[0215] Based on the final evaluation metrics for each node, the node with the highest UCT value in each layer is determined. The relationships between these nodes (such as parent-child relationships) are then used to determine the order in which they should be prioritized. Finally, based on this order, the startup sequence for the services corresponding to each node is determined, and the optimal startup sequence is stored in the device, such as in the BMC module's code section.
[0216] The above embodiments provided in this application have at least the following beneficial effects.
[0217] (1) It solves the problem of poor flexibility caused by the static definition of startup sequence in the existing technology and the inability to adapt to dynamically changing environments, such as resource fluctuations or load changes.
[0218] (2) By creating the objective function and the UCT calculation formula, the algorithm ensures in-depth exploration of unknown potential optimization paths. At the same time, it avoids resource conflicts and startup delays, and improves the smoothness of system startup.
[0219] (3) By obtaining multimodal data of each service, including memory usage, resource utilization, and dependencies, the comprehensiveness and accuracy of startup decisions are ensured.
[0220] (4) Through multiple rounds of simulation iterations, the nodes with the highest potential value in each layer of the structure are accurately selected for in-depth exploration.
[0221] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0222] According to another aspect of the embodiment of the present application, a device for optimizing the service startup sequence is also provided. The structural diagram of the system is shown in FIG. Figure 9 As shown, it includes the following modules: a first acquisition unit 902, used to obtain a multimodal data set of a group of services, wherein the group of services includes at least one service in the baseboard management controller, and the multimodal data set includes the memory occupancy rate, resource utilization rate and dependency relationship between services of at least one service; a creation unit 904, used to create an objective function based on the multimodal data set, wherein the optimization goal of the objective function is to minimize the total startup time of a group of services; a first processing unit 906, used to determine the target node corresponding to the optimal evaluation index in each layer structure based on the objective function and the target tree structure, and obtain a group of serialized nodes, wherein the evaluation index is used to describe the balance between the reward and access of the node, the number of layers of the target tree structure is equal to the number of services in the group, and a node in the target tree structure represents a service in the group of services; a startup unit 908, used to start a group of services according to the startup sequence indicated by the optimal path composed of a group of serialized nodes.
[0223] The specific execution steps involved in the various calculation processes in the above modules and the dynamic optimization of storage space can be referred to the description in the above embodiments and will not be repeated here.
[0224] Obviously, the above-mentioned service startup sequence optimization device can be used to implement the service startup sequence optimization method provided in the above-mentioned embodiment, and the description thereof will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and contemplated.
[0225] It should be noted that the first acquisition unit 902 in this embodiment can be used to execute the above step S202, the creation unit 904 in this embodiment can be used to execute the above step S204, the first processing unit 906 in this embodiment can be used to execute the above step S206, and the starting unit 908 in this embodiment can be used to execute the above step S208.
[0226] In an exemplary embodiment, the above-mentioned first processing unit 906 includes: a first processing module, which is used to perform simulation iterations in each layer structure starting from the root node of the target tree structure when the number of layers of the target tree structure is n, and obtain the final cumulative reward and final number of visits of each child node after the last round of iterative update, where n is a positive integer greater than or equal to 2; a second processing module, which is used to determine the final evaluation index of each node in the target tree structure based on the final cumulative reward and the final number of visits, and obtain an evaluation index set; a third processing module, which is used to determine the target node corresponding to the optimal evaluation index in each layer structure from the evaluation index set, and obtain a set of serialized nodes.
[0227] In an exemplary embodiment, the first processing module includes: a first processing submodule, which is used to perform simulation iterations on the i-th layer structure through the following steps, where i is a positive integer greater than or equal to 1 and less than or equal to n: based on the current evaluation index of the i-th subgroup node in the i-th layer structure, select the j-th node from the i-th subgroup node, wherein the j-th current evaluation index of the j-th node is the evaluation index with the largest value among the i-th subgroup nodes, and j is a positive integer less than or equal to the number of nodes included in the i-th layer structure; in the case where the j-th node has a branch node, based on the objective function, determine the j-th cumulative reward of the j-th node, and The current number of visits to the jth node is updated to the jth number of visits, where each time the jth node is visited, the reward and the number of visits of the jth node are updated, and the branch nodes include the child nodes of the jth node or the leaf nodes of the jth node; determine the jth path consisting of the jth subgroup nodes that need to be visited between the jth node and the root node; according to the jth path, backpropagate from the jth node to the root node, and based on the jth cumulative reward and the jth number of visits, update the statistical data of the remaining nodes in the jth subgroup node except the jth node, where the statistical data includes the cumulative reward, the number of visits and the evaluation index.
[0228] In an exemplary embodiment, the above-mentioned first processing module includes: a second processing sub-module, which is used to determine, based on the objective function, the minimum cumulative startup time from the start of startup along the j-th path to the completion of startup of the j-th service corresponding to the j-th node; a third processing sub-module, which is used to determine the inverse of the minimum cumulative startup time as the j-th cumulative reward when the j-th service and the predecessor service of the j-th service are successfully started; and a fourth processing sub-module, which is used to perform an addition operation on the current number of visits to obtain the j-th number of visits.
[0229] In an exemplary embodiment, the above-mentioned device also includes: an expansion unit, which is used to expand the target branch node for the jth node when the jth node does not have a branch node, wherein the target branch node includes nodes other than the jth node in a group of nodes, and a group of nodes corresponds to a group of services; a second processing unit, which is used to determine the target cumulative reward of the target branch node based on the objective function, and update the target number of visits to the target branch node; a third processing unit, which is used to determine the j+1th path consisting of the j+1th sub-group node that needs to be visited between the target branch node and the root node; a fourth processing unit, which is used to propagate back from the target branch node to the root node according to the j+1th path, and update the statistical data of the remaining nodes in the j+1th sub-group node other than the target branch node based on the target cumulative reward and the target number of visits.
[0230] In an exemplary embodiment, the above-mentioned second processing module includes: a first acquisition submodule, which is used to sequentially acquire each node from a group of nodes as the current node; a fifth processing submodule, which is used to determine the current final cumulative reward of the current node from the final cumulative reward, and to determine the current final number of visits of the current node from the final number of visits; a second acquisition submodule, which is used to obtain the ratio between the current final cumulative reward and the current final number of visits to obtain a first value; a sixth processing submodule, which is used to determine the second value based on the number of visits to the parent node of the current node, the current final number of visits and the target hyperparameter, wherein the target hyperparameter is used to control the exploration weight in the simulation iteration process using the target tree structure; a seventh processing submodule, which is used to determine the sum of the first value and the second value as the current final evaluation index of the current node.
[0231] In an exemplary embodiment, the creation unit 904 includes: an acquisition module for acquiring the cumulative startup time from the start of startup to the completion of startup of the kth service in a group of services, where k is a positive integer greater than or equal to 1 and less than the number of services in a group of services; a fourth processing module for determining the kth group of multimodal data of the kth service from the multimodal data set; a fusion module for obtaining a fused function by fusing the kth group of multimodal data; and a fifth processing module for obtaining an objective function by minimizing the sum of the cumulative startup time and the fused function.
[0232] In an exemplary embodiment, the above-mentioned startup unit 908 includes: a startup module, which is used to start the services corresponding to each node on the optimal path in sequence according to the node relationship between a set of serialized nodes, wherein the node relationship includes the association relationship and sequence between the root node, parent node, child node and leaf node of the target tree structure.
[0233] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0234] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory 9 and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned service startup sequence optimization method embodiments.
[0235] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned service startup sequence optimization method embodiments when running.
[0236] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0237] According to another aspect of the embodiments of the present application, a computer program product is further provided. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned service startup sequence optimization method embodiments are implemented.
[0238] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned service startup sequence optimization method embodiments.
[0239] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0240] The above is a detailed introduction to a method for optimizing the service startup sequence provided by this application. This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
Claims
1. A method for optimizing service startup sequence, characterized in that: include: Obtaining a multimodal data set of a group of services, wherein the group of services includes at least one service within a baseboard management controller, and the multimodal data set includes a memory occupancy rate, a resource utilization rate, and dependencies between services of the at least one service; Creating an objective function based on the multimodal data set, wherein an optimization goal of the objective function is to minimize a total startup time of the set of services; Based on the objective function and the target tree structure, determining the target node corresponding to the optimal evaluation indicator in each layer of the structure to obtain a set of serialized nodes, wherein the evaluation indicator is used to describe the balance between the reward and access of the node, the number of layers of the target tree structure is equal to the number of the group of services, and a node in the target tree structure represents a service in the group of services; Starting the set of services according to the startup order indicated by the optimal path formed by the set of serialized nodes; Among them, the target tree structure is constructed by the following steps: selecting a service from the group of services, and determining the node corresponding to the selected service as the root node of the target tree structure; obtaining each child node in the second-layer structure by expanding the root node; updating the cumulative rewards of each child node and the root node in the second-layer structure by simulating and iterating each child node in the second-layer structure; based on the updated cumulative rewards of each child node in the second-layer structure, selecting a child node with the largest value of the evaluation index and no branch node, and obtaining each child node in the third-layer structure by expanding the selected child node; updating the cumulative rewards of each child node in the third-layer structure, each child node in the second-layer structure and the root node by simulating and iterating each child node in the third-layer structure, and repeating the above simulation iteration process until the simulation iteration of the n-th layer structure is completed, wherein n is a positive integer greater than or equal to 2.
2. The method according to claim 1, characterized in that Based on the objective function and the target tree structure, the target node corresponding to the optimal evaluation index in each layer structure is determined to obtain a set of serialized nodes, including: When the number of layers of the target tree structure is n, starting from the root node of the target tree structure, simulation iterations are performed in each layer structure in turn to obtain the final cumulative reward and final visit count of each child node after the last round of iterative update, where n is a positive integer greater than or equal to 2; Determining a final evaluation index for each node in the target tree structure based on the final accumulated reward and the final number of visits to obtain an evaluation index set; The target node corresponding to the optimal evaluation index in each layer structure is determined from the evaluation index set to obtain the group of serialized nodes.
3. The method according to claim 2, characterized in that The simulation iteration is performed in each layer of the structure starting from the root node of the target tree structure to obtain the final cumulative reward and final visit count of each child node in the last round of iterative update, including: The simulation iteration is performed on the i-th layer structure by the following steps, where i is a positive integer greater than or equal to 1 and less than or equal to n: Based on the current evaluation index of the i-th subgroup node in the i-th layer structure, select the j-th node from the i-th subgroup node, wherein the j-th current evaluation index of the j-th node is the evaluation index with the largest value among the i-th subgroup nodes, and j is a positive integer less than or equal to the number of nodes included in the i-th layer structure; In the case where the j-th node has a branch node, based on the objective function, determining the j-th cumulative reward of the j-th node, and updating the current visit count of the j-th node to the j-th visit count, wherein each time the j-th node is visited, the reward and visit count of the j-th node are updated, and the branch node includes a child node of the j-th node or a leaf node of the j-th node; Determine a j-th path consisting of the j-th subgroup nodes that need to be visited between the j-th node and the root node; According to the j-th path, backpropagation is performed from the j-th node to the root node, and based on the j-th cumulative reward and the j-th number of visits, the statistical data of the remaining nodes in the j-th subgroup node except the j-th node is updated, wherein the statistical data includes the cumulative reward, the number of visits and the evaluation index.
4. The method according to claim 3, characterized in that The determining, based on the objective function, a j-th cumulative reward of the j-th node, and updating the current number of visits to the j-th node to the j-th number of visits, comprises: Determine, based on the objective function, a minimum cumulative startup time from the start of startup along the j-th path to the completion of startup of the j-th service corresponding to the j-th node; When the j-th service and the preceding service of the j-th service are both successfully started, the reciprocal of the minimum accumulated start-up time is determined as the j-th accumulated reward; An operation of adding 1 is performed on the current number of visits to obtain the j-th number of visits.
5. The method according to claim 3, characterized in that The method further comprises: In the case that the j-th node does not have a branch node, expanding a target branch node for the j-th node, wherein the target branch node includes nodes other than the j-th node in a group of nodes, the group of nodes corresponding to a group of services; Based on the objective function, determining a target cumulative reward for the target branch node, and updating a target number of visits to the target branch node; Determine the j+1th path consisting of the j+1th subgroup node to be visited between the target branch node and the root node; According to the j+1th path, backpropagation is performed from the target branch node to the root node, and based on the target cumulative reward and the target number of visits, the statistical data of the remaining nodes in the j+1th subgroup node except the target branch node are updated.
6. The method according to claim 2, characterized in that The determining of a final evaluation index for each node in the target tree structure based on the final accumulated reward and the final number of visits includes: Get each node from a set of nodes in turn as the current node; Determine the current final accumulated reward of the current node from the final accumulated reward, and determine the current final visit count of the current node from the final visit count; Obtaining a ratio between the current final accumulated reward and the current final number of visits to obtain a first value; Determining a second value based on the number of visits to the parent node of the current node, the current final number of visits, and a target hyperparameter, wherein the target hyperparameter is used to control an exploration weight in a simulation iteration process performed using the target tree structure; The sum of the first value and the second value is determined as the current final evaluation index of the current node.
7. The method according to claim 1, characterized in that The creating an objective function based on the multimodal data set includes: Obtain the cumulative startup time from the start of startup to the completion of startup of the kth service in the group of services, where k is a positive integer greater than or equal to 1 and less than the number of services in the group of services; Determining a k-th group of multimodal data for the k-th service from the multimodal data set; Obtaining a fused function by fusing the k-th group of multimodal data; The objective function is obtained by minimizing the sum of the accumulated startup time and the fused function.
8. The method according to any one of claims 1 to 7, characterized in that The starting of the group of services according to the starting order indicated by the optimal path formed by the group of serialized nodes includes: According to the node relationship between the group of serialized nodes, the services corresponding to each node on the optimal path are started in sequence, wherein the node relationship includes the association relationship and sequence between the root node, parent node, child node and leaf node of the target tree structure.
9. A device for optimizing service startup sequence, characterized in that: include: a first acquiring unit, configured to acquire a multimodal data set of a group of services, wherein the group of services includes at least one service within a baseboard management controller, and the multimodal data set includes a memory occupancy rate and a resource utilization rate of the at least one service, and dependencies between services; a creating unit, configured to create an objective function based on the multimodal data set, wherein an optimization goal of the objective function is to minimize a total startup time of the set of services; a first processing unit, configured to determine, based on the objective function and the target tree structure, a target node corresponding to an optimal evaluation indicator in each layer of the structure, to obtain a set of serialized nodes, wherein the evaluation indicator is used to describe a balance between rewards and access to the node, the number of layers of the target tree structure being equal to the number of the set of services, and a node in the target tree structure representing a service in the set of services; a starting unit, configured to start the set of services in a starting order indicated by the optimal path formed by the set of serialized nodes; The device is also used to construct the target tree structure through the following steps: selecting a service from the group of services, and determining the node corresponding to the selected service as the root node of the target tree structure; obtaining each child node in the second-layer structure by expanding the root node; updating the cumulative rewards of each child node in the second-layer structure and the root node by simulating and iterating each child node in the second-layer structure; based on the updated cumulative rewards of each child node in the second-layer structure, selecting a child node with the maximum value of the evaluation index and no branch node, and obtaining each child node in the third-layer structure by expanding the selected child node; updating the cumulative rewards of each child node in the third-layer structure, each child node in the second-layer structure and the root node by simulating and iterating each child node in the third-layer structure, and repeating the above simulation and iteration process until the simulation iteration of the n-th layer structure is completed, where n is a positive integer greater than or equal to 2.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for optimizing the service startup sequence according to any one of claims 1 to 8.
11. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for optimizing the service startup sequence according to any one of claims 1 to 8 when executing the computer program.
Citation Information
Patent Citations
Automatic laboratory deadlock-free dynamic scheduling method based on Monte Carlo tree search
CN118860610A
Cloud computing parallel task optimization scheduling method based on priority dependency graph
CN119806776A