Search

CN-121996546-A - Multi-version cyclic upgrading method and device for equipment, equipment and storage medium

CN121996546ACN 121996546 ACN121996546 ACN 121996546ACN-121996546-A

Abstract

The application discloses a device multi-version cyclic upgrading method, a device, equipment and a storage medium, and relates to the technical field of software upgrading inquiry, wherein the method comprises the steps of acquiring a target device set, a plurality of software upgrading versions and upgrading sequences of the plurality of software upgrading versions according to configuration of a pressure measurement task, and generating corresponding cyclic upgrading sequences according to the plurality of software upgrading versions and the upgrading sequences; and receiving state information returned by the target equipment after the upgrading instruction is completed, and executing the upgrading of the next software upgrading version according to the state information or stopping the current round of upgrading. By the mode, the software upgrading version is switched back and forth through high frequency, the stability and the reliability of an upgrading link under a limit scene are simulated, the testing coverage is improved, upgrading instructions are not required to be issued one by one manually, and the testing efficiency is improved.

Inventors

  • YIN DESHUAI
  • YANG XIAOQI
  • HUANG TAO
  • YIN FEI

Assignees

  • 青岛海尔科技有限公司
  • 海尔优家智能科技(北京)有限公司
  • 青岛海尔智能家电科技有限公司

Dates

Publication Date
20260508
Application Date
20251229

Claims (10)

  1. 1. A method for multi-version cyclic upgrade of a device, comprising: Acquiring a target device set, a plurality of software upgrading versions corresponding to the target device set and upgrading sequences of the plurality of software upgrading versions according to the configuration of the pressure measurement task, and generating corresponding cyclic upgrading sequences according to the plurality of software upgrading versions and the upgrading sequences; for each target device in the target device set, sequentially sending an upgrading instruction corresponding to a current software upgrading version to the target device according to the cyclic upgrading sequence; receiving state information returned by the target equipment after the upgrading instruction is completed, and executing the upgrading of the next software upgrading version according to the state information, or stopping the current round of upgrading; The cyclic upgrade sequence is used for executing version switching on the target equipment set for multiple times so as to simulate the pressure in a high-frequency cyclic scene.
  2. 2. The method of claim 1, wherein the performing an upgrade of a next software upgrade version or aborting a current round of upgrades according to the status information comprises: When the state information indicates that the upgrade is successful, an upgrade instruction corresponding to the next software upgrade version is issued based on the cyclic upgrade sequence until the last version of the cyclic upgrade sequence is successfully upgraded; Resetting the sequence pointer to the first version of the cyclic upgrading sequence and starting the next round of pressure measurement cycle until the preset pressure measurement stopping condition is met; when the state information indicates that the upgrading fails, suspending the subsequent upgrading instruction to issue and recording a failure event; And continuing to finish the pressure measurement of the residual cyclic upgrading sequence from the failed version after the fault is eliminated.
  3. 3. The method of claim 1, wherein prior to generating the corresponding cyclic upgrade sequence from the plurality of software upgrade versions and the upgrade order, the method further comprises: generating a task identifier corresponding to the pressure measurement task; And binding and storing the task identifier, the cyclic upgrading sequence and the device identifier of each target device in the target device set so as to establish a target mapping relation for indicating the corresponding relation between the task and the device.
  4. 4. The method of claim 3, wherein storing the task identification, the cyclic upgrade sequence, and the device identification of each target device in the set of target devices in a binding manner comprises: Storing the task identifier, the equipment identifier and the version identifier of the cyclic upgrading sequence by adopting a task-equipment-sequence three-level association structure to obtain the target mapping relation; The task identifier is associated with the equipment identifier, the equipment identifier is associated with the version identifier, and the version identifier is associated with state information returned by a corresponding upgrading process so as to support multi-dimensional inspection of the pressure measurement log.
  5. 5. The method of claim 4, wherein the receiving the status information returned by the target device after completion of the upgrade instruction, the method further comprises: Forming a version pair based on a source version number and a target version number in the state information; A historical pressure measurement upgrading log is called, and the historical pressure measurement upgrading log is queried to obtain the version pair, corresponding failure times and total upgrading times; And obtaining and storing compatibility scores according to the failure times and the total upgrading times, wherein the compatibility scores are used for sequencing a plurality of software upgrading versions in the next pressure testing task to obtain an adaptive cyclic upgrading sequence.
  6. 6. The method of claim 5, wherein the obtaining a compatibility score based on the number of failures and the total number of upgrades comprises: obtaining the recent failure times in a preset time period from the failure times, and obtaining the recent upgrading times in the preset time period from the total upgrading times; Determining a historical success rate according to the failure times and the total upgrading times, and determining a recent success rate according to the recent failure times and the recent upgrading times; and processing the historical success rate and the recent success rate through a weighting algorithm to obtain a compatibility score for reflecting the stability of the version under the pressure measurement environment.
  7. 7. The method of claim 6, wherein after processing the historical success rate and the recent success rate by a weighting algorithm to obtain a compatibility score, the method further comprises: determining the size relation between the compatibility score and a compatibility score threshold value; And when the compatibility score is smaller than the compatibility score threshold, the test priority of the version pair is advanced in the next round of pressure testing cycle so as to preferentially verify the stability of the low-compatibility version combination.
  8. 8. A device multi-version cyclic upgrade apparatus, the apparatus comprising: the determining module is used for acquiring a target device set, a plurality of software upgrading versions corresponding to the target device set and upgrading sequences of the plurality of software upgrading versions according to the configuration of the pressure measurement task, and generating corresponding cyclic upgrading sequences according to the plurality of software upgrading versions and the upgrading sequences; the sending module is used for sequentially sending upgrading instructions corresponding to the current software upgrading version to each target device in the target device set according to the cyclic upgrading sequence; The control module is used for receiving the state information returned by the target equipment after the upgrading instruction is completed, and executing the upgrading of the next software upgrading version according to the state information or stopping the current round of upgrading; The cyclic upgrade sequence is used for executing version switching on the target equipment set for multiple times so as to simulate the pressure in a high-frequency cyclic scene.
  9. 9. An electronic device comprising a processor and a memory communicatively coupled to the processor; The memory stores computer-executable instructions; The processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1 to 7.
  10. 10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are for implementing the device multi-version loop upgrade method of any one of claims 1 to 7.

