Remote online upgrade method of pulp collecting machine firmware
Through genetic programming, the firmware upgrade strategy is optimized and the upgrade parameters are dynamically adjusted, which solves the problems of low firmware upgrade efficiency and poor reliability in the existing technology, and achieves a more efficient and stable firmware upgrade process.
Patent Information
- Application Number
- CN202411900226.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing firmware upgrade methods lack the ability to dynamically adjust according to the actual network environment and device status, resulting in low upgrade efficiency, poor reliability and insufficient adaptability, especially when network bandwidth is limited or equipment load is high.
Using an intelligent optimization method based on genetic programming, we use the initial firmware upgrade strategy to simulate tests and evaluate its fitness, and continuously optimize the strategy through cross-and-mutation operations, dynamically adjust the packet size, transmission rate and upgrade timing to ensure the efficiency and stability of the upgrade process.
It significantly improves the efficiency and reliability of firmware upgrades, enhances the adaptability and stability of the system, and ensures smooth operation in a variable environment.
Smart Images

Figure CN119342049B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of software upgrading, in particular to a remote online upgrading method for firmware of a pulp collecting machine. Background Art
[0002] In the process of firmware upgrade, existing technologies mainly rely on traditional manual operations or preset automation mechanisms. The traditional firmware upgrade method usually uses the device's firmware management system to download the firmware package to the device through a network connection, and then perform the firmware installation operation on the device. Common upgrade methods include updating the firmware through USB drive, network update, and local download. These methods generally require the device to be offline or in standby mode during the firmware upgrade process to avoid affecting the ongoing work of the device during the upgrade process.
[0003] Although the existing technology provides some automation and flexibility in firmware upgrades, it still has several significant defects that limit its application in a variety of complex environments. First, most of the existing firmware upgrade solutions use fixed transmission parameters. The packet size, transmission rate, and upgrade timing are usually preset, and lack the ability to dynamically adjust according to the actual network environment and device status. For example, in the case of limited network bandwidth or high latency, the existing fixed strategy may not be able to effectively optimize the transmission efficiency, resulting in a long delay or even failure of the firmware upgrade process. On the contrary, the intelligent adaptation strategy can dynamically adjust the data transmission method according to the real-time network bandwidth, latency, and packet loss rate, reduce resource waste, and improve upgrade efficiency.
[0004] Secondly, existing technologies usually do not fully utilize the status information of the device to make intelligent decisions. Factors such as the device's CPU load, memory usage, and current network load are often not fully considered in existing technologies. For example, forcibly upgrading the firmware when the device load is high may cause device performance to degrade or even cause the system to crash. The real-time status information of the device should be used as an important basis for firmware upgrade decisions to ensure that the upgrade process does not affect the normal operation of the device. Existing technologies lack flexibility in this regard, resulting in the choice of upgrade timing being too rigid and unable to adapt to the needs of devices under different loads. Summary of the invention
[0005] The present invention proposes a remote online upgrade method for pulp collecting machine firmware, aiming to improve the upgrade efficiency, reliability and adaptability by intelligently optimizing the firmware upgrade strategy, so as to ensure the stable operation of the equipment in a changing environment.
[0006] The remote online upgrade method of the pulp collecting machine firmware includes the following steps:
[0007] S1. Regularly detect the firmware version of the pulp machine, and when the firmware version that needs to be upgraded is detected, trigger an upgrade request; and generate a set of initial firmware upgrade policies, each policy is represented by a program tree, the program tree includes firmware upgrade parameters and firmware upgrade operation parameters;
[0008] S2. Conduct simulation tests on each initially generated firmware upgrade strategy to evaluate its performance in different network environments and device states, and select the parent individual based on the probability of fitness;
[0009] S3. According to the crossover operation, the genetic recombination process of organisms is simulated, and the strategy trees of two parent individuals are partially exchanged to generate new upgrade strategies; and according to the mutation operation, new strategy variants are generated by modifying certain nodes in the program tree;
[0010] S4. Continuously optimize the firmware upgrade strategy through multiple generations of evolution; when the iteration ends, select the firmware upgrade strategy with the highest fitness as the final firmware upgrade solution for the pulp collector;
[0011] S5. The server transmits the upgraded firmware package to the pulp collecting machine. After the firmware transmission is completed, the pulp collecting machine starts the BOOT part and switches the firmware from the current firmware program version to the new firmware program version through the partition exchange mechanism;
[0012] S6. The pulp collecting machine performs a restart operation and loads a new firmware program version;
[0013] Wherein, in the step S6, when the restart operation fails, the cause of the firmware failure is analyzed according to the incremental rollback mechanism, and the firmware is restored to the factory firmware program version or the last successful firmware program version.
[0014] Furthermore, in step S1, generating a set of initial firmware upgrade strategies specifically includes the following sub-steps:
[0015] S101. The initial firmware upgrade strategy is represented by a state vector, wherein the elements in the state vector represent firmware upgrade parameters, which include data packet size, transmission rate, and upgrade timing, namely:
[0016] ;
[0017] Among them, the represents the state vector, i.e., the parameterized form of the firmware upgrade strategy represented by the program tree, They respectively represent the data packet size, transmission rate and upgrade timing parameters used for firmware upgrade;
[0018] S102. By randomly selecting the operating parameters of the firmware upgrade from a predefined discrete set, a plurality of initial firmware upgrade strategies are formed to form an initial firmware upgrade strategy group as an initial population of genetic programming, namely:
[0019] ;
[0020] ;
[0021] ;
[0022] Among them, the Indicates the operating parameters for the packet size. represents the operating parameters for the transmission rate, the Indicates the operation parameters for the upgrade timing.
[0023] Furthermore, the step S2 specifically includes the following sub-steps:
[0024] S201. Each firmware upgrade strategy is tested in a simulated environment, which includes device status and network environment factors. The firmware simulation upgrade process is performed in different simulated environments. According to the transmission process from the old version to the new version of the firmware, the transmission time, upgrade success rate, and bandwidth utilization index data are recorded;
[0025] S202 establishes a fitness function, the fitness function combines transmission time, success rate, bandwidth utilization, and evaluates each upgrade strategy;
[0026] S203. Normalize the fitness of each upgrade strategy so that the sum of the fitness is 1, and convert it into a selection probability;
[0027] S204. Select an upgrade strategy with higher fitness as the parent individual through the roulette wheel selection method.
[0028] Furthermore, in step S202, the fitness function is specifically:
[0029] ;
[0030] Among them, the Represents the fitness function of the i-th upgrade strategy individual, represents the transmission time of the i-th upgrade strategy individual, represents the upgrade success rate of the i-th upgrade strategy individual, represents the bandwidth utilization of the i-th upgrade strategy individual, , and They represent the indicator weights corresponding to transmission time, upgrade success rate, and bandwidth utilization respectively.
[0031] Furthermore, in step S203, the specific process of normalization is expressed as follows:
[0032] ;
[0033] Among them, the represents the normalized fitness value of the i-th upgrade strategy individual. represents the fitness function of the jth upgrade strategy individual, n represents the total number of individuals in the population, and j represents the index of the number of individuals in the population.
[0034] Furthermore, in step S203, the calculation process of the selection probability is as follows:
[0035] ;
[0036] Among them, the represents the probability of the i-th upgrade strategy individual being selected, Represents the normalized fitness value of the j-th upgrade strategy individual.
[0037] Furthermore, in step S204, the specific selection process of the roulette wheel selection method is: the selection probabilities of all upgrade strategy individuals are accumulated to form an interval from 0 to 1, a value is randomly selected in the interval using a random number generator, and the corresponding upgrade strategy individual is selected by the random value.
[0038] Furthermore, in step S3, the crossover operation specifically includes the following sub-steps:
[0039] S3011. In the program tree of two upgrade strategy parent individuals, randomly select at least one intersection, the intersection being the strategy tree;
[0040] S3012. Generate two new upgrade strategies through the crossover operation. The two new upgrade strategies inherit part of the features of the parent generation and become child individuals. The part of the features is the part of the strategy tree that has not been crossovered.
[0041] Furthermore, in step S3, the mutation operation specifically includes the following sub-steps:
[0042] S3021. Randomly select a node from the offspring individuals generated after the crossover operation to mutate;
[0043] S3022. Randomly modify the node value of the selected variation point, wherein the node value includes a firmware upgrade parameter and an operating parameter of the firmware upgrade;
[0044] S3023. The mutated upgraded strategy individuals form new strategies as part of the next generation population.
[0045] Furthermore, the step S4 specifically includes the following sub-steps:
[0046] S401. Re-simulate and test all newly generated upgrade strategy individuals and evaluate their fitness; repeat the crossover and mutation operation;
[0047] S402. When the fitness value of the upgrade strategy individual changes between multiple generations and is lower than the set threshold or the iteration number reaches the set threshold, the iteration is terminated;
[0048] S403. Output the individual with the highest fitness value in the current population as the final firmware upgrade strategy.
[0049] The beneficial effects of the invention are:
[0050] The present invention optimizes the firmware upgrade process intelligently through a dynamic adjustment strategy based on real-time network and device status, and can flexibly adjust the data packet size, transmission rate and upgrade timing according to multiple factors such as bandwidth, delay, packet loss rate, device load, etc., significantly improving the upgrade efficiency and reliability. The technical solution proposed by the present invention not only improves the adaptability of firmware upgrades, but also ensures the stability and performance of the system, ensuring smooth operation in a changing environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A method flow chart of a remote online upgrade method of a pulp collecting machine firmware provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following.
[0053] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0054] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work are within the scope of protection of the present invention. It should be noted that relational terms such as the terms "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0055] Moreover, the terms "comprises," "comprising," or any other variation thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or machine that includes a list of elements includes not only those elements, but also other elements not expressly listed, or elements inherent to such process, method, article, or machine. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or machine that includes the element.
[0056] The features and performance of the present invention are further described in detail below in conjunction with the embodiments.
[0057] Among them, Figure 1 The remote online upgrade method of the pulp collecting machine firmware includes the following steps:
[0058] S1. Regularly detect the firmware version of the pulp machine, and when the firmware version that needs to be upgraded is detected, trigger an upgrade request; and generate a set of initial firmware upgrade policies, each policy is represented by a program tree, the program tree includes firmware upgrade parameters and firmware upgrade operation parameters;
[0059] S2. Conduct simulation tests on each initially generated firmware upgrade strategy to evaluate its performance in different network environments and device states, and select the parent individual based on the probability of fitness;
[0060] S3. According to the crossover operation, the genetic recombination process of organisms is simulated, and the strategy trees of two parent individuals are partially exchanged to generate new upgrade strategies; and according to the mutation operation, new strategy variants are generated by modifying certain nodes in the program tree;
[0061] S4. Continuously optimize the firmware upgrade strategy through multiple generations of evolution; when the iteration ends, select the firmware upgrade strategy with the highest fitness as the final firmware upgrade solution for the pulp collector;
[0062] S5. The server transmits the upgraded firmware package to the pulp collecting machine. After the firmware transmission is completed, the pulp collecting machine starts the BOOT part and switches the firmware from the current firmware program version to the new firmware program version through the partition exchange mechanism;
[0063] S6. The pulp collecting machine performs a restart operation and loads a new firmware program version;
[0064] Wherein, in the step S6, when the restart operation fails, the cause of the firmware failure is analyzed according to the incremental rollback mechanism, and the firmware is restored to the factory firmware program version or the last successful firmware program version.
[0065] Furthermore, in step S1, generating a set of initial firmware upgrade strategies specifically includes the following sub-steps:
[0066] S101. The initial firmware upgrade strategy is represented by a state vector, wherein the elements in the state vector represent firmware upgrade parameters, which include data packet size, transmission rate, and upgrade timing, namely:
[0067] ;
[0068] Among them, the represents the state vector, i.e., the parameterized form of the firmware upgrade strategy represented by the program tree, They respectively represent the data packet size, transmission rate and upgrade timing parameters used for firmware upgrade;
[0069] S102. By randomly selecting the operating parameters of the firmware upgrade from a predefined discrete set, a plurality of initial firmware upgrade strategies are formed to form an initial firmware upgrade strategy group as an initial population of genetic programming, namely:
[0070] ;
[0071] ;
[0072] ;
[0073] Among them, the Indicates the operating parameters for the packet size. represents the operating parameters for the transmission rate, the Indicates the operation parameters for the upgrade timing.
[0074] Specifically, in the above-mentioned embodiment, by regularly detecting the firmware version, the server can trigger an upgrade request in time when the device firmware is outdated. Based on the current firmware version of the pulp collector, the device status (such as CPU load, memory usage) and the network environment (such as bandwidth, delay, packet loss rate, etc.), the server will automatically start the optimization process of genetic programming. Genetic programming generates a set of initial firmware upgrade strategies and uses a program tree structure to represent them, where each node represents an upgrade operation, such as selecting an appropriate data packet size, transmission rate and upgrade timing. Each strategy represents a candidate firmware upgrade solution, so that through the structure of the strategy tree, the system can be flexibly configured in different upgrade processes to meet the needs of various devices and network environments. The initial population randomly generates different upgrade strategies to ensure that the system can explore a variety of potential solutions and provide sufficient options for subsequent optimization.
[0075] Furthermore, the step S2 specifically includes the following sub-steps:
[0076] S201. Each firmware upgrade strategy is tested in a simulated environment, which includes device status and network environment factors. The firmware simulation upgrade process is performed in different simulated environments. According to the transmission process from the old version to the new version of the firmware, the transmission time, upgrade success rate, and bandwidth utilization index data are recorded;
[0077] S202 establishes a fitness function, the fitness function combines transmission time, success rate, bandwidth utilization, and evaluates each upgrade strategy;
[0078] S203. Normalize the fitness of each upgrade strategy so that the sum of the fitness is 1, and convert it into a selection probability;
[0079] S204. Select an upgrade strategy with higher fitness as the parent individual through the roulette wheel selection method.
[0080] Specifically, the embodiment evaluates each initial firmware upgrade strategy through simulation testing. The simulation test takes into account different network environments (bandwidth, latency, packet loss rate, etc.) and device states (such as CPU load, memory usage, etc.), so that each strategy can be fully evaluated in a variety of actual environments. By calculating the performance of each strategy in different environments, the system evaluates fitness based on the following criteria: transmission time, success rate, bandwidth utilization, and resource consumption of the device for firmware upgrades. Strategies with high fitness will be selected as parent individuals and probabilistically selected through selection operations (such as roulette selection). In this way, strategies with high fitness have a greater probability of entering the next generation, which allows excellent firmware upgrade solutions to be inherited to the next generation. Through this selection mechanism, genetic programming can select the best performing solution from a large number of candidate strategies, thereby improving the upgrade efficiency and success rate of the system.
[0081] Furthermore, in step S202, the fitness function is specifically:
[0082] ;
[0083] Among them, the Represents the fitness function of the i-th upgrade strategy individual, represents the transmission time of the i-th upgrade strategy individual, represents the upgrade success rate of the i-th upgrade strategy individual, represents the bandwidth utilization of the i-th upgrade strategy individual, , and They represent the indicator weights corresponding to transmission time, upgrade success rate, and bandwidth utilization respectively.
[0084] Further, as a preferred implementation scheme of the above embodiment, for the data of transmission time, success rate, and bandwidth utilization rate, which are difficult to accurately quantify, it is proposed to use a fuzzy logic system to establish a fuzzy fitness function, which specifically includes the following sub-steps:
[0085] S2021. define a fuzzy set for each target of the firmware upgrade, each target including three fuzzy states: high, medium, and low;
[0086] S2022. defining the specific range of each fuzzy set through a membership function and mapping the input value to the membership value of the fuzzy set;
[0087] S2023. Define fuzzy rules to describe the relationship between targets in the form of If-Then;
[0088] S2024. Combining the input membership and rules through fuzzy reasoning, we can get the fuzzy result of output fitness.
[0089] Furthermore, in step S2022, the fuzzy set definition is exemplarily represented as follows:
[0090] Goal 1: Transmission time (T)
[0091] Fast: Indicates that the transmission time is short and the firmware upgrade is completed quickly.
[0092] Normal: Indicates that the transmission time is moderate and the firmware upgrade time is suitable for the current network status.
[0093] Slow: Indicates that the transmission time is long and the firmware upgrade process is slow.
[0094] Goal 2: Success rate (C)
[0095] High: Indicates that the probability of success of the firmware upgrade is very high.
[0096] Medium: Indicates that the success rate of the firmware upgrade is medium.
[0097] Low: Indicates that the success rate of the firmware upgrade is low.
[0098] Goal 3: Bandwidth Utilization (B)
[0099] High: Indicates efficient use of network bandwidth during firmware upgrade.
[0100] Medium: Indicates that the network bandwidth utilization is within the normal range.
[0101] Low: Indicates low bandwidth utilization and wasted network resources during the firmware upgrade process.
[0102] Furthermore, in step S2023, the membership function of each target is as follows:
[0103] Transmission time (T):
[0104] Fast: When the transmission time is less than a certain threshold, the membership is close to 1.
[0105] Normal: When the transmission time is moderate, the membership is high.
[0106] Slow: When the transmission time is longer, the membership is higher.
[0107] Right now:
[0108] ;
[0109] ;
[0110] ;
[0111] Among them, the , and represent the membership functions of fast, normal and slow transmission time respectively, T represents the initial transmission time, and Indicates the maximum and minimum values of the transmission time.
[0112] Success rate (C):
[0113] High: When the success rate is high, the membership is close to 1.
[0114] Medium: When the success rate is medium, the membership is 0.5.
[0115] Low: When the success rate is low, the membership is close to 0.
[0116] Right now:
[0117] ;
[0118] ;
[0119] ;
[0120] Among them, the , and Represent the membership functions of high success rate, medium success rate and low success rate respectively. represents the initial success rate, and Represent the maximum and minimum success rates respectively.
[0121] Bandwidth utilization (B):
[0122] High: When bandwidth utilization is high, the membership degree is close to 1.
[0123] Medium: When bandwidth utilization is normal, the membership degree is 0.5.
[0124] Low: When bandwidth utilization is low, the membership degree is close to 0.
[0125] Right now:
[0126] ;
[0127] ;
[0128] ;
[0129] Among them, the , and represent the membership functions of high bandwidth utilization, medium bandwidth utilization and low bandwidth utilization respectively. represents the initial bandwidth utilization, and Respectively represent the maximum and minimum values of bandwidth utilization.
[0130] Furthermore, in step S2023, the fuzzy rules are exemplified as follows:
[0131] Rule 1: ;
[0132] Rule 2: ;
[0133] Rule 3: .
[0134] Furthermore, the step S2024 specifically includes the following sub-steps:
[0135] S20241. For each rule, calculate the corresponding membership degree and perform reasoning synthesis:
[0136] ;
[0137] Among them, the represents the degree of membership;
[0138] S20242. Calculate the final fitness value by the centroid method:
[0139] ;
[0140] Among them, the Represents the fitness value.
[0141] Furthermore, in step S203, the specific process of normalization is expressed as follows:
[0142] ;
[0143] Among them, the represents the normalized fitness value of the i-th upgrade strategy individual. represents the fitness function of the jth upgrade strategy individual, n represents the total number of individuals in the population, and j represents the index of the number of individuals in the population.
[0144] Furthermore, in step S203, the calculation process of the selection probability is as follows:
[0145] ;
[0146] Among them, the represents the probability of the i-th upgrade strategy individual being selected, Represents the normalized fitness value of the j-th upgrade strategy individual.
[0147] Furthermore, in step S204, the specific selection process of the roulette wheel selection method is: the selection probabilities of all upgrade strategy individuals are accumulated to form an interval from 0 to 1, a value is randomly selected in the interval using a random number generator, and the corresponding upgrade strategy individual is selected by the random value.
[0148] Specifically, the roulette selection method accumulates the selection probabilities of all individuals in order to form a "selection interval", and then selects an individual by random number. For example: assuming there are n strategies, the selection probabilities are: , these selection probabilities form a cumulative probability interval that sums to 1:
[0149] ;
[0150] ;
[0151] …;
[0152] ;
[0153] Furthermore, a random number r between 0 and 1 is generated, and the corresponding strategy is selected according to the cumulative probability interval of the random number r:
[0154] when , then select ;
[0155] when , then select ;
[0156] By analogy, when , then select ;
[0157] Until r falls within the cumulative probability interval of a certain strategy, the strategy is selected as the parent individual.
[0158] For example, there are 3 firmware upgrade strategies: , and , and their fitness are:
[0159] ;
[0160] ;
[0161] ;
[0162] Total fitness is: 30;
[0163] The normalized fitness is:
[0164] ;
[0165] ;
[0166] ;
[0167] The cumulative probability interval is:
[0168] ;
[0169] ;
[0170] ;
[0171] Generate a random number ;
[0172] when , then select ;
[0173] when , then select ;
[0174] when , then select .
[0175] Thus, in this way, the strategy with higher fitness It will occupy a larger selection interval, so the probability of being selected is greater.
[0176] Furthermore, in step S3, the crossover operation specifically includes the following sub-steps:
[0177] S3011. In the program tree of two upgrade strategy parent individuals, randomly select at least one intersection, the intersection being the strategy tree;
[0178] S3012. Generate two new upgrade strategies through the crossover operation. The two new upgrade strategies inherit part of the features of the parent generation and become child individuals. The part of the features is the part of the strategy tree that has not been crossovered.
[0179] Specifically, the above embodiment generates a new strategy by partially exchanging the strategy trees of two parent individuals. The nodes of each strategy tree represent different operations of firmware upgrade (such as selecting data packet size, transmission rate, etc.). Through crossover, the system can combine the advantages of parent individuals to generate a new strategy, which will perform better than the parent strategy. The crossover operation usually uses random crossover points. At the same time, the mutation operation generates new strategy variants by modifying certain nodes in the program tree. These variants often bring new potential solutions and avoid the system from falling into local optimal solutions. Mutation can change the selection conditions of operations such as data packet size selection and transmission rate adjustment, thereby generating more strategy combinations. The combination of crossover and mutation operations helps to expand the solution space and continuously explore possible optimal upgrade solutions.
[0180] Furthermore, in step S3, the mutation operation specifically includes the following sub-steps:
[0181] S3021. Randomly select a node from the offspring individuals generated after the crossover operation to mutate;
[0182] S3022. Randomly modify the node value of the selected variation point, wherein the node value includes a firmware upgrade parameter and an operating parameter of the firmware upgrade;
[0183] S3023. The mutated upgraded strategy individuals form new strategies as part of the next generation population.
[0184] Specifically, the specific implementation principle of the above embodiment is:
[0185] One or more intersections are randomly selected in the strategy trees of the two parent individuals. These intersections are the locations of different nodes in the tree. For example, assume that the two strategy trees are:
[0186] ;
[0187] ;
[0188] At this point, the intersection is "Packet Size" or "Transfer Rate";
[0189] After selecting the crossover point, the subtree structures of the two parent individuals are exchanged. The "PacketSize" part of Swap the "Transfer Rate" part to get the new offspring strategy.
[0190] The strategy after the exchange is:
[0191] ;
[0192] ;
[0193] After the crossover operation, two new offspring individuals are generated and From the parent and A new combination of inheritance.
[0194] Example: Packet size: Small (from parent), Transfer rate: High (from parent ), upgrade time: when the device is idle (from the parent ).
[0195] From the offspring individuals generated after the crossover, a node is randomly selected for mutation. The mutation point is usually a decision point in the strategy tree (such as packet size, transmission rate, or upgrade timing, etc.), for example:
[0196] ;
[0197] ;
[0198] Randomly change the node value of the selected mutation point. For example, change the "transmission rate" from "low" to "high", or change the "upgrade time" from "off-peak hours" to "when the device is idle";
[0199] After mutation : Data packet size: small, transmission rate: low, upgrade timing: when the device is idle;
[0200] After mutation : Packet size: Medium, Transmission rate: Low, Update time: When the device is idle.
[0201] After the mutation operation, the generated individuals (strategies) will become new offspring individuals and will continue to participate in selection, crossover and mutation operations in the next generation of evolution.
[0202] Furthermore, the crossover operation in the above embodiment generates two new upgraded strategies (individuals) by selecting and exchanging the strategy tree nodes of the parent individuals. Therefore, two individuals (strategies) will be obtained after the crossover, and each individual has a combination of some excellent characteristics of the parent. The mutation operation will act on each newly generated individual (offspring strategy) separately. Each individual generated after the crossover will be mutated independently, so a new individual will be generated after the mutation operation. In other words, each individual (strategy) has its own independent mutation result.
[0203] Furthermore, the step S4 specifically includes the following sub-steps:
[0204] S401. Re-simulate and test all newly generated upgrade strategy individuals and evaluate their fitness; repeat the crossover and mutation operation;
[0205] S402. When the fitness value of the upgrade strategy individual changes between multiple generations and is lower than the set threshold or the iteration number reaches the set threshold, the iteration is terminated;
[0206] S403. Output the individual with the highest fitness value in the current population as the final firmware upgrade strategy.
[0207] Specifically, the above-mentioned embodiment gradually optimizes the firmware upgrade strategy through a multi-generation evolutionary process. Each generation of individuals will undergo operations such as fitness evaluation, selection, crossover and mutation, so that in each generation, the winning strategy will be continuously inherited to the next generation. At the same time, new strategy variants are generated through crossover and mutation, so that the system can be optimized globally. The optimization of each generation of strategies moves towards a more efficient and stable firmware upgrade solution. This evolutionary process can automatically adjust the strategy according to the feedback from the system to improve the success rate and efficiency of the upgrade process. As the number of iterations increases, the firmware upgrade strategy will get closer and closer to the optimal solution, and finally the optimal firmware upgrade solution will be selected through fitness evaluation and applied to the actual upgrade process.
[0208] Further, for steps S5 and S6, after selecting the optimal firmware upgrade strategy, the system starts the actual firmware upgrade process. The server transmits the optimized firmware package to the pulp collector to ensure the integrity and security of the data. After the firmware transmission is completed, the pulp collector starts the BOOT part and initializes the firmware switching process. Through the partition exchange mechanism, the current firmware version and the new firmware version are switched. Partition exchange is a common firmware upgrade technology. It stores the new firmware in a spare partition (such as partition B) and then switches the system from the current firmware version (such as partition A) to the new version (such as partition B) to ensure that the normal operation of the system is not affected during the upgrade process. This switching process ensures that the system can smoothly transition to the new firmware and avoids the risk of system crash or failure to start during the upgrade process. In addition, after the firmware partition switching is completed, the pulp collector will perform a restart operation to load the new firmware program version. The restart operation is a key link in the firmware upgrade, which indicates whether the firmware is successfully installed and can run normally. If the new firmware can be successfully loaded, the system will continue to run the new firmware version to provide enhanced functions and performance. In order to ensure the high reliability of the upgrade process, when the system encounters a fault during restart (such as firmware incompatibility or loading failure), the incremental rollback mechanism will be automatically activated. The incremental rollback mechanism analyzes the cause of the failure and restores the firmware to the factory firmware version or the last successful firmware version. This rollback method is incremental, that is, only the failed part of the upgrade process is restored, rather than completely rolling back to the initial state, reducing the time and resource consumption of system recovery. Through this rollback mechanism, the system can minimize the impact caused by upgrade failure and ensure that the firmware upgrade process has high fault tolerance and reliability.
[0209] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A remote online upgrade method for pulp collecting machine firmware, characterized in that: The following steps are involved: S1. Regularly detect the firmware version of the pulp machine, and when a firmware version that needs to be upgraded is detected, trigger an upgrade request; and generating a set of initial firmware upgrade strategies, each strategy being represented in the form of a program tree, wherein the program tree includes firmware upgrade parameters and firmware upgrade operation parameters; S2. Conduct simulation tests on each initially generated firmware upgrade strategy to evaluate its performance in different network environments and device states, and select the parent individual based on the probability of fitness; S3. According to the crossover operation, the genetic recombination process of the organism is simulated, and the strategy trees of the two parent individuals are partially exchanged to generate a new upgrade strategy; And according to the mutation operation, new strategy variants are generated by modifying certain nodes in the program tree; S4. Continuously optimize the firmware upgrade strategy through multiple generations of evolution; when the iteration ends, select the firmware upgrade strategy with the highest fitness as the final firmware upgrade solution for the pulp collector; S5. The server transmits the upgraded firmware package to the pulp collecting machine. After the firmware transmission is completed, the pulp collecting machine starts the BOOT part and switches the firmware from the current firmware program version to the new firmware program version through the partition exchange mechanism; S6. The pulp collecting machine performs a restart operation and loads a new firmware program version; Wherein, in step S6, when the restart operation fails, the cause of the firmware failure is analyzed according to the incremental rollback mechanism, and the firmware is restored to the factory firmware program version or the last successful firmware program version; generating a set of initial firmware upgrade strategies specifically includes the following sub-steps: S101. The initial firmware upgrade strategy is represented by a state vector, wherein the elements in the state vector represent firmware upgrade parameters, which include data packet size, transmission rate, and upgrade timing, namely: ; Among them, the represents the state vector, i.e., the parameterized form of the firmware upgrade strategy represented by the program tree, They respectively represent the data packet size, transmission rate and upgrade timing parameters used for firmware upgrade; S102. By randomly selecting the operating parameters of the firmware upgrade from a predefined discrete set, a plurality of initial firmware upgrade strategies are formed to form an initial firmware upgrade strategy group as an initial population of genetic programming, namely: ; ; ; Among them, the Indicates the operating parameters for the packet size. represents the operating parameters for the transmission rate, the Indicates the operation parameters for the upgrade timing; The step S2 specifically includes the following sub-steps: S201. Each firmware upgrade strategy is tested in a simulated environment, which includes device status and network environment factors. The firmware simulation upgrade process is performed in different simulated environments. According to the transmission process from the old version to the new version of the firmware, the transmission time, upgrade success rate, and bandwidth utilization index data are recorded; S202 establishes a fitness function, the fitness function combines transmission time, success rate, bandwidth utilization, and evaluates each upgrade strategy; S203. Normalize the fitness of each upgrade strategy so that the sum of the fitness is 1, and convert it into a selection probability; S204. Selecting an upgrade strategy with a higher fitness as a parent individual through a roulette wheel selection method; The crossover operation specifically includes the following sub-steps: S3011. In the program tree of two upgrade strategy parent individuals, randomly select at least one intersection, the intersection being the strategy tree; S3012. Generate two new upgrade strategies through the crossover operation. The two new upgrade strategies inherit part of the features of the parent generation and become child individuals. The part of the features is the part of the strategy tree that has not been crossovered.
2. The remote online upgrade method of the pulp collecting machine firmware according to claim 1, characterized in that: In step S202, the fitness function is specifically: ; Among them, the Represents the fitness function of the i-th upgrade strategy individual, represents the transmission time of the i-th upgrade strategy individual, represents the upgrade success rate of the i-th upgrade strategy individual, represents the bandwidth utilization of the i-th upgrade strategy individual, , and They represent the indicator weights corresponding to transmission time, upgrade success rate, and bandwidth utilization respectively.
3. The remote online upgrade method of the pulp collecting machine firmware according to claim 2, characterized in that: In step S203, the specific process of normalization is expressed as follows: ; Among them, the represents the normalized fitness value of the i-th upgrade strategy individual, represents the fitness function of the jth upgrade strategy individual, n represents the total number of individuals in the population, and j represents the index of the number of individuals in the population.
4. The remote online upgrade method of the pulp collecting machine firmware according to claim 3, characterized in that: In step S203, the calculation process of the selection probability is as follows: ; Among them, the represents the probability of the i-th upgrade strategy individual being selected, Represents the normalized fitness value of the j-th upgrade strategy individual.
5. The remote online upgrade method of pulp collecting machine firmware according to claim 1, characterized in that: In step S204, the specific selection process of the roulette selection method is: the selection probabilities of all upgrade strategy individuals are accumulated to form an interval from 0 to 1, a value is randomly selected in the interval using a random number generator, and the corresponding upgrade strategy individual is selected by the random value.
6. The remote online upgrade method of the pulp collecting machine firmware according to claim 1, characterized in that: In step S3, the mutation operation specifically includes the following sub-steps: S3021. Randomly select a node from the offspring individuals generated after the crossover operation to mutate; S3022. Randomly modify the node value of the selected variation point, wherein the node value includes a firmware upgrade parameter and an operating parameter of the firmware upgrade; S3023. The mutated upgraded strategy individuals form new strategies as part of the next generation population.
7. The remote online upgrade method of the pulp collecting machine firmware according to claim 1, characterized in that: The step S4 specifically includes the following sub-steps: S401. Re-simulate and test all newly generated upgrade strategy individuals and evaluate their fitness; repeat the crossover and mutation operation; S402. When the fitness value of the upgrade strategy individual changes between multiple generations and is lower than the set threshold or the iteration number reaches the set threshold, the iteration is terminated; S403. Output the individual with the highest fitness value in the current population as the final firmware upgrade strategy.
Citation Information
Patent Citations
Firmware self-adaptive upgrading method, system and equipment
CN117539520A
OTA remote upgrading method for AGV
CN117692328A