Cluster upgrading method and electronic device
Patent Information
- Application Number
- CN202610856061.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2046-06-12
AI Technical Summary
然而,这类方案升级过程高度依赖第三方软件或脚本工具,显著增加了部署、维护的成本与复杂度,且前期配置繁琐,需预先维护统一的设备地址、账号密码等信息,管理成本较高;同时,外部工具故障、网络中断或人为配置错误,均可能引发升级中断,带来数据损坏或设备异常的风险,难以兼顾升级过程的可靠性与效率
[0006]The cluster upgrade method provided by this invention first generates and broadcasts encrypted access credentials, filters and verifies nodes to form and lock the upgrade cluster, achieving secure cluster access control. Then, it fragments the firmware image and establishes a fragment mapping table, providing a global state tracking basis for fragment transmission. By collecting node state information, calculating node scores, and constructing a topology structure, it dynamically optimizes the fragment transmission path. Subsequently, by predicting node fragment write times, it generates a zero-wait transmission sequence, achieving intelligent scheduling, reducing transmission waiting time, and improving upgrade speed. Later, it queries the fragment mapping table, transmits missing fragments on demand, and skips already held fragments, significantly suppressing redundant transmission and improving bandwidth utilization and overall distribution efficiency. The entire process is completed collaboratively by the cluster nodes themselves, reducing dependence on external tools and platforms. Combined with the collaborative optimization of dynamic topology and predictive scheduling, it significantly improves the overall reliability and efficiency of firmware upgrades.
Smart Images