Description

Multi-version cyclic upgrading method and device for equipment, equipment and storage medium Technical Field The application relates to the technical field of software upgrading query, in particular to a method, a device, equipment and a storage medium for circularly upgrading multiple versions of equipment. Background With explosive growth of the Internet of things and embedded equipment, remote firmware upgrading becomes normal. In the scenes of intelligent home, industrial sensing, internet of vehicles and the like, equipment must repair security holes, expand service functions or adapt to new protocols through frequent upgrading, and upgrading is evolved into a core link of the full life cycle management of the equipment. In an actual deployment, the device may need to be upgraded repeatedly between versions (e.g., version rollback, alternate upgrades) to verify the compatibility, stability, and reliability of the upgrade path. However, the existing testing means are difficult to simulate the complex multi-version cyclic upgrade scene, and in the testing of a large-scale equipment cluster, testers need to frequently and manually configure upgrade tasks, so that the testing efficiency is reduced. Disclosure of Invention The application provides a multi-version cyclic upgrading method, a device, equipment and a storage medium for equipment, which are used for solving the problems that the existing testing means are difficult to simulate the complex multi-version cyclic upgrading scene, and in the testing of a large-scale equipment cluster, testers need to frequently and manually configure upgrading tasks, so that the testing efficiency is low. In a first aspect, the present application provides a method for circularly upgrading multiple versions of a device, including: Acquiring a target device set, a plurality of software upgrading versions corresponding to the target device set and upgrading sequences of the plurality of software upgrading versions according to the configuration of the pressure measurement task, and generating corresponding cyclic upgrading sequences according to the plurality of software upgrading versions and the upgrading sequences; for each target device in the target device set, sequentially sending an upgrading instruction corresponding to a current software upgrading version to the target device according to the cyclic upgrading sequence; receiving state information returned by the target equipment after the upgrading instruction is completed, and executing the upgrading of the next software upgrading version according to the state information, or stopping the current round of upgrading; The cyclic upgrade sequence is used for executing version switching on the target equipment set for multiple times so as to simulate the pressure in a high-frequency cyclic scene. In a possible implementation manner, the performing the upgrade of the next software upgrade version according to the status information or suspending the upgrade of the current round includes: When the state information indicates that the upgrade is successful, an upgrade instruction corresponding to the next software upgrade version is issued based on the cyclic upgrade sequence until the last version of the cyclic upgrade sequence is successfully upgraded; Resetting the sequence pointer to the first version of the cyclic upgrading sequence and starting the next round of pressure measurement cycle until the preset pressure measurement stopping condition is met; when the state information indicates that the upgrading fails, suspending the subsequent upgrading instruction to issue and recording a failure event; And continuing to finish the pressure measurement of the residual cyclic upgrading sequence from the failed version after the fault is eliminated. In a possible implementation manner, before the generating the corresponding cyclic upgrade sequence according to the plurality of software upgrade versions and the upgrade order, the method further includes: generating a task identifier corresponding to the pressure measurement task; And binding and storing the task identifier, the cyclic upgrading sequence and the device identifier of each target device in the target device set so as to establish a target mapping relation for indicating the corresponding relation between the task and the device. In a possible implementation manner, the storing the task identifier, the cyclic upgrade sequence, and the device identifier of each target device in the target device set in a binding manner includes: Storing the task identifier, the equipment identifier and the version identifier of the cyclic upgrading sequence by adopting a task-equipment-sequence three-level association structure to obtain the target mapping relation; The task identifier is associated with the equipment identifier, the equipment identifier is associated with the version identifier, and the version identifier is associated with state information returned