Figure CN122395054B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of equipment upgrade technology, and in particular to a cluster upgrade method and electronic equipment. Background Technology
[0002] Traditional bulk firmware upgrade solutions for cluster devices primarily rely on external management tools or dedicated platforms, such as using specialized software or remote protocols. These solutions use centralized tools to read device address lists, execute upgrade commands, and monitor the upgrade process. Common practices include using out-of-band management tools to distribute firmware files in batches or logging into devices remotely to perform the flashing operation. However, these solutions heavily depend on third-party software or scripting tools, significantly increasing deployment and maintenance costs and complexity. Furthermore, the initial configuration is cumbersome, requiring the pre-maintenance of unified device addresses, account passwords, and other information, resulting in high management costs. Simultaneously, external tool failures, network interruptions, or human error can all cause upgrade interruptions, leading to data corruption or device malfunctions, making it difficult to balance reliability and efficiency in the upgrade process. Summary of the Invention
[0003] This invention provides a cluster upgrade method and electronic device that can achieve secure, efficient, and low-redundancy cluster self-cooperative firmware upgrades, improve bandwidth utilization and upgrade reliability, and reduce dependence on external tools.
[0004] This invention provides a cluster upgrade method, comprising: Generate and broadcast encrypted access credentials, add nodes whose credentials are verified to the upgrade cluster and lock them; The firmware image is divided into multiple fragments, and a fragment mapping table is established; the fragment mapping table is used to record the attribute information of each fragment in the upgrade cluster; Collect the status information of each node in the upgrade cluster, calculate the node score and construct the topology, and determine the transmission path of the shard in the upgrade cluster based on the topology; Predict the time for each node to complete the fragment write, generate a zero-wait transmission sequence, and determine the distribution timing of fragments sent along the transmission path based on the zero-wait transmission sequence; The missing fragments of each node are determined by querying the fragment mapping table, the receiving node is determined according to the transmission path, and the corresponding missing fragments are transmitted to the receiving node according to the distribution timing; if the node already holds the corresponding fragment, the transmission is skipped.
[0005] The present invention also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described cluster upgrade methods.
[0006] The cluster upgrade method provided by this invention first generates and broadcasts encrypted access credentials, filters and verifies nodes to form and lock the upgrade cluster, achieving secure cluster access control. Then, it fragments the firmware image and establishes a fragment mapping table, providing a global state tracking basis for fragment transmission. By collecting node state information, calculating node scores, and constructing a topology structure, it dynamically optimizes the fragment transmission path. Subsequently, by predicting node fragment write times, it generates a zero-wait transmission sequence, achieving intelligent scheduling, reducing transmission waiting time, and improving upgrade speed. Later, it queries the fragment mapping table, transmits missing fragments on demand, and skips already held fragments, significantly suppressing redundant transmission and improving bandwidth utilization and overall distribution efficiency. The entire process is completed collaboratively by the cluster nodes themselves, reducing dependence on external tools and platforms. Combined with the collaborative optimization of dynamic topology and predictive scheduling, it significantly improves the overall reliability and efficiency of firmware upgrades.
[0007] In addition, the present invention also provides corresponding electronic equipment for the cluster upgrade method, which has the same or corresponding technical features as the cluster upgrade method mentioned above, and has the same effect. Attached Figure Description
[0008] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 A flowchart of a cluster upgrade method provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating the cluster upgrade method provided in an embodiment of the present invention. Figure 3 This is a schematic diagram of the cluster upgrade device provided in an embodiment of the present invention. Detailed Implementation
[0010] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0011] It should be noted that, in the description of this invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0012] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0013] The specific application environment architecture or specific hardware architecture on which the cluster upgrade method depends is described here.
[0014] The embodiments of the present invention provide a cluster upgrade method, and the method is described in detail in conjunction with the execution flow of the cluster upgrade method. Figure 1 A flowchart of the cluster upgrade method provided in the embodiments of the present invention is shown below. Figure 1 As shown, the method includes: S101. Generate and broadcast encrypted access credentials, add nodes that pass credential verification to the upgrade cluster and lock them.
[0015] It should be noted that in this invention, the encrypted access credential is an encrypted and signed electronic credential used for identity and permission verification before device access, ensuring that only verified devices can join the upgrade process. A node refers to a device within the cluster, including both the master node responsible for scheduling and distribution, and the child nodes that perform receiving and upgrading, such as server management controllers (e.g., Baseboard Management Controller, BMC), switches, routers, edge gateways, and storage array management modules. The upgrade cluster refers to a temporary group of devices, verified by credentials and composed of nodes in the same batch to be upgraded, which is the scope of this firmware upgrade. Nodes within the cluster collaborate to complete data distribution and upgrade operations.
[0016] The cluster upgrade method of this invention can be applied to the master node within a cluster. Step S101 can be executed by the credential verification module, which generates and broadcasts encrypted access credentials, filters and verifies nodes to join and lock the upgrade cluster, thus building a security boundary for subsequent fragmented transmission. This solution is applicable not only to server management controllers but also to network devices such as switches and routers, edge gateway devices, and storage array management modules. As long as the target device has firmware reception, status reporting, inter-node forwarding, or controlled upgrade capabilities, the method of this invention can be used to achieve batch upgrades, demonstrating good versatility and scenario adaptability.
[0017] S102. Divide the firmware image into multiple fragments and establish a fragment mapping table; the fragment mapping table is used to record the attribute information of each fragment in the upgrade cluster.
[0018] It should be noted that a firmware image refers to a complete binary file containing the device's underlying operating programs and configuration data, and is the target package for this upgrade operation. A fragment refers to an independent data unit obtained by cutting the firmware image according to fixed or dynamic rules; each fragment can be transmitted, verified, and stored independently. A fragment mapping table is a structured data table that records the key attributes of each fragment in the upgrade cluster, mainly including fragment number, integrity verification information, current storage node location, and transmission status, used to achieve global tracking of fragment status and prevent redundant transmission.
[0019] In practical applications, each time a cluster upgrade task is initiated, the firmware image to be upgraded needs to be split into fragments, and a corresponding fragment mapping table needs to be created simultaneously to record the relevant attribute information of each fragment in the cluster during this upgrade in real time.
[0020] Step S102 can be executed by the fragmented transmission execution module, which divides the firmware image to be upgraded into multiple fragments and creates a fragmented mapping table for this upgrade. This fragmented mapping table is used to record the attribute information of each fragment in the upgrade cluster during this upgrade process. In this way, the original file is split into independent transmission units that can be scheduled in parallel, reducing the amount of data transmitted in a single transmission, adapting to different bandwidth conditions, and providing a global view of the fragmented storage status of each node in the cluster.
[0021] S103. Collect the status information of each node in the upgrade cluster, calculate the node score and construct the topology structure, and determine the transmission path of the shard in the upgrade cluster based on the topology structure.
[0022] It should be noted that the node score is a quantitative score calculated based on the real-time operating status information of each node in the upgrade cluster, used to characterize the data forwarding capability and upgrade carrying capacity of each node. The topology can be understood as a dynamic topology, which refers to the device connectivity and transmission architecture built with the master node as the root node and based on the scores of each node, providing a fixed node hierarchy and link relationship for fragmented data transmission within the cluster.
[0023] Step S103 can be executed by the dynamic topology construction module. It collects real-time status information from all nodes within the upgrade cluster, quantifies and calculates the capability score of each node, and constructs a dynamic topology structure adapted to the current cluster status based on the node scores. Then, it determines the optimal transmission path for each shard within the upgrade cluster based on the dynamic topology structure. This abandons the fixed transmission link model and allows for dynamic adjustment of the cluster transmission architecture based on the real-time performance of nodes, prioritizing high-performance nodes to handle forwarding tasks and effectively adapting to complex network environments.
[0024] S104. Predict the time for each node to complete the fragment writing, generate a zero-wait transmission sequence, and determine the distribution timing of fragments sent along the transmission path based on the zero-wait transmission sequence.
[0025] It's important to note that fragment write time refers to the duration from when a node receives fragment data to when it completely writes the fragment to its local storage area. Zero-wait transmission sequence refers to the order in which fragments are sent based on the predicted fragment write times for each node. Zero-wait transmission sequence allows for seamless integration of transmission and node write operations, eliminating node idle waiting time. Distribution sequence refers to the order in which fragments are sequentially distributed and forwarded along the transmission path.
[0026] Step S104 can be executed by the prediction scheduling module, which predicts the fragment write time of each node, generates a zero-wait transmission sequence accordingly, and determines the fragment distribution time order based on the sequence, effectively shortening the transmission gap and further improving the overall distribution efficiency.
[0027] S105. Query the fragment mapping table to determine the missing fragments of each node, determine the receiving node according to the transmission path, and transmit the corresponding missing fragment to the receiving node according to the distribution sequence; if the node already holds the corresponding fragment, skip the transmission.
[0028] It should be noted that missing fragments refer to firmware data fragments that the current node has not yet fully received locally.
[0029] Step S105 can be executed by the status tracking feedback module. It identifies the missing fragments of each node by querying the fragment mapping table, determines the corresponding receiving node by combining the transmission path, and completes the data transmission according to the distribution sequence. For nodes that already have the corresponding fragments, the transmission operation is skipped directly, which effectively avoids duplicate data transmission, reduces network resource consumption, and further improves the overall efficiency of firmware batch distribution.
[0030] In the cluster upgrade method provided by this invention, encrypted access credentials are first generated and broadcast. Verified nodes are then selected to form and lock the upgrade cluster, achieving secure cluster access control. Next, the firmware image is fragmented and a fragment mapping table is established, providing a global state tracking basis for fragment transmission. By collecting node state information, calculating node scores, and constructing a topology, the fragment transmission path is dynamically optimized. Then, by predicting node fragment write times, a zero-wait transmission sequence is generated, achieving intelligent scheduling, reducing transmission waiting time, and improving upgrade speed. Subsequently, the fragment mapping table is queried, missing fragments are transmitted on demand, and already held fragments are skipped, significantly suppressing redundant transmission and improving bandwidth utilization and overall distribution efficiency. The entire upgrade is completed collaboratively by the cluster nodes themselves, reducing dependence on external tools and platforms. Combined with the collaborative optimization of dynamic topology and predictive scheduling, the overall reliability and efficiency of firmware upgrades are significantly improved.
[0031] Furthermore, in specific implementation, in the cluster upgrade method provided in the embodiments of the present invention, step S101 generates and broadcasts encrypted access credentials, adds nodes that pass credential verification to the upgrade cluster and locks them. Specifically, this may include: generating and broadcasting encrypted access credentials based on the target firmware version information, the list of allowed access device models, and the valid time window; receiving verification responses returned by each node, verifying the validity of the credential signature, checking whether the node model belongs to the list of allowed access device models, and confirming whether the current time is within the valid time window; only when the signature verification is successful, the model matches, and the current time is within the valid time window, adding the corresponding node to the upgrade cluster and locking the upgrade cluster.
[0032] In implementation, based on the target firmware version, allowed device model list, and valid time window in the master node (such as the master BMC), a digital token (encrypted access credential) can be generated using the RSA Probabilistic Signature Scheme (RSA-PSS) algorithm. ; The generated token is broadcast externally by the master node. Each node can use its public key to verify the validity of the token signature. The verification result is combined with the device model and the current time to determine if it is within the valid time window. Only nodes that pass the signature verification, match the model, and are within the valid time window can connect and form an upgrade cluster, thus completing cluster locking.
[0033] In addition to using the RSA probabilistic signature scheme to implement token signing and authentication, this invention can also use other authentication methods such as Elliptic Curve Digital Signature Algorithm (ECDSA), Hash-based Message Authentication Code (HMAC), session tokens based on shared keys, and device authentication based on certificate chains, ultimately achieving secure access to the upgrade cluster, device model filtering, and cluster range locking.
[0034] Furthermore, in a specific implementation, in the cluster upgrade method provided in the embodiments of the present invention, step S102 divides the firmware image into multiple fragments and establishes a fragment mapping table. Specifically, this may include: dividing the firmware image into multiple fragments, attaching a unique sequence identifier, integrity check value, digital signature, timestamp, and task identifier to each fragment, making each fragment an independent transmission unit; establishing a fragment mapping table, and using the fragment mapping table to record the distribution status, verification information, holding node list, and distribution path snapshot of each fragment in the upgrade cluster.
[0035] In implementation, this invention first preprocesses the firmware image and slices it as needed to construct schedulable data units. The master node slices the firmware image (e.g., a .hpm format file) into several fragments F1, F2, ..., F1 in 1MB granularity. n This fragment size is for illustrative purposes only. In actual applications, the fragment size can be set to a fixed value or dynamically adjusted based on link bandwidth, node performance, remaining upgrade data volume, and historical transmission success rate. Each fragment is accompanied by a unique sequence number (F1, F2, ..., F...). n The system uses SHA-256 integrity hash, RSA probabilistic signature scheme (RSA-PSS) digital signature, timestamp, and task identifier to make each fragment an independent transmission unit, supporting out-of-order reception, parallel writing, and breakpoint resumption.
[0036] Furthermore, in a specific implementation, in the cluster upgrade method provided in the embodiments of the present invention, step S103 collects the status information of each node in the upgrade cluster, calculates the node score, and constructs the topology structure. Specifically, it may include: collecting the round-trip latency, packet loss rate, current available bandwidth, and flash memory write speed of each node in the upgrade cluster to the parent node; calculating the node score based on the round-trip latency, packet loss rate, the ratio between the current available bandwidth and the maximum bandwidth, and the ratio between the flash memory write speed and the maximum write speed, combined with a preset weight coefficient; and constructing the topology structure based on the node score, with the master node as the root node.
[0037] In implementation, this invention can collect information such as network bandwidth, round-trip time (RTT), packet loss rate, and flash memory write speed reported by each node in the upgrade cluster via User Datagram Protocol Beacon (UDP Beacon). Node information can also be collected through status reporting based on broadcast messages, periodic status synchronization based on multicast, event reporting based on Redfish (a hardware management specification), and status subscription mechanisms based on a lightweight message bus.
[0038] This invention can calculate the score of each node using a node comprehensive scoring function. Node rating To quantify equipment capabilities, the node score is equal to the first weighting coefficient. Multiply by the reciprocal of the round-trip time, and add the second weighting factor. Multiply by one and subtract the packet loss rate, then add the third weighting coefficient. Multiply by the ratio of the current available bandwidth to the maximum bandwidth, and add the fourth weighting factor. Multiply by the ratio between the flash memory write speed and the maximum write speed; where the first weighting coefficient is... Greater than the second weighting coefficient Second weighting coefficient Greater than the third weight coefficient Third weighting coefficient Greater than the fourth weight coefficient And the sum of the four weighting coefficients is equal to 1.
[0039] The node score can be calculated using the following formula: ; in, Rate the nodes; For nodes Round-trip time to the parent node, in milliseconds (ms). A smaller value indicates lower network latency. This represents the packet loss rate, which can range from 0 to 1. A smaller value indicates a more stable network. This represents the currently available bandwidth, which can be expressed in Mbps. The maximum bandwidth (i.e., the maximum transmission bandwidth of the network) can be measured in Mbps. It can be determined by the node's network port specifications, the port speed of the uplink network device, and the performance of the network controller. This refers to the flash memory write speed, which can be measured in MB / s. The maximum write speed can be measured in MB / s, for example, 10 MB / s. It can be determined by the performance of the flash memory chip, the storage interface bus speed, and the device's main controller I / O processing capabilities. The weighting coefficients corresponding to the round-trip delay. The weighting coefficients corresponding to the packet loss rate. The weighting coefficient corresponds to the ratio between the currently available bandwidth and the maximum bandwidth. This is the weighting coefficient corresponding to the ratio between the flash memory write speed and the maximum write speed. Using the above formula allows for an objective quantification of the overall performance of each node, ensuring efficient and stable data transmission and writing processes.
[0040] In practical applications, , , , ,satisfy This reflects an optimization strategy that prioritizes latency over stability. A higher ratio between current available bandwidth and maximum bandwidth indicates more sufficient bandwidth. A higher ratio between flash write speed and maximum write speed indicates stronger write capabilities.
[0041] Furthermore, in specific implementation, in the above steps, the topology is constructed based on the node rating, with the master node as the root node. Specifically, this may include: using the master node as the root node and the child node rating as the edge weight, each node is treated as an independent subtree during initialization to construct a fully connected weighted graph; sorting the edges in the fully connected weighted graph in descending order of edge weight, and selecting the child node with the highest node rating as the parent node; traversing the sorted edges, if an edge connects two different subtrees and the corresponding child node does not reach the maximum number of child nodes limit, then merging the subtrees and adding edges; repeating the merging operation until all nodes are connected, forming a minimum spanning tree as the topology.
[0042] After constructing the topology, the process may also include: periodically collecting the status information of each node and recalculating the node score; using the master node as the root node and reconstructing the minimum spanning tree based on the recalculated node score as the updated topology; when the node score drops below a preset threshold, performing local path reselection only on the node and its corresponding subtree, or reconstructing the minimum spanning tree to complete the emergency reconstruction; and redetermining the transmission path of the shards in the upgraded cluster based on the updated topology.
[0043] In implementation, this invention can employ the constrained Kruskal algorithm, designating the master node as the root. In practical applications, the root node must upload the firmware image and complete the parameter configuration before batch upgrade operations can be performed. The algorithm scores child nodes. The minimum spanning tree is constructed by assigning edge weights in descending order, ensuring that the root node has only outgoing edges. The process of constructing the dynamic topology graph is as follows: Let V be the set of all nodes in the network, and E be the set of edges representing communication links. The edge weights are: ; like If it is a child node, then the edge The weight is taken as the child node score. ;like For the root node, If it is a potential parent node, then the edge The weight takes the value of infinity.
[0044] The specific dynamic topology construction process is as follows: First, complete the initialization, divide all nodes into independent subtrees, and construct a fully connected weighted graph. Then, all edges are sorted according to their weights. Sort the edges in descending order, prioritizing nodes with higher scores as their parent nodes. Then, iterate through the sorted edges, checking if the current edge... If two different subtrees are connected and the corresponding child nodes do not reach the maximum number of child nodes (default is 30, which can be adjusted according to the upgrade scale), then merge the two subtrees and add edges. Connect to the link; repeat the subtree merging step until all nodes in the network are connected, ultimately generating a minimum spanning tree. .
[0045] This algorithm can be re-executed periodically every 5 seconds to dynamically adapt to network changes. When a node's score drops beyond a preset threshold (the default threshold is 20%, which can be adjusted as needed), it immediately triggers local path reselection or emergency topology reconstruction. This approach can perceive the entire network's operational status in real time, build the optimal fragmentation transmission path, avoid bottleneck nodes with poor performance, and, through a multi-level distribution tree and relay parent node collaborative forwarding mode, can adapt to large-scale equipment upgrade scenarios, effectively solving the performance bottlenecks of traditional centralized upgrades.
[0046] Unlike the traditional Kruskal algorithm, which uses link quality as edge weights, this invention uses child node scores as edge weights, allowing nodes with stronger overall capabilities to take on parent node forwarding tasks first. This embodiment uses an improved minimum spanning tree construction algorithm. In addition, other schemes such as the constrained Prim algorithm, heuristic tree construction algorithms, multi-level clustering algorithms based on node scores, and dynamic routing algorithms based on graph search can also be used to complete the topology construction.
[0047] Furthermore, in a specific implementation, in the cluster upgrade method provided in the embodiments of the present invention, step S104 predicts the time for each node to complete the shard write and generates a zero-wait transmission sequence, which may specifically include: collecting the historical shard write time, node score, bandwidth utilization and flash memory write speed of each node, and constructing a time series feature vector; inputting the time series feature vector into a time series prediction model to predict the time for each node to complete the current shard write; arranging each node in ascending order according to the predicted current shard write time to generate a zero-wait transmission sequence.
[0048] Specifically, constructing a time-series feature vector may include: calculating the ratio of the current available bandwidth to the maximum bandwidth of each node as the bandwidth utilization ratio; calculating the ratio of the flash write speed to the maximum write speed of each node as the flash write speed ratio; and combining historical shard write time, node score, bandwidth utilization ratio, and flash write speed ratio into a time-series feature vector.
[0049] In implementation, to reduce idle waiting during fragmentation transmission, a Long Short-Term Memory (LSTM) model can be introduced to predict child nodes. Time to complete the current shard write During the upgrade, the master node dynamically allocates fragment transmission sequences based on predicted values. The expression for the Long Short-Term Memory (LSTM) network model is as follows: ; Among them, feature parameters The time-series feature vector includes historical write time, node comprehensive score, bandwidth utilization ratio, and flash write speed ratio, and its expression is: ; in, , The following are the historical write times of the preceding shards of the corresponding nodes.
[0050] parameter The weights for the LSTM network are optimized using training data (such as OpenBMC simulation platform logs). The model's final output is the prediction time. The unit can be seconds, and it is used to schedule the next group of slices in advance.
[0051] It should be added that this invention uses a time series prediction model to predict node processing latency. This time series prediction model can include, but is not limited to, LSTM, Gated Recurrent Unit (GRU), recurrent neural network, statistical prediction model, or a combination thereof. By predicting the node receiving window using a lightweight LSTM model, zero-wait pipeline scheduling is driven, which can accurately predict the node receiving window, achieve zero-wait pipeline transmission, and eliminate the idle time of the master node.
[0052] Furthermore, in a specific implementation, in the cluster upgrade method provided in the embodiments of the present invention, step S104 determines the distribution sequence of fragments sent along the transmission path based on the zero-wait transmission sequence. Specifically, it may include: sending fragments to the head node of the zero-wait transmission sequence at a set time interval without waiting for acknowledgment, and determining the first distribution sequence of sending fragments to directly connected nodes; for non-directly connected nodes, the parent node determines the second distribution sequence of forwarding fragments to child nodes based on the expected completion time of reception, link transmission delay, and processing overhead time.
[0053] In implementation, this invention involves the master node performing zero-wait pipeline transmission and pushing fragments to all child nodes, while directly connected child nodes are distributed according to the predicted duration. The data is arranged in ascending order to form a dynamic queue. The master node sends fragments to the head node of the queue at fixed time intervals (e.g., 50ms). The transmission process does not require waiting for acknowledgment, eliminating idle time. Fragments are pushed in an out-of-order, cyclical manner, for example, sequentially to the first node of the queue. The second node push The third push The push is looped, and when the push loop returns to the first node, it may push again. Waiting for subsequent fragmentation.
[0054] For nodes that are not directly connected to the master node, their parent node predicts the duration based on its own prediction. The forwarding window is calculated using the following formula: ; in, This is the estimated time point at which non-directly connected child nodes will begin forwarding fragments; This is the estimated time when the parent node will complete receiving and can begin processing. This refers to the link transmission delay between the parent node and the child node. This refers to the processing overhead time required by the parent node after receiving data (such as unpacking, verification, scheduling, etc.) to ensure cross-level collaborative transmission.
[0055] In this invention, not all nodes are directly connected to the master node. For non-directly connected nodes, their upstream nodes (i.e., "parent nodes") must forward fragmented data on their behalf. To ensure a consistent overall transmission rhythm, the forwarding timing of each node needs to be precisely planned. For directly connected nodes, the master node directly forwards data according to their... Send fragments. For non-directly connected nodes, the parent node recursively calculates the time when the child node should start receiving data using the formula described above. This mechanism expands the security boundaries of upgrade tasks, achieves efficient fragmented distribution based on prediction windows, and supports intelligent relay transmission across multiple nodes.
[0056] Furthermore, in a specific implementation, in the cluster upgrade method provided in the embodiments of the present invention, step S105, which queries the sharding mapping table to determine the missing shards of each node, may specifically include: querying the list of nodes holding each shard in the sharding mapping table; comparing the shards currently held by each node with the entire sharding sequence, and determining the shards not held as the missing shards of the node; and recording the missing shard identifier and the sharding sequence to be retransmitted for each node.
[0057] In practice, this invention obtains the holding node information of each shard by querying the shard mapping table, compares the existing shards of each node with the complete shard sequence, accurately identifies the missing shards of each node, and records the missing shard identifier and the retransmission sequence. This can provide a basis for targeted data retransmission and shard distribution scheduling, effectively avoid duplicate transmission, and improve the overall upgrade transmission efficiency.
[0058] Furthermore, in a specific implementation, in the cluster upgrade method provided in the embodiments of the present invention, step S105, which determines the receiving node according to the transmission path and transmits the corresponding missing fragments to the receiving node according to the distribution sequence, may specifically include: determining the sending node and receiving node of each missing fragment according to the transmission path, wherein the sending node is the parent node of the receiving node; before sending the fragment, the sending node queries whether the receiving node already has the corresponding fragment and confirms it by comparing the fragment's local fingerprint; if the receiving node already holds the corresponding fragment, the transmission is skipped; if the receiving node does not hold the corresponding fragment, the sending node transmits or forwards the corresponding missing fragments to the receiving node according to the distribution sequence; and after the transmission is completed, the fragment mapping table is updated.
[0059] In implementation, this invention employs an anti-retransmission protocol. Before sending a fragment, the parent node performs a fragment existence check (frag_check) to query whether the target fragment is already stored locally on the child node. A secondary verification is then performed by comparing the fragment's local fingerprint, which can control the redundant transmission rate below 0.001%. This allows for global tracking of the full fragment status, effectively suppressing redundant data transmission and achieving closed-loop optimization of the entire transmission process.
[0060] Furthermore, in a specific implementation, the cluster upgrade method provided in the embodiments of the present invention may further include: after a node completes shard writing, recording the actual writing time and calculating the prediction residual; inputting the prediction residual into a time series prediction model, and updating the weights of the time series prediction model through incremental gradient descent to optimize the prediction accuracy.
[0061] In practice, this invention can record the actual write time after the node completes the sharding write. Calculate the predicted residual The residuals are input into the time series prediction model (such as an LSTM model), and the weights are updated through incremental gradient descent. After each set number of updates (e.g., 10), the error distribution is verified. If the mean squared error is greater than 15ms, a lightweight recalibration is triggered. This closed-loop optimization mechanism allows the model's prediction accuracy to continuously improve during operation, achieving continuous self-optimization capabilities through prediction error feedback and online model updates.
[0062] Furthermore, in specific implementation, the cluster upgrade method provided in the embodiments of the present invention may further include: if the confirmation response times out, the corresponding shard is reallocated to the backup node with the highest node score for transmission; when the shard verification fails, the corresponding shard is retransmitted from the surrounding nodes that hold the failed shard; when a node fails, the nearest holding node is located based on the shard mapping table, and the corresponding missing shard is retransmitted.
[0063] In implementation, to ensure the reliability of fragmented transmission, this invention, after a set number of confirmation responses (e.g., 3 times) timeouts, reallocates the corresponding fragment to the backup node with the highest score in the topology for transmission. If fragment verification fails, data is retransmitted from the nearest fragment-holding node. If a node fails, the nearest holding node can be quickly located using the fragment mapping table to complete the fragment retransmission. This entire mechanism combines fragmented transmission, state tracking, partial retransmission, and backup path switching to comprehensively improve the overall reliability of the firmware upgrade process.
[0064] Furthermore, in specific implementation, the cluster upgrade method provided in the above embodiments of the present invention may also include: after the fragments are received, verifying the integrity of the image, writing a switching flag and requesting a restart after successful verification, switching the standby partition to the primary partition after restarting; if the verification fails or the restart is unexpected, triggering a rollback mechanism to restore the state before the upgrade and reporting an alarm.
[0065] In implementation, after the node completes the reception of all fragments, the present invention can first perform integrity verification on the firmware image. If the verification passes, a switching identifier is written and a restart request is initiated. After the device restarts, the backup partition is switched to the primary partition to complete the version upgrade. If the image verification fails or an abnormal restart occurs, the rollback mechanism is immediately started to restore the device to the operating state before the upgrade and report alarm information synchronously, effectively ensuring the stable operation of the device and avoiding the risks caused by upgrade failures.
[0066] Figure 2 This is a flowchart illustrating the cluster upgrade method provided in an embodiment of the present invention. Figure 2 As shown, the master node uploads the firmware image, initiates cluster upgrade mode, and generates a digital token. The master node broadcasts this token on the local area network, and nodes of the same model that pass verification respond and join the cluster, completing the formation and locking of the cluster of devices of the same model. Subsequently, the firmware image is sliced, which can be done in 1MB granularity, generating a shard sequence F1, F2, ..., F... nThe system outputs a fragment list and integrity checksum (e.g., MD5), and generates a fragment mapping table. A UDP Beacon collection cycle is initiated, with each node periodically reporting operational data such as round-trip latency, packet loss rate, available network bandwidth, and flash memory write speed. A node score matrix is generated by calculating the score of each node using a node scoring function. Then, a constrained Kruskal algorithm is used to sort the links in descending order according to the child node scores and construct a minimum spanning tree. This topology is recalculated and updated every 5 seconds, ultimately outputting JSON-formatted topology data in the format: {"parent": "node_001", "children": ["node_002", ...], "score": 0.85}. The temporal feature vector is input into an LSTM model to predict the child node fragment write completion time, thereby generating a zero-wait transmission sequence and dynamically allocating fragment transmission priorities. The fragment mapping table is queried based on the topology and prediction results to determine if a fragment to be transmitted exists. If it exists, a pre-query handshake operation is performed to verify whether the target node already holds the corresponding fragment. If the node already holds the fragment, the transmission is skipped. If the node does not hold the fragment, the master or parent node pushes the fragment to the child node via protocols such as HTTP, SFTP, or Redfish. Each fragment awaits confirmation, and automatic retransmission occurs upon transmission failure, with a maximum of three retransmissions. After receiving the fragment data, the child node writes it to a non-currently running backup partition. After transmission, the fragment mapping table is updated promptly, and the actual fragment write time is recorded. The data is fed back to the LSTM model for online learning, continuously optimizing model parameters and network topology. Once the node has received all fragments, the firmware image MD5 value is recalculated and compared with the original checksum for integrity verification. After successful verification, the node writes a partition switch flag to non-volatile memory and initiates a restart request. After the device restarts, the backup partition is switched to the primary partition, and the original primary partition becomes the backup partition. If image verification fails, the system immediately reports the fault information and triggers the rollback mechanism, restoring the device to its pre-upgrade state and reporting an alarm. After the device restarts and completes its self-test, the main controller receives a successful upgrade heartbeat signal from the node, marking the upgrade task as complete. If the restart fails or the self-test is abnormal, the node will automatically load the original primary partition, roll back to its pre-upgrade state, and issue an alarm. The entire process relies on digital tokens to complete node access verification, ensuring cluster access security; it improves shard distribution efficiency through dynamic topology and zero-wait scheduling; it effectively suppresses redundant transmission through shard mapping tables and pre-query mechanisms; and it combines multi-level integrity verification, retransmission and retry capabilities with fault rollback capabilities to achieve full-link closed-loop control of device access, data distribution, and result verification, comprehensively considering the security, transmission efficiency, and operational reliability of the firmware upgrade process.
[0067] Furthermore, this embodiment addresses edge node upgrade scenarios in weak network environments. The upgrade targets are small-scale nodes deployed across multiple racks or edge areas, which typically face issues such as high network jitter, high packet loss rates, and low bandwidth. Specific optimization methods are as follows: the master node generates an initial node score based on the historical link quality of each node; the fragment size is automatically reduced for nodes in weak networks; the topology reconstruction cycle is shortened from 5 seconds to 2 seconds, increasing the topology update frequency; for nodes with packet loss rates exceeding the threshold, a backup parent node with better link stability is prioritized; when a link experiences consecutive acknowledgment (ACK) timeouts and reaches the threshold, the current link transmission is temporarily suspended, and transmission is switched to a backup path to continue. This reduces the overall upgrade failure rate in weak network environments; minimizes the drag on the global upgrade task from a single unstable node; and ensures that local anomalies do not affect the upgrade progress of other nodes.
[0068] From the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by software plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0069] Embodiments of the present invention also provide a cluster upgrade device. Figure 3 This is a schematic diagram of the cluster upgrade device provided in an embodiment of the present invention. This embodiment is based on functional modules, such as… Figure 3 As shown, the device includes: The credential verification module 10 is used to generate and broadcast encrypted access credentials, add nodes whose credentials have been verified to the upgrade cluster and lock them; The fragment transmission execution module 11 is used to divide the firmware image into multiple fragments and establish a fragment mapping table; the fragment mapping table is used to record the attribute information of each fragment in the upgrade cluster; The dynamic topology construction module 12 is used to collect the status information of each node in the upgrade cluster, calculate the node score and construct the topology structure, and determine the transmission path of the shard in the upgrade cluster based on the topology structure. The prediction scheduling module 13 is used to predict the time when each node completes the fragment writing, generate a zero-wait transmission sequence, and determine the distribution sequence of fragments sent along the transmission path based on the zero-wait transmission sequence. The status tracking feedback module 14 is used to query the fragment mapping table to determine the missing fragments of each node, determine the receiving node according to the transmission path, and transmit the corresponding missing fragment to the receiving node according to the distribution sequence; if the node already holds the corresponding fragment, the transmission is skipped.
[0070] In the cluster upgrade device provided in this embodiment of the invention, the interaction of the four modules generates and broadcasts encrypted access credentials, filters and verifies nodes to form and lock the upgrade cluster, thus achieving secure cluster access control. The firmware image is fragmented and a fragment mapping table is established, providing a global state tracking basis for fragment transmission. By collecting node state information, calculating node scores, and constructing a topology, the fragment transmission path is dynamically optimized. Predicting node fragment write times and generating zero-wait transmission sequences enables intelligent scheduling, reducing transmission waiting time and improving upgrade speed. By querying the fragment mapping table, transmitting missing fragments on demand, and skipping already held fragments, redundant transmission is significantly suppressed, improving bandwidth utilization and overall distribution efficiency. This upgrade, completed collaboratively by the cluster nodes themselves, reduces dependence on external tools and platforms. Combined with the collaborative optimization of dynamic topology and predictive scheduling, the overall reliability and efficiency of firmware upgrades are significantly improved.
[0071] Since the embodiments of the cluster upgrade device and the cluster upgrade method correspond to each other, the descriptions of the features in the embodiments corresponding to the cluster upgrade device can be found in the relevant descriptions of the embodiments corresponding to the cluster upgrade method, and will not be repeated here. Furthermore, it has the same beneficial effects as the cluster upgrade method mentioned above.
[0072] Furthermore, in a specific implementation, in the cluster upgrade device provided in the embodiments of the present invention, the credential verification module 10 can be specifically used to generate and broadcast encrypted access credentials based on the target firmware version information, the list of allowed access device models, and the valid time window; receive verification responses returned by each node, verify the validity of the credential signature, check whether the node model belongs to the list of allowed access device models, and confirm whether the current time is within the valid time window; only when the signature verification is successful, the model matches, and the current time is within the valid time window, the corresponding node is added to the upgrade cluster, and the upgrade cluster is locked.
[0073] Furthermore, in a specific implementation, in the cluster upgrade device provided in the embodiments of the present invention, the fragmented transmission execution module 11 can be used to divide the firmware image into multiple fragments, each fragment being attached with a unique sequence identifier, integrity verification value, digital signature, timestamp and task identifier, so that each fragment becomes an independent transmission unit; a fragmented mapping table is established, and the fragmented mapping table is used to record the distribution status, verification information, holding node list and distribution path snapshot of each fragment in the upgrade cluster.
[0074] Furthermore, in a specific implementation, in the cluster upgrade device provided in the embodiments of the present invention, the dynamic topology construction module 12 can be used to collect the round-trip latency, packet loss rate, current available bandwidth, and flash memory write speed of each node in the upgrade cluster to the parent node; calculate the node score based on the round-trip latency, packet loss rate, the ratio between the current available bandwidth and the maximum bandwidth, and the ratio between the flash memory write speed and the maximum write speed, combined with a preset weight coefficient; and construct the topology structure based on the node score, with the master node as the root node. Specifically, with the master node as the root node and the child node score as the edge weight, each node is initialized as an independent subtree to construct a fully connected weighted graph; the edges in the fully connected weighted graph are sorted in descending order of edge weight, and the child node with the highest node score is selected as the parent node; the sorted edges are traversed, and if an edge connects two different subtrees and the corresponding child node does not reach the maximum number of child nodes limit, the subtrees are merged and an edge is added; the merging operation is repeated until all nodes are connected, forming a minimum spanning tree as the topology structure. After constructing the topology, the status information of each node can be collected periodically and the node score can be recalculated. With the master node as the root node, the minimum spanning tree is reconstructed based on the recalculated node score as the updated topology. When the node score drops below a preset threshold, only the node and its corresponding subtree are reselected locally, or the minimum spanning tree is reconstructed to complete the emergency reconstruction. The transmission path of the shard in the upgrade cluster is re-determined based on the updated topology.
[0075] Furthermore, in a specific implementation, in the cluster upgrade device provided in the embodiments of the present invention, the prediction scheduling module 13 can be specifically used to collect the historical fragment write time, node score, bandwidth utilization and flash memory write speed of each node, and construct a time series feature vector; input the time series feature vector into the time series prediction model to predict the time when each node completes the current fragment write; arrange each node in ascending order according to the predicted current fragment write time to generate a zero-wait transmission sequence; specifically, it can also be used to send fragments to the head node of the zero-wait transmission sequence at a set time interval without waiting for confirmation response, and determine the first distribution sequence of sending fragments to directly connected nodes; for non-directly connected nodes, the parent node determines the second distribution sequence of forwarding fragments to child nodes based on the expected completion time of reception, link transmission delay and processing overhead time.
[0076] Furthermore, in specific implementation, in the cluster upgrade device provided in the embodiments of the present invention, the state tracking feedback module 14 can be specifically used to query the list of holding nodes for each shard in the sharding mapping table; compare the shards currently held by each node with the entire sharding sequence, and determine the shards not held by the node as the missing shards of the node; record the missing shard identifier of each node and the sharding sequence to be retransmitted; specifically, it can also be used to determine the sending node and receiving node of each missing shard according to the transmission path, with the sending node being the parent node of the receiving node; before sending the shard, the sending node queries whether the receiving node already has the corresponding shard, and confirms it by comparing the local fingerprint of the shard; if the receiving node already holds the corresponding shard, the transmission is skipped; if the receiving node does not hold the corresponding shard, the sending node transmits or forwards the corresponding missing shard to the receiving node according to the distribution sequence; after the transmission is completed, the sharding mapping table is updated.
[0077] Furthermore, in a specific implementation, the cluster upgrade device provided in the embodiments of the present invention may further include: a model optimization module, used to record the actual write time after the node completes the sharding write, calculate the prediction residual; input the prediction residual into the time series prediction model, and update the weights of the time series prediction model through incremental gradient descent to optimize the prediction accuracy.
[0078] Furthermore, in a specific implementation, the cluster upgrade device provided in the embodiments of the present invention may further include: a transmission failure processing module, used to reallocate the corresponding fragment to the backup node with the highest node score for transmission if the confirmation response times out; when the fragment verification fails, to retransmit the corresponding fragment from the surrounding nodes that hold the failed fragment; when a node fails, to locate the nearest holding node based on the fragment mapping table and retransmit the corresponding missing fragment.
[0079] Furthermore, in specific implementation, the cluster upgrade device provided in the above embodiments of the present invention may further include: an upgrade result processing module, used to verify the integrity of the image after the fragments are received, write a switching flag and request a restart after the verification is successful, and switch the backup partition to the primary partition after restarting; if the verification fails or the restart is unexpected, a rollback mechanism is triggered to restore the state before the upgrade and an alarm is reported.
[0080] Embodiments of the present invention also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described cluster upgrade method embodiments.
[0081] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program configured to execute the steps in any of the above-described cluster upgrade method embodiments at runtime.
[0082] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0083] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described cluster upgrade method embodiments.
[0084] Embodiments of the present invention also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described cluster upgrade method embodiments.
[0085] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be performed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-chip (SoC), a complex programmable logic device (CPLD), a microcontroller unit (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or a combination thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0086] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0087] The above provides a detailed description of the cluster upgrade method and electronic device provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only intended to help understand the method and core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of this invention.
Claims
1. A cluster upgrade method, characterized in that, include: Based on the target firmware version information, the list of allowed device models and the valid time window, generate an encrypted access credential and broadcast the encrypted access credential; Receive verification responses from each node, verify the validity of the credential signature, check whether the node model belongs to the list of allowed access device models, and confirm whether the current time is within the valid time window; only when the signature verification is successful, the model matches, and the current time is within the valid time window, add the corresponding node to the upgrade cluster and lock the upgrade cluster; The firmware image is divided into multiple fragments, and a fragment mapping table is established; the fragment mapping table is used to record the attribute information of each fragment in the upgrade cluster; Collect the round-trip latency, packet loss rate, current available bandwidth, and flash memory write speed of each node in the upgrade cluster to the parent node; The node score is calculated based on the round-trip latency, the packet loss rate, the ratio between the current available bandwidth and the maximum bandwidth, the ratio between the flash memory write speed and the maximum write speed, and a preset weighting coefficient. The node score is a quantitative score calculated based on the real-time operating status information of each node in the upgrade cluster; Using the master node as the root node and the child node rating as the edge weight, a fully connected weighted graph is constructed during initialization, treating each node as an independent subtree. The edges in the fully connected weighted graph are then sorted in descending order of edge weight, and the child node with the highest rating is selected as the parent node. The sorted edges are traversed; if an edge connects two different subtrees and the corresponding child nodes do not reach the maximum number of child nodes, the subtrees are merged and an edge is added. This merging operation is repeated until all nodes are connected, forming a minimum spanning tree as the topology. The transmission path for shards in the upgrade cluster is determined based on this topology. Predict the time for each node to complete the fragment write, generate a zero-wait transmission sequence, and determine the distribution timing of fragments sent along the transmission path based on the zero-wait transmission sequence; Query the list of holding nodes for each shard in the sharding mapping table; Compare the fragments currently held by each node with the complete fragment sequence, and identify the fragments that are not held as the missing fragments of the node; record the missing fragment identifier of each node and the fragment sequence that needs to be retransmitted; The receiving node is determined according to the transmission path, and the corresponding missing fragment is transmitted to the receiving node according to the distribution timing. If a node already holds the corresponding fragment, the transmission is skipped. Specifically, the sending and receiving nodes for each missing fragment are determined according to the transmission path, with the sending node being the parent node of the receiving node. Before sending the fragment, the sending node queries whether the receiving node already possesses the corresponding fragment, confirming this by comparing the fragment's local fingerprint. If the receiving node already holds the corresponding fragment, the transmission is skipped. If the receiving node does not hold the corresponding fragment, the sending node transmits or forwards the corresponding missing fragment to the receiving node according to the distribution sequence. After transmission, the fragment mapping table is updated.
2. The cluster upgrade method according to claim 1, characterized in that, The firmware image is divided into multiple fragments, and a fragment mapping table is established, including: The firmware image is divided into multiple fragments, and each fragment is given a unique sequence identifier, integrity check value, digital signature, timestamp and task identifier, making each fragment an independent transmission unit; Establish a sharding mapping table, and use the sharding mapping table to record the distribution status, verification information, holding node list and distribution path snapshot of each shard in the upgrade cluster.
3. The cluster upgrade method according to claim 1, characterized in that, After constructing the topology, the following is also included: Periodically collect the status information of each node and recalculate the node score; With the master node as the root node, the minimum spanning tree is reconstructed based on the recalculated node scores to form the updated topology. When a node's score drops below a preset threshold, only the node and its corresponding subtree undergo local path reselection, or the minimum spanning tree is reconstructed to complete the emergency reconstruction. The transmission path of the shards in the upgraded cluster is redefined based on the updated topology.
4. The cluster upgrade method according to claim 1, characterized in that, Predict the time it takes for each node to complete the shard write, and generate a zero-wait transfer sequence, including: Collect historical shard write time, node score, bandwidth utilization and flash write speed of each node, and construct a time-series feature vector; The time-series feature vector is input into the time-series prediction model to predict the time when each node completes the current shard write. Arrange the nodes in ascending order according to the predicted write time of the current shard, and generate a zero-wait transmission sequence.
5. The cluster upgrade method according to claim 4, characterized in that, Constructing time-series feature vectors includes: The ratio of the current available bandwidth to the maximum bandwidth of each node is calculated as the bandwidth utilization ratio. The ratio of the flash write speed of each node to the maximum write speed is calculated as the flash write speed ratio. The historical shard write time, the node score, the bandwidth utilization ratio, and the flash memory write speed ratio are combined into a timing feature vector.
6. The cluster upgrade method according to claim 1, characterized in that, Determining the distribution timing of fragments sent along the transmission path based on the zero-wait transmission sequence includes: Fragments are sent to the head node of the zero-wait transmission sequence at set time intervals without waiting for acknowledgment, thus determining the first distribution sequence for sending fragments to directly connected nodes; For non-directly connected nodes, the parent node determines the second distribution sequence of the fragments to be forwarded to the child node based on the expected completion time of reception, link transmission delay, and processing overhead time.
7. The cluster upgrade method according to claim 5, characterized in that, Also includes: After a node completes a sharded write, it records the actual write time and calculates the predicted residual. The predicted residuals are input into the time series prediction model, and the weights of the time series prediction model are updated by incremental gradient descent to optimize the prediction accuracy.
8. The cluster upgrade method according to claim 1, characterized in that, Also includes: If the response timeout is confirmed, the corresponding fragment will be reassigned to the standby node with the highest node score for transmission. When a fragment verification fails, the corresponding fragment is retransmitted from a neighboring node that holds the failed fragment. When a node fails, the nearest holding node is located based on the sharding mapping table, and the corresponding missing shard is retransmitted.
9. The cluster upgrade method according to claim 1, characterized in that, Also includes: After all the fragments have been received, verify the integrity of the image. If the verification is successful, write the switch flag and request a restart. After restarting, switch the standby partition to the primary partition. If verification fails or the restart is unexpected, a rollback mechanism will be triggered to restore the system to its pre-upgrade state and an alarm will be reported.
10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the cluster upgrade method as described in any one of claims 1 to 9 when executing the computer program.
Citation Information
Patent Citations
Baseboard management controller cluster firmware upgrading method, product, equipment and medium
CN118484219A
New energy automobile communication controller software upgrading method and system
CN121187618A
Firmware management method and electronic equipment
CN121433696A