CN114675902B - Management method and management device for software version based on embedded equipment - Google Patents

Management method and management device for software version based on embedded equipment Download PDF

Info

Publication number
CN114675902B
CN114675902B CN202210242824.4A CN202210242824A CN114675902B CN 114675902 B CN114675902 B CN 114675902B CN 202210242824 A CN202210242824 A CN 202210242824A CN 114675902 B CN114675902 B CN 114675902B
Authority
CN
China
Prior art keywords
software version
version
identifiers
target
image files
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210242824.4A
Other languages
Chinese (zh)
Other versions
CN114675902A (en
Inventor
刘金栋
周建豪
张振京
孙彦森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Weichai Power Co Ltd
Weifang Weichai Power Technology Co Ltd
Original Assignee
Weichai Power Co Ltd
Weifang Weichai Power Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Weichai Power Co Ltd, Weifang Weichai Power Technology Co Ltd filed Critical Weichai Power Co Ltd
Priority to CN202210242824.4A priority Critical patent/CN114675902B/en
Publication of CN114675902A publication Critical patent/CN114675902A/en
Application granted granted Critical
Publication of CN114675902B publication Critical patent/CN114675902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44536Selecting among different versions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a management method and a management device of a software version based on embedded equipment, wherein the management method comprises the following steps: dividing a storage area of the embedded equipment into a plurality of copy storage areas, wherein a plurality of target image files are stored in one copy storage area, part of the target image files are updated image files or target image files in other copy storage areas, the versions of the target image files in any two copy storage areas are different, and a plurality of target image files in one copy storage area form a software version; and carrying out preset management on the software versions according to version control information corresponding to each software version so as to enable the embedded equipment to be started according to the software versions after preset management, wherein the version control information at least comprises version control keywords, and the preset management at least comprises: the method solves the problem of high resource occupancy rate of the software version in the upgrading process in the prior art.

Description

Management method and management device for software version based on embedded equipment
Technical Field
The present application relates to the field of software version management, and in particular, to a method and apparatus for managing a software version based on an embedded device, a computer readable storage medium, a processor, and an electronic device.
Background
For a system or device, only one complete software version is available to function properly, and one complete software version contains several established image files. For upgrading a software version, only one or a few image files need to be updated at a time, and the image files corresponding to the current version can be used for the version image which is not updated.
In the prior art, the software version is generally updated by updating the software version containing all the updated image files. For upgrading the software version containing all the upgraded image files, the upgrading speed is low, the resource occupancy rate is high, and the original edition can not be returned after the upgrading.
The above information disclosed in the background section is only for enhancement of understanding of the background art from the technology described herein and, therefore, may contain some information that does not form the prior art that is already known in the country to a person of ordinary skill in the art.
Disclosure of Invention
The application mainly aims to provide a management method, a management device, a computer readable storage medium, a processor and electronic equipment for software versions based on embedded equipment, so as to solve the problem that the software versions in the prior art have higher resource occupancy rate in the upgrading process.
According to an aspect of the embodiment of the present application, there is provided a method for managing a software version based on an embedded device, including: dividing a storage area of the embedded equipment into a plurality of copy storage areas, wherein a plurality of target image files are stored in one copy storage area, part of the target image files are updated image files or the target image files in other copy storage areas, the versions of the target image files in any two copy storage areas are different, and a plurality of target image files in one copy storage area form a software version; performing predetermined management on the software version according to version control information corresponding to each software version, so that the embedded device is started according to the software version after the predetermined management, wherein the version control information at least comprises a version control keyword, and the predetermined management at least comprises: software version upgrade and software version selection.
Optionally, the version control keyword includes a primary and standby identifier, an activation identifier, an operation identifier and an availability identifier, and performs predetermined management on the software version according to version control information corresponding to each software version, so that the embedded device is started according to the software version after the predetermined management, including: controlling the embedded equipment to read the version control keyword of a target software version, and determining whether the activation identifier corresponding to the target software version is an identifier representing that activation is required or not according to the version control keyword, wherein the target software version is one of a plurality of software versions; activating the target software version and controlling the embedded equipment to upgrade the software version under the condition that the activation identifier is an identifier representing that the activation is required; and under the condition that the activation identifier is an identifier which is used for representing non-activation, determining whether the embedded device is started with the target software version according to the version control key word of the target software version.
Optionally, in the case that the activation identifier is an identifier that characterizes activation, activating the target software version and controlling the embedded device to perform the software version upgrade, the management method further includes: updating the primary and standby identifiers in the version control key words of the target software version to be identifiers representing primary use, updating the activation identifiers to be identifiers representing non-activation, updating the running identifiers to be identifiers which are already running and updating the availability identifiers to be identifiers representing non-availability.
Optionally, in the case that the activation identifier is an identifier that characterizes deactivation, determining, according to the version control key of the target software version, whether the embedded device is started with the target software version includes: determining whether the version control key of the target software version satisfies a first predetermined condition, the first predetermined condition comprising: the main and standby identifiers are identifiers for representing the main use, the activating identifiers are identifiers for representing the non-activating identifiers, the running identifiers are identifiers for representing the running and the availability identifiers are identifiers for representing the unavailability; controlling the embedded device to select the software version under the condition that the version control keyword of the target software version meets the first preset condition; determining whether the embedded device is started with the target software version according to whether the version control keyword of the target software version meets a second preset condition or not under the condition that the version control keyword of the target software version does not meet the first preset condition, wherein the second preset condition comprises: the primary and standby identifiers are identifiers for representing the primary, the active identifiers are identifiers for representing the inactive identifiers, the running identifiers are identifiers for representing the running, and the availability identifiers are identifiers for representing the availability.
Optionally, after controlling the embedded device to perform the software version selection, in a case where the version control keyword of the target software version satisfies the first predetermined condition, the management method further includes: updating the version control key of the target software version as: the primary and standby identifiers are updated to represent standby identifiers, the active identifiers are updated to represent inactive identifiers, the running identifiers are updated to represent already running identifiers, and the availability identifiers are updated to represent unavailable identifiers.
Optionally, determining whether the embedded device is started with the target software version according to whether the version control keyword of the target software version meets a second predetermined condition, including: controlling the embedded device to start according to the target software version under the condition that the version control keyword meets the second preset condition; and controlling the embedded device to select the software version under the condition that the version control key does not meet the second preset condition.
Optionally, the version control information further includes a mirror storage pointer, and controlling the embedded device to be started according to the target software version when the version control key meets the second predetermined condition includes: determining the address of the copy storage area corresponding to the target software version according to the mirror image storage area pointer; and calling a plurality of target image files corresponding to the copy storage area according to the addresses of the copy storage area, so that the embedded equipment is started according to the corresponding target software version.
Optionally, in the case that the activation identifier is an identifier that characterizes activation, activating the target software version and controlling the embedded device to perform the software version upgrade, the management method further includes: and updating the main and standby identifications corresponding to other software versions to be identifications representing standby and the active identifications to be identifications representing non-activation, wherein the other software versions are other software versions except the target software version.
Optionally, the storage area of the embedded device is divided into a plurality of copy storage areas, where one copy storage area stores a plurality of target image files, and a part of the target image files are updated image files or are the target image files in other copy storage areas, and the method includes: determining whether the current copy storage area needs to copy the target image files of other copy storage areas; and when the target image files of other copy storage areas are determined to need to be copied, adding the copied target image files to the current copy storage area.
Optionally, one of the copy storage areas corresponds to a version information file, the version information file includes a verification identifier, the version control key includes an activation identifier, and before the software version is scheduled to be managed according to version control information corresponding to each software version, so that the embedded device starts according to the software version after scheduled management, the management method further includes: and determining whether a plurality of target image files in a target software version are damaged according to the verification identifiers, and setting the corresponding activation identifiers of the target software version to represent identifiers to be activated under the condition that the target image files are not damaged, wherein the target software version is one software version read by the embedded equipment.
According to another aspect of the embodiment of the present invention, there is also provided a device for managing a software version based on an embedded device, including: the dividing unit is used for dividing the storage area of the embedded equipment into a plurality of copy storage areas, wherein a plurality of target image files are stored in one copy storage area, part of the target image files are updated image files or the target image files in other copy storage areas, the versions of the target image files in any two copy storage areas are different, and a plurality of target image files in one copy storage area form a software version; the management unit is configured to perform predetermined management on the software versions according to version control information corresponding to each software version, so that the embedded device is started according to the software version after the predetermined management, where the version control information at least includes a version control keyword, and the predetermined management at least includes: software version upgrade and software version selection.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium including a stored program, wherein the program performs any one of the management methods.
According to still another aspect of the embodiment of the present invention, there is further provided a processor, where the processor is configured to execute a program, and when the program runs, any one of the management methods is executed.
According to an aspect of an embodiment of the present invention, there is also provided an electronic device including: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any one of the methods of management.
In the method for managing software versions based on embedded equipment, the storage area of the embedded equipment is divided into a plurality of copy storage areas, wherein one copy storage area stores a plurality of target image files, part of the plurality of target image files can be updated image files and can also be target image files in other copy storage areas, and the plurality of copy storage areas form a plurality of software versions with different software versions because the target image files in any two copy storage areas are different, and then the software versions are scheduled and managed according to version control information corresponding to each software version, so that the embedded equipment is started according to the scheduled and managed software versions. Compared with the prior art, in the scheme, when all image files forming one software version are upgraded and version rollback cannot be carried out after the upgrade, part of image files in a plurality of target image files can be the upgraded image files and can also be the target image files corresponding to other copy storage areas in one copy storage area of the scheme, that is, the scheme realizes that the maximum number of software versions is obtained under the condition that fewer image files or image files are not upgraded, and in the process of carrying out the software version upgrade, as the corresponding software version is the upgraded image files or the image files not to be upgraded, the resource occupation rate of the embedded device in the process of upgrading is lower and the upgrading speed is higher, so that the problem that the resource occupation rate of the software version in the process of upgrading in the prior art is higher is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
FIG. 1 illustrates a flow chart of a method of managing software versions of an embedded device in accordance with one embodiment of the present application;
fig. 2 shows a schematic structural diagram of a management apparatus for software version based on an embedded device according to an embodiment of the present application;
fig. 3 shows a flow chart of a method of managing software versions of an embedded device in accordance with a further embodiment of the present application.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As described in the background art, in order to solve the above problem, in an exemplary embodiment of the present application, a method, an apparatus, a computer readable storage medium, a processor and an electronic device for managing a software version based on an embedded device are provided.
According to an embodiment of the application, a method for managing a software version based on embedded equipment is provided.
Fig. 1 is a flowchart of a method of managing software versions based on an embedded device according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, dividing a storage area of the embedded device into a plurality of copy storage areas, wherein a plurality of target image files are stored in one copy storage area, and part of the target image files are updated image files or the target image files in other copy storage areas, the versions of the target image files in any two copy storage areas are different, and a software version is formed by the plurality of target image files in one copy storage area;
step S102, performing scheduled management on the software version according to version control information corresponding to each software version, so that the embedded device is started according to the software version after scheduled management, wherein the version control information at least comprises a version control keyword, and the scheduled management at least comprises: software version upgrade and software version selection.
In the method for managing the software version based on the embedded device, the storage area of the embedded device is divided into the plurality of copy storage areas, wherein one copy storage area stores a plurality of target image files, part of the plurality of target image files can be updated image files or target image files in other copy storage areas, the plurality of copy storage areas form a plurality of software versions with different software versions because the target image files in any two copy storage areas are different, and then the software version is scheduled and managed according to version control information corresponding to each software version, so that the embedded device is started according to the software version after scheduled and managed. Compared with the prior art, in the scheme, when all image files forming one software version are upgraded and version rollback cannot be carried out after the upgrade, part of image files in a plurality of target image files can be the upgraded image files and can also be the target image files corresponding to other copy storage areas in one copy storage area of the scheme, that is, the scheme realizes that the maximum number of software versions is obtained under the condition that fewer image files or image files are not upgraded, and in the process of carrying out the software version upgrade, as the corresponding software version is the fewer image files or the image files not to be upgraded, the resource occupation rate of the embedded device in the process of upgrading is lower and the upgrading speed is higher, so that the problem that the resource occupation rate of the software version in the process of upgrading in the prior art is higher is solved.
Specifically, in the actual application process, the plurality of target image files in one copy storage area may also be all updated image files. For example, as shown in table one, m copy storage areas are provided in the above embedded device, and n target image files are provided in each copy storage area, for example, in the first copy storage area, n target image files are updated image files, and n target image files in the first copy storage area may form a complete software version; such as a second copy storage area, which is updated with the removal target image file 3 (A 13 ) All but the mirror image files, so the second copy storage area can use the target mirror image file 3 in the first copy storage area to form a complete software version; if the third copy storage area is only upgraded to target image file 2 (A 32 ) So the third copy storage area can use other targets in the second copy storage areaMirror image file (i.e. except A 32 Other than the target image file) to form a complete software version, such as a fourth copy storage area, a plurality of target image files in the first copy storage area, the second copy storage area, and the third copy storage area may be combined to form a new software version. Through the multiple copy storage areas in the scheme, a management matrix of the target image file is formed, so that the target image file is updated as required, and in addition, a new version can be generated without updating the image through free combination of the version images of the current storage areas. In the scheme, if a certain copy storage area is full, the target image file with the earliest time can be deleted, so that the cyclic utilization of the storage space is realized.
TABLE 1
In particular, the version control information may further include a master version number, where the master version number may be used to uniquely identify a complete software version, so that multiple software versions may be further managed more conveniently.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
In one embodiment of the present application, the version control key includes a primary and standby identifier, an activation identifier, an operation identifier, and an availability identifier, and performs predetermined management on the software version according to version control information corresponding to each software version, so that the embedded device is started according to the software version after the predetermined management, including: controlling the embedded device to read the version control keyword of a target software version, and determining whether the activation identifier corresponding to the target software version is an identifier representing that activation is required according to the version control keyword, wherein the target software version is one of a plurality of software versions; activating the target software version and controlling the embedded equipment to upgrade the software version under the condition that the activation identifier is an identifier representing that the activation is required; and under the condition that the activation identifier is an identifier for representing non-activation, determining whether the embedded device is started with the target software version according to the version control key word of the target software version. In this embodiment, whether the target software version needs to be activated is determined according to the activation identifier in the read version control keyword of the target software version, and the target software version needs to be activated under the condition that the activation identifier represents non-activation, so that the embedded device can read the target software version with a newer version when being powered on and is started with the newer target software version, that is, the software version of the embedded device is updated, and under the condition that the activation identifier represents non-activation, that is, the target software version does not need to be activated, whether the embedded device is started with the target software version is determined according to the version control keyword later, and further, the embedded device is ensured to be started with one software version after being powered on, and further, the embedded device is ensured to be capable of operating normally.
In a specific embodiment of the present application, the primary and backup identifier (usedshare) may be: 1 represents the primary, 0 represents the standby, and the corresponding target software version is selected according to the standby when the system or the device is started, wherein one and only one primary version exists in a plurality of software versions; the activation identification (setUse) may be: 1 represents that activation is needed, 0 represents that the embedded device is not activated, when the embedded device is powered on again, the software version needed to be activated is selected as the main software version, and after the embedded device is activated, the main and standby identifiers are updated to be the identifiers representing the main software version; the running identifier (hasRun) may be: 1 represents that it is operated, 0 represents that it is not operated; availability identification (canRun) may be: 1 indicates available and 0 indicates unavailable.
In the actual application process, the downloading of the software version, the activation/selection of the software version, the generation of the new software version, the normal running of the software version, the abnormality of the software version and the like can be realized by the version information keywords corresponding to the software version, which are specifically shown in a second table, wherein X represents that the version control keywords are not required, and can be specifically 0 or 1.
TABLE 2
Specifically, after the embedded device is powered on, the activation identifier can be preferentially selected to characterize an unactivated software version, and each new software version needs to be activated to be used after being downloaded, so that the embedded device can select the newly downloaded software version to perform trial operation after being powered on, and the embedded device can be controlled to be started with the newer software version.
In order to manage the target software version more conveniently, in another embodiment of the present application, in the case that the activation identifier is an identifier that characterizes activation, the method further includes, after activating the target software version and controlling the embedded device to upgrade the software version: and updating the main and standby identifiers in the version control key words of the target software version to be identifiers for representing main use, the activation identifiers to be identifiers for representing non-activation, the running identifiers to be identifiers which are already running and the availability identifiers to be identifiers for representing non-availability.
Specifically, after the target software version is activated, the main and standby identifiers in the version control keywords of the target software version are updated to be the identifiers for representing the main use, the subsequent embedded device can preferentially select the main and standby identifiers to be the software version for starting, and further the embedded device can be ensured to be started with a newer software version. In addition, after the target software version is activated, because the target software version is successfully started or is not successfully started, the running identifier is updated to the running identifier in advance, the usability identifier is updated to the identifier for characterizing unavailability in the above embodiment, so that the software version management is further ensured to be reasonable, and the usability identifier can be updated to the identifier for characterizing availability after the embedded device is successfully started according to the target software version.
In another embodiment of the present application, in a case where the activation flag is a flag indicating inactivation, determining whether the embedded device is started with the target software version according to the version control key of the target software version includes: determining whether the version control key of the target software version satisfies a first predetermined condition, the first predetermined condition comprising: the main and standby identifiers are identifiers for representing the main use, the activating identifiers are identifiers for representing the non-activating identifiers, the running identifiers are identifiers for representing the running, and the availability identifiers are identifiers for representing the unavailability; controlling the embedded device to select the software version when the version control keyword of the target software version meets the first preset condition; determining whether the embedded device is started with the target software version according to whether the version control keyword of the target software version meets a second preset condition when the version control keyword of the target software version does not meet the first preset condition, wherein the second preset condition comprises: the primary and standby identifiers are identifiers for representing the primary use, the active identifiers are identifiers for representing the inactive identifiers, the running identifiers are identifiers for representing the running and the availability identifiers are identifiers for representing the availability. In this embodiment, in the case that the activation identifier is an identifier indicating that activation is not performed, that is, there is no newly downloaded software version, in this case, it is necessary to determine whether the target software version is executable, that is, whether the version control key of the target software version satisfies the first predetermined condition may be determined, and since the availability identifier in the first predetermined condition is an identifier indicating that activation is not performed, in the case that the version control key of the target software version satisfies the first predetermined condition, the embedded device is controlled to continue software version selection, and in the case that the version control key of the target software version does not satisfy the first predetermined condition, whether the embedded device performs software version selection is determined according to the second predetermined condition, so that whether the embedded device can be started with the target software version is further determined more quickly and accurately.
Specifically, in the actual application process, the usability identifier in the first predetermined condition is an identifier indicating unavailability, that is, in the case that the first predetermined condition is met, the embedded device is controlled to perform software version selection, that is, reselect an executable software version, and the process of performing software version selection can be also understood as a process of performing software version rollback.
Since the embedded device will preferably select the active identifier as the inactive target software version after powering on, and if there is no target software version to be activated, the embedded device will preferably select the active identifier as the target software version of the active identifier, and since the availability identifier in the first predetermined condition is the unavailable identifier, in order to avoid the embedded device from repeatedly reading the target software version, in still another embodiment of the present application, after controlling the embedded device to perform the software version selection if the version control key of the target software version meets the first predetermined condition, the management method further includes: updating the version control key of the target software version as follows: the primary and standby identifiers are updated to represent standby identifiers, the active identifiers are updated to represent inactive identifiers, the running identifiers are updated to represent running identifiers, and the availability identifiers are updated to represent unavailable identifiers.
In one embodiment of the present application, determining whether the embedded device is started with the target software version according to whether the version control key of the target software version satisfies a second predetermined condition includes: controlling the embedded device to start according to the target software version under the condition that the version control keyword meets the second preset condition; and controlling the embedded device to select the software version when the version control key does not meet the second preset condition. In this embodiment, since the availability identifier in the second predetermined condition is an identifier that characterizes availability, the embedded device is controlled to start according to the target software version if the version control key of the target software version satisfies the second predetermined condition, and the embedded device is controlled to perform software version selection if the second predetermined condition is not satisfied, thereby further ensuring that whether to start with the target software version can be determined more quickly and accurately.
In order to control the embedded device to start up with the target software version more conveniently, in another embodiment of the present application, the version control information further includes a mirror storage pointer, and controlling the embedded device to start up according to the target software version when the version control key meets the second predetermined condition includes: determining the address of the copy storage area corresponding to the target software version according to the mirror image storage area pointer; and calling a plurality of target image files corresponding to the copy storage area according to the addresses of the copy storage area, so that the embedded equipment is started according to the corresponding target software version.
In another embodiment of the present application, when the activation identifier is an identifier that characterizes activation, the method further includes, after activating the target software version and controlling the embedded device to upgrade the software version,: and updating the main and standby identifications corresponding to other software versions to be identifications representing standby and updating the active identifications to be identifications representing non-activation, wherein the other software versions are other software versions except the target software version. In this embodiment, since the activation identifier of the version control keyword of the target software version is an identifier representing that activation is required, the embedded device activates the target software version and controls the embedded device to start with the target software version, in this case, the active and standby identifiers of other software versions except the target software version can be updated to be identifiers representing standby, so that the embedded device is prevented from reading other software versions, and further, management of multiple software versions can be reasonably ensured.
In order to further obtain the maximized number of software versions and further implement on-demand upgrade of image files, in still another embodiment of the present application, the storage area of the embedded device is divided into a plurality of copy storage areas, where a plurality of target image files are stored in one of the copy storage areas, and a portion of the target image files are upgraded image files or are the target image files in other of the copy storage areas, including: determining whether the current copy storage area needs to copy the target image files of other copy storage areas; and when the target image files of other copy storage areas are determined to need to be copied, adding the copied target image files into the current copy storage area.
In particular, in the application, in one copy storage area, part of the plurality of target image files can be updated image files and can also be target image files in other copy storage areas, so that in one copy storage area, if a software version needs to be formed by combining the target image files in other copy storage areas, the target image files in other copy storage areas can be copied to be placed in the copy storage area of the copy storage area so as to form a new software version, the maximization of the number of the software versions is further ensured, and because the target image files in other software versions can be updated software versions, resources are further saved by a copying method, and the on-demand updating of the image files is further realized.
In order to further ensure that the embedded device can be started with a newer software version after power-on, in one embodiment of the present application, one of the copy storage areas corresponds to a version information file, the version information file includes a verification identifier, the version control key includes an activation identifier, and the software version is subjected to predetermined management according to version control information corresponding to each of the software versions, so that before the embedded device is started according to the software version after the predetermined management, the management method further includes: and determining whether a plurality of target image files in a target software version are damaged according to the verification identifiers, and setting the corresponding activation identifiers of the target software version to represent the identifiers to be activated under the condition that the target image files are not damaged, wherein the target software version is one of the software versions read by the embedded device, and the subsequent embedded device can preferentially select the activation identifier to represent the target software version to be activated after power-on.
Specifically, in the above embodiment, if one of the plurality of target image files forming one target software version is damaged, the target software version cannot complete activation, if all of the plurality of target image files forming one target software version are not damaged, the target software version can complete activation, then the activation identifier in the version control key of the target software version under this condition is set to the identifier representing the need for activation, and after the subsequent embedded device is powered on, the target software version can be read preferentially according to the activation identifier as the identifier representing the need for activation.
Specifically, in the scheme, before the software version of the embedded device is scheduled to be managed, the version information file of each software version can be manufactured, so that the software version can be managed more conveniently, and for the version information file corresponding to one software version, the version information file can include the following information: the serial number of the target image file, the identification of the target image file, the version number of the target image file, the file name of the eyepiece image file, the file size of the target image file and the checksum, wherein the serial number of the target image file can be 1,2, … and n (shown in the table one); the identification of the target image file can be information such as the purpose, type and the like of the image file; the version number of the target image file is used for representing the version of the image file, such as V1.0, V2.0 and the like; the checksum is used for judging whether the updated target image file is damaged, and for a complete software version, if the damaged target image file exists in the software version, the software version cannot be activated.
The embodiment of the application also provides a device for managing the software version based on the embedded equipment, and the device for managing the software version based on the embedded equipment can be used for executing the method for managing the software version based on the embedded equipment. The following describes a management device based on a software version of an embedded device provided by an embodiment of the present application.
Fig. 2 is a schematic diagram of an embedded device-based software version management apparatus according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:
a dividing unit 10, configured to divide a storage area of the embedded device into a plurality of copy storage areas, where one of the copy storage areas stores a plurality of target image files, and a portion of the target image files are updated image files or are the target image files in other copy storage areas, versions of the target image files in any two of the copy storage areas are different, and a plurality of the target image files in one of the copy storage areas form a software version;
a management unit 20, configured to perform predetermined management on the software versions according to version control information corresponding to each of the software versions, so that the embedded device is started according to the software versions after the predetermined management, where the version control information includes at least a version control key, and the predetermined management includes at least: software version upgrade and software version selection.
In the above-mentioned management device based on software version of embedded equipment, the dividing unit is configured to divide the storage area of the embedded equipment into multiple copy storage areas, where one of the copy storage areas stores multiple target image files, and a portion of the target image files are updated image files or are the target image files in other copy storage areas, versions of the target image files in any two of the copy storage areas are different, and multiple target image files in one of the copy storage areas form a software version; the management unit is configured to perform predetermined management on the software versions according to version control information corresponding to each software version, so that the embedded device is started according to the software version after the predetermined management, where the version control information at least includes a version control keyword, and the predetermined management at least includes: software version upgrade and software version selection. Compared with the prior art, in the scheme, when all image files forming one software version are upgraded and version rollback cannot be carried out after the upgrade, part of image files in a plurality of target image files can be the upgraded image files and can also be the target image files corresponding to other copy storage areas in one copy storage area of the scheme, that is, the scheme realizes that the maximum number of software versions is obtained under the condition that fewer image files or image files are not upgraded, and in the process of carrying out the software version upgrade, as the corresponding software version is the fewer image files or the image files not to be upgraded, the resource occupation rate of the embedded device in the process of upgrading is lower and the upgrading speed is higher, so that the problem that the resource occupation rate of the software version in the process of upgrading in the prior art is higher is solved.
Specifically, in the actual application process, the plurality of target image files in one copy storage area may also be all updated image files. For example, as shown in table one, the embedded device has m copy storage areas, each copy storage area has n target image files, for example, in the first copy storage area, the n target image files are updated image files, and the n target image files in the first copy storage areaThe target image file can form a complete software version; such as a second copy storage area, which is updated with the removal target image file 3 (A 13 ) All but the mirror image files, so the second copy storage area can use the target mirror image file 3 in the first copy storage area to form a complete software version; if the third copy storage area is only upgraded to target image file 2 (A 32 ) So the third copy storage area can use other target image files in the second copy storage area (i.e., except a 32 Other than the target image file) to form a complete software version, such as a fourth copy storage area, a plurality of target image files in the first copy storage area, the second copy storage area, and the third copy storage area may be combined to form a new software version. Through the multiple copy storage areas in the scheme, a management matrix of the target image file is formed, so that the target image file is updated as required, and in addition, a new version can be generated without updating the image through free combination of the version images of the current storage areas. In the scheme, if a certain copy storage area is full, the target image file with the earliest time can be deleted, so that the cyclic utilization of the storage space is realized.
In particular, the version control information may further include a master version number, where the master version number may be used to uniquely identify a complete software version, so that multiple software versions may be further managed more conveniently.
In one embodiment of the present application, the version control key includes a primary and a standby identifier, an activation identifier, an operation identifier, and an availability identifier, and the management unit includes a control module, an activation module, and a first determination module, where the control module is configured to control the embedded device to read the version control key of a target software version, and determine, according to the version control key, whether the activation identifier corresponding to the target software version is an identifier representing that activation is required, and the target software version is one of a plurality of software versions; the activation module is used for activating the target software version and controlling the embedded device to upgrade the software version under the condition that the activation identifier is an identifier representing that the activation is required; the first determining module is configured to determine, according to the version control key of the target software version, whether the embedded device is started with the target software version, if the activation identifier is an identifier indicating that activation is not performed. In this embodiment, whether the target software version needs to be activated is determined according to the activation identifier in the read version control keyword of the target software version, and the target software version needs to be activated under the condition that the activation identifier represents non-activation, so that the embedded device can read the target software version with a newer version when being powered on and is started with the newer target software version, that is, the software version of the embedded device is updated, and under the condition that the activation identifier represents non-activation, that is, the target software version does not need to be activated, whether the embedded device is started with the target software version is determined according to the version control keyword later, and further, the embedded device is ensured to be started with one software version after being powered on, and further, the embedded device is ensured to be capable of operating normally.
In a specific embodiment of the present application, the primary and backup identifier (usedshare) may be: 1 represents the primary, 0 represents the standby, and the corresponding target software version is selected according to the standby when the system or the device is started, wherein one and only one primary version exists in a plurality of software versions; the activation identification (setUse) may be: 1 represents that activation is needed, 0 represents that the embedded device is not activated, when the embedded device is powered on again, the software version needed to be activated is selected as the main software version, and after the embedded device is activated, the main and standby identifiers are updated to be the identifiers representing the main software version; the running identifier (hasRun) may be: 1 represents that it is operated, 0 represents that it is not operated; availability identification (canRun) may be: 1 indicates available and 0 indicates unavailable.
In the actual application process, the downloading of the software version, the activation/selection of the software version, the generation of the new software version, the normal running of the software version, the abnormality of the software version and the like can be realized by the version information keywords corresponding to the software version, which are specifically shown in a second table, wherein X represents that the version control keywords are not required, and can be specifically 0 or 1.
Specifically, after the embedded device is powered on, the activation identifier can be preferentially selected to characterize an unactivated software version, and each new software version needs to be activated to be used after being downloaded, so that the embedded device can select the newly downloaded software version to perform trial operation after being powered on, and the embedded device can be controlled to be started with the newer software version.
In order to manage the target software version more conveniently, in another embodiment of the present application, the management apparatus further includes a first updating unit, configured to activate the target software version and control the embedded device to update the primary and backup identifiers in the version control key of the target software version to an identifier for characterizing the primary use, to an identifier for characterizing the inactive use, to an identifier for operating the device, and to update the availability identifier to an identifier for characterizing the unavailable use after activating the target software version and controlling the embedded device to update the version control key of the target software version to the software version after the activation identifier is the identifier for characterizing the active use.
Specifically, after the target software version is activated, the main and standby identifiers in the version control keywords of the target software version are updated to be the identifiers for representing the main use, the subsequent embedded device can preferentially select the main and standby identifiers to be the software version for starting, and further the embedded device can be ensured to be started with a newer software version. In addition, after the target software version is activated, because the target software version is successfully started or is not successfully started, the running identifier is updated to the running identifier in advance, the usability identifier is updated to the identifier for characterizing unavailability in the above embodiment, so that the software version management is further ensured to be reasonable, and the usability identifier can be updated to the identifier for characterizing availability after the embedded device is successfully started according to the target software version.
In another embodiment of the present application, the first determining module includes a first determining sub-module, a first control sub-module, and a second determining sub-module, where the first determining sub-module is configured to determine whether the version control key of the target software version meets a first predetermined condition, and the first predetermined condition includes: the main and standby identifiers are identifiers for representing the main use, the activating identifiers are identifiers for representing the non-activating identifiers, the running identifiers are identifiers for representing the running, and the availability identifiers are identifiers for representing the unavailability; the first control submodule is used for controlling the embedded device to select the software version when the version control keyword of the target software version meets the first preset condition; the second determining submodule is configured to determine whether the embedded device is started with the target software version according to whether the version control keyword of the target software version meets a second predetermined condition if the version control keyword of the target software version does not meet the first predetermined condition, where the second predetermined condition includes: the primary and standby identifiers are identifiers for representing the primary use, the active identifiers are identifiers for representing the inactive identifiers, the running identifiers are identifiers for representing the running and the availability identifiers are identifiers for representing the availability. In this embodiment, in the case that the activation identifier is an identifier indicating that activation is not performed, that is, there is no newly downloaded software version, in this case, it is necessary to determine whether the target software version is executable, that is, whether the version control key of the target software version satisfies the first predetermined condition may be determined, and since the availability identifier in the first predetermined condition is an identifier indicating that activation is not performed, in the case that the version control key of the target software version satisfies the first predetermined condition, the embedded device is controlled to continue software version selection, and in the case that the version control key of the target software version does not satisfy the first predetermined condition, whether the embedded device performs software version selection is determined according to the second predetermined condition, so that whether the embedded device can be started with the target software version is further determined more quickly and accurately.
Specifically, in the actual application process, the usability identifier in the first predetermined condition is an identifier indicating unavailability, that is, in the case that the first predetermined condition is met, the embedded device is controlled to perform software version selection, that is, reselect an executable software version, and the process of performing software version selection can be also understood as a process of performing software version rollback.
Since the embedded device will preferably select the active identifier as representing the inactive target software version after powering on, and if there is no target software version to be activated, the embedded device will preferably select the active identifier as representing the active target software version, and since the availability identifier in the first predetermined condition is the unavailable identifier, in order to avoid the embedded device from repeatedly reading the target software version, in a further embodiment of the present application, the management method further includes a second updating unit, configured to update the version control key of the target software version after controlling the embedded device to select the software version if the version control key of the target software version meets the first predetermined condition: the primary and standby identifiers are updated to represent standby identifiers, the active identifiers are updated to represent inactive identifiers, the running identifiers are updated to represent running identifiers, and the availability identifiers are updated to represent unavailable identifiers.
In one embodiment of the present application, the second determining submodule includes a second control submodule and a third control submodule, where the second control submodule is configured to control the embedded device to be started according to the target software version when the version control keyword meets the second predetermined condition; the third control submodule is used for controlling the embedded device to select the software version when the version control keyword does not meet the second preset condition. In this embodiment, since the availability identifier in the second predetermined condition is an identifier that characterizes availability, the embedded device is controlled to start according to the target software version if the version control key of the target software version satisfies the second predetermined condition, and the embedded device is controlled to perform software version selection if the second predetermined condition is not satisfied, thereby further ensuring that whether to start with the target software version can be determined more quickly and accurately.
In order to control the embedded device to be started with the target software version more conveniently, in another embodiment of the present application, the version control information further includes a mirror image storage area pointer, the second control submodule includes a third determination submodule and a call submodule, where the third determination submodule is configured to determine an address of the copy storage area corresponding to the target software version according to the mirror image storage area pointer; and the calling sub-module is used for calling a plurality of target image files corresponding to the copy storage area according to the address of the copy storage area so as to enable the embedded device to be started according to the corresponding target software version.
In still another embodiment of the present application, the management apparatus further includes a third updating unit, configured to activate the target software version when the activation identifier is an identifier that indicates that activation is required, and control the embedded device to update the active/standby identifier corresponding to another software version to an identifier that indicates standby and update the activation identifier to an identifier that indicates that activation is not required after the software version is updated, where the other software version is other software version than the target software version. In this embodiment, since the activation identifier of the version control keyword of the target software version is an identifier representing that activation is required, the embedded device activates the target software version and controls the embedded device to start with the target software version, in this case, the active and standby identifiers of other software versions except the target software version can be updated to be identifiers representing standby, so that the embedded device is prevented from reading other software versions, and further, management of multiple software versions can be reasonably ensured.
In order to further obtain the maximized number of software versions and further implement on-demand upgrade of the image files, in a further embodiment of the present application, the dividing unit includes a second determining module and a third determining module, where the second determining module is configured to determine whether the current copy storage area needs to copy the target image files of other copy storage areas; and the third determining module is used for adding the copied target image file to the current copy storage area when determining that the target image files of other copy storage areas need to be copied.
In particular, in the application, in one copy storage area, part of the plurality of target image files can be updated image files and can also be target image files in other copy storage areas, so that in one copy storage area, if a software version needs to be formed by combining the target image files in other copy storage areas, the target image files in other copy storage areas can be copied to be placed in the copy storage area of the copy storage area so as to form a new software version, the maximization of the number of the software versions is further ensured, and because the target image files in other software versions can be updated software versions, resources are further saved by a copying method, and the on-demand updating of the image files is further realized.
In order to further ensure that the embedded device can be started with a newer software version after power-on, in one embodiment of the present application, the management method determining unit, one of the copy storage areas corresponds to a version information file, the version information file includes a verification identifier, the version control key includes an activation identifier, and the determining unit is configured to perform predetermined management on the software version according to version control information corresponding to each of the software versions, so that before the embedded device starts according to the software version after predetermined management, determine whether a plurality of target image files in a target software version are damaged according to the verification identifier, and set the activation identifier of the corresponding target software version to identify an identifier to be activated when each of the target image files is not damaged, where the target software version is one of the software versions read by the embedded device.
Specifically, in the above embodiment, if one of the plurality of target image files forming one target software version is damaged, the target software version cannot complete activation, if all of the plurality of target image files forming one target software version are not damaged, the target software version can complete activation, then the activation identifier in the version control key of the target software version under this condition is set to the identifier representing the need for activation, and after the subsequent embedded device is powered on, the target software version can be read preferentially according to the activation identifier as the identifier representing the need for activation.
Specifically, in the scheme, before the software version of the embedded device is scheduled to be managed, the version information file of each software version can be manufactured, so that the software version can be managed more conveniently, and for the version information file corresponding to one software version, the version information file can include the following information: the serial number of the target image file, the identification of the target image file, the version number of the target image file, the file name of the eyepiece image file, the file size of the target image file and the checksum, wherein the serial number of the target image file can be 1,2, … and n (shown in the table one); the identification of the target image file can be information such as the purpose, type and the like of the image file; the version number of the target image file is used for representing the version of the image file, such as V1.0, V2.0 and the like; the checksum is used for judging whether the updated target image file is damaged, and for a complete software version, if the damaged target image file exists in the software version, the software version cannot be activated.
In order to make the technical scheme of the present application more clearly understood by those skilled in the art, the present application will be described with reference to specific embodiments
Examples
As shown in fig. 3, after the embedded device is powered on again, the embedded device is controlled to read the version information file and the version control keyword of the target software version, and judge whether the activation identifier setuseis 1 (i.e. whether the activation identifier is an identifier representing that the activation is required) in the version control keyword of the target software version, and under the condition that the activation identifier setuseis 1, the embedded device is controlled to activate the target software version and control the embedded device to upgrade the software version, and update the version control keyword of the target software version to useOrspark=1, setuse0, hasrun=1 and canrun=0 (i.e. the main and standby identifiers in the version control keyword are updated to represent the main identifier, the activation identifier is updated to represent the inactive identifier, the running identifier is updated to be the identifier representing that the activation is required), and update the version control keyword of other software version to useOrspark=0 and setusese=0 (i.e. the main and standby identifiers in the version control keyword of the target software version are updated to be activated, and the standby control keyword is updated to represent the active and the standby address of the target software version is embedded into the target control device; judging whether a version control keyword of a target software version meets useOrSpare=1, setUsere=0, hasRun=1 and canRun=0 (namely, a first control condition: a main and standby identifier is an identifier for representing the main use, an active identifier is an identifier for representing non-activation, an operation identifier is an identifier for representing that the operation is performed and an availability identifier is an identifier for representing non-availability), controlling an embedded device to perform software version selection when the version control keyword of the target software version meets a first preset condition, updating the version control keyword of the target software version to useOrSpare=0, setUsere=0, hasRun=1 and canRun=0 when the version control keyword of the target software version does not meet the first preset condition, and determining whether the version control keyword of the target software version meets useSpart=1, setUsere=0, hasRun=1 and canRun=1 (namely, the second control keyword is an identifier for representing that the second control keyword is an active identifier under the condition).
The management device based on the software version of the embedded device comprises a processor and a memory, wherein the dividing unit, the management unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the problem that the resource occupancy rate of a software version in the upgrading process is high in the prior art is solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the invention provides a computer readable storage medium, wherein a program is stored in the computer readable storage medium, and the program is executed by a processor to realize the management method based on the software version of the embedded device.
The embodiment of the invention provides a processor for running a program, wherein the program runs to execute the method for managing the software version based on embedded equipment.
In an exemplary embodiment of the present application, there is also provided an electronic device including one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include a program for executing any one of the above-described management methods.
The embodiment of the application provides equipment, which comprises a processor, a memory and a program stored in the memory and capable of running on the processor, wherein the processor realizes at least the following steps when executing the program:
step S101, dividing a storage area of the embedded device into a plurality of copy storage areas, wherein a plurality of target image files are stored in one copy storage area, and part of the target image files are updated image files or the target image files in other copy storage areas, the versions of the target image files in any two copy storage areas are different, and a software version is formed by the plurality of target image files in one copy storage area;
Step S102, performing scheduled management on the software version according to version control information corresponding to each software version, so that the embedded device is started according to the software version after scheduled management, wherein the version control information at least comprises a version control keyword, and the scheduled management at least comprises: software version upgrade and software version selection.
The device herein may be a server, PC, PAD, cell phone, etc.
The application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with at least the following method steps:
step S101, dividing a storage area of the embedded device into a plurality of copy storage areas, wherein a plurality of target image files are stored in one copy storage area, and part of the target image files are updated image files or the target image files in other copy storage areas, the versions of the target image files in any two copy storage areas are different, and a software version is formed by the plurality of target image files in one copy storage area;
step S102, performing scheduled management on the software version according to version control information corresponding to each software version, so that the embedded device is started according to the software version after scheduled management, wherein the version control information at least comprises a version control keyword, and the scheduled management at least comprises: software version upgrade and software version selection.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technical content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units may be a logic function division, and there may be another division manner when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned method of the various embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
1) In the method for managing the software version based on the embedded equipment, the storage area of the embedded equipment is divided into the plurality of copy storage areas, wherein one copy storage area stores a plurality of target image files, part of the plurality of target image files can be updated image files or target image files in other copy storage areas, the plurality of copy storage areas form a plurality of software versions with different software versions because the target image files in any two copy storage areas are different, and then the software version is scheduled and managed according to version control information corresponding to each software version, so that the embedded equipment is started according to the scheduled and managed software version. Compared with the prior art, in the scheme, when all image files forming one software version are upgraded and version rollback cannot be carried out after the upgrade, part of image files in a plurality of target image files can be the upgraded image files and can also be the target image files corresponding to other copy storage areas in one copy storage area of the scheme, that is, the scheme realizes that the maximum number of software versions is obtained under the condition that fewer image files or image files are not upgraded, and in the process of carrying out the software version upgrade, as the corresponding software version is the fewer image files or the image files not to be upgraded, the resource occupation rate of the embedded device in the process of upgrading is lower and the upgrading speed is higher, so that the problem that the resource occupation rate of the software version in the process of upgrading in the prior art is higher is solved.
2) In the management device based on the software version of the embedded equipment, the dividing unit is used for dividing the storage area of the embedded equipment into a plurality of copy storage areas, wherein a plurality of target image files are stored in one copy storage area, part of the target image files are updated image files or the target image files in other copy storage areas, the versions of the target image files in any two copy storage areas are different, and the plurality of target image files in one copy storage area form one software version; the management unit is configured to perform predetermined management on the software versions according to version control information corresponding to each software version, so that the embedded device is started according to the software version after the predetermined management, where the version control information at least includes a version control keyword, and the predetermined management at least includes: software version upgrade and software version selection. Compared with the prior art, in the scheme, when all image files forming one software version are upgraded and version rollback cannot be carried out after the upgrade, part of image files in a plurality of target image files can be the upgraded image files and can also be the target image files corresponding to other copy storage areas in one copy storage area of the scheme, that is, the scheme realizes that the maximum number of software versions is obtained under the condition that fewer image files or image files are not upgraded, and in the process of carrying out the software version upgrade, as the corresponding software version is the fewer image files or the image files not to be upgraded, the resource occupation rate of the embedded device in the process of upgrading is lower and the upgrading speed is higher, so that the problem that the resource occupation rate of the software version in the process of upgrading in the prior art is higher is solved.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (12)

1. A method for managing software versions based on embedded devices, comprising:
dividing a storage area of the embedded equipment into a plurality of copy storage areas, wherein a plurality of target image files are stored in one copy storage area, part of the target image files are updated image files or the target image files in other copy storage areas, the versions of the target image files in any two copy storage areas are different, and a plurality of target image files in one copy storage area form a software version;
performing predetermined management on the software version according to version control information corresponding to each software version, so that the embedded device is started according to the software version after the predetermined management, wherein the version control information at least comprises a version control keyword, and the predetermined management at least comprises: software version upgrading and software version selecting;
The version control key words comprise a main and standby identifier, an activation identifier, an operation identifier and an availability identifier, and the software version is subjected to preset management according to version control information corresponding to each software version, so that the embedded device is started according to the software version after preset management, and the method comprises the following steps:
controlling the embedded equipment to read the version control keyword of a target software version, and determining whether the activation identifier corresponding to the target software version is an identifier representing that activation is required or not according to the version control keyword, wherein the target software version is one of a plurality of software versions;
activating the target software version and controlling the embedded equipment to upgrade the software version under the condition that the activation identifier is an identifier representing that the activation is required;
determining whether the embedded device is started with the target software version according to the version control key word of the target software version under the condition that the activation identifier is an identifier representing non-activation;
in the case that the activation identifier is an identifier that characterizes deactivation, determining, according to the version control key of the target software version, whether the embedded device is started with the target software version, including:
Determining whether the version control key of the target software version satisfies a first predetermined condition, the first predetermined condition comprising: the main and standby identifiers are identifiers for representing the main use, the activating identifiers are identifiers for representing the non-activating identifiers, the running identifiers are identifiers for representing the running and the availability identifiers are identifiers for representing the unavailability;
controlling the embedded device to select the software version under the condition that the version control keyword of the target software version meets the first preset condition;
determining whether the embedded device is started with the target software version according to whether the version control keyword of the target software version meets a second preset condition or not under the condition that the version control keyword of the target software version does not meet the first preset condition, wherein the second preset condition comprises: the primary and standby identifiers are identifiers for representing the primary, the active identifiers are identifiers for representing the inactive identifiers, the running identifiers are identifiers for representing the running, and the availability identifiers are identifiers for representing the availability.
2. The method according to claim 1, wherein, in the case where the activation flag is a flag indicating that activation is required, after activating the target software version and controlling the embedded device to perform the software version upgrade, the method further comprises:
Updating the primary and standby identifiers in the version control key words of the target software version to be identifiers representing primary use, updating the activation identifiers to be identifiers representing non-activation, updating the running identifiers to be identifiers which are already running and updating the availability identifiers to be identifiers representing non-availability.
3. The management method according to claim 1, wherein, in a case where the version control keyword of the target software version satisfies the first predetermined condition, the management method further comprises, after controlling the embedded device to make the software version selection:
updating the version control key of the target software version as: the primary and standby identifiers are updated to represent standby identifiers, the active identifiers are updated to represent inactive identifiers, the running identifiers are updated to represent already running identifiers, and the availability identifiers are updated to represent unavailable identifiers.
4. The method of managing of claim 1, wherein determining whether the embedded device is booted with the target software version based on whether the version control key of the target software version satisfies a second predetermined condition comprises:
Controlling the embedded device to start according to the target software version under the condition that the version control keyword meets the second preset condition;
and controlling the embedded device to select the software version under the condition that the version control key does not meet the second preset condition.
5. The method according to claim 4, wherein the version control information further includes a mirror storage pointer, and controlling the embedded device to be started according to the target software version if the version control key satisfies the second predetermined condition includes:
determining the address of the copy storage area corresponding to the target software version according to the mirror image storage area pointer;
and calling a plurality of target image files corresponding to the copy storage area according to the addresses of the copy storage area, so that the embedded equipment is started according to the corresponding target software version.
6. The method according to claim 1, wherein, in the case where the activation flag is a flag indicating that activation is required, after activating the target software version and controlling the embedded device to perform the software version upgrade, the method further comprises:
And updating the main and standby identifications corresponding to other software versions to be identifications representing standby and the active identifications to be identifications representing non-activation, wherein the other software versions are other software versions except the target software version.
7. The method according to claim 1, wherein the storing area of the embedded device is divided into a plurality of copy storing areas, wherein a plurality of target image files are stored in one of the copy storing areas, and a part of the target image files are updated image files or are the target image files in the other copy storing areas, comprising:
determining whether the current copy storage area needs to copy the target image files of other copy storage areas;
and when the target image files of other copy storage areas are determined to need to be copied, adding the copied target image files to the current copy storage area.
8. The method of claim 1, wherein one of the copy storage areas corresponds to a version information file, the version information file including a check identifier, the version control key including an activation identifier,
Before the software version is subjected to preset management according to the version control information corresponding to each software version, so that the embedded equipment is started according to the software version after preset management, the management method further comprises the following steps:
and determining whether a plurality of target image files in a target software version are damaged according to the verification identifiers, and setting the corresponding activation identifiers of the target software version to represent identifiers to be activated under the condition that the target image files are not damaged, wherein the target software version is one software version read by the embedded equipment.
9. A software version management apparatus based on an embedded device, comprising:
the dividing unit is used for dividing the storage area of the embedded equipment into a plurality of copy storage areas, wherein a plurality of target image files are stored in one copy storage area, part of the target image files are updated image files or the target image files in other copy storage areas, the versions of the target image files in any two copy storage areas are different, and a plurality of target image files in one copy storage area form a software version;
The management unit is configured to perform predetermined management on the software versions according to version control information corresponding to each software version, so that the embedded device is started according to the software version after the predetermined management, where the version control information at least includes a version control keyword, and the predetermined management at least includes: software version upgrading and software version selecting;
the version control key words comprise a main and standby identifier, an activation identifier, an operation identifier and an availability identifier, the management unit comprises a control module, an activation module and a first determination module, wherein the control module is used for controlling the embedded equipment to read the version control key words of a target software version, determining whether the activation identifier corresponding to the target software version is an identifier representing that the activation is required or not according to the version control key words, and the target software version is one of a plurality of software versions; the activation module is used for activating the target software version and controlling the embedded equipment to upgrade the software version under the condition that the activation identifier is an identifier which is characterized by needing to be activated; the first determining module is used for determining whether the embedded device is started with the target software version according to the version control keyword of the target software version under the condition that the activation identifier is an identifier representing non-activation;
The first determining module comprises a first determining sub-module, a first control sub-module and a second determining sub-module, wherein the first determining sub-module is used for determining whether the version control keyword of the target software version meets a first preset condition, and the first preset condition comprises: the main and standby identifiers are identifiers for representing the main use, the activating identifiers are identifiers for representing the non-activating identifiers, the running identifiers are identifiers for representing the running and the availability identifiers are identifiers for representing the unavailability; the first control submodule is used for controlling the embedded device to select the software version under the condition that the version control keyword of the target software version meets the first preset condition; the second determining submodule is configured to determine whether the embedded device is started with the target software version according to whether the version control keyword of the target software version meets a second predetermined condition if the version control keyword of the target software version does not meet the first predetermined condition, where the second predetermined condition includes: the primary and standby identifiers are identifiers for representing the primary, the active identifiers are identifiers for representing the inactive identifiers, the running identifiers are identifiers for representing the running, and the availability identifiers are identifiers for representing the availability.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein the program performs the management method of any one of claims 1 to 8.
11. A processor for running a program, wherein the program when run performs the management method of any one of claims 1 to 8.
12. An electronic device, comprising: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the management method of any of claims 1-8.
CN202210242824.4A 2022-03-11 2022-03-11 Management method and management device for software version based on embedded equipment Active CN114675902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210242824.4A CN114675902B (en) 2022-03-11 2022-03-11 Management method and management device for software version based on embedded equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210242824.4A CN114675902B (en) 2022-03-11 2022-03-11 Management method and management device for software version based on embedded equipment

Publications (2)

Publication Number Publication Date
CN114675902A CN114675902A (en) 2022-06-28
CN114675902B true CN114675902B (en) 2023-08-18

Family

ID=82074837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210242824.4A Active CN114675902B (en) 2022-03-11 2022-03-11 Management method and management device for software version based on embedded equipment

Country Status (1)

Country Link
CN (1) CN114675902B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131897A (en) * 2022-07-01 2022-09-30 潍柴动力股份有限公司 Method for storing travel route and storage device thereof

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170460A (en) * 2017-12-15 2018-06-15 杭州中天微***有限公司 A kind of method and device of embedded system increment upgrading
CN108958757A (en) * 2017-05-22 2018-12-07 中兴通讯股份有限公司 The upgrade method of complicated embedded device and complicated embedded device
CN109992450A (en) * 2018-01-03 2019-07-09 中兴通讯股份有限公司 System upgrade backing method, terminal, server and storage medium
CN111414185A (en) * 2020-02-28 2020-07-14 浙江吉利新能源商用车集团有限公司 Terminal upgrading method and device, terminal and storage medium
CN112181471A (en) * 2020-10-16 2021-01-05 北京紫光展锐通信技术有限公司 Differential upgrading method and device, storage medium and computer equipment
CN112328358A (en) * 2020-10-28 2021-02-05 惠州华阳通用电子有限公司 Dual-system starting method based on virtual machine and storage medium
CN112612642A (en) * 2020-12-17 2021-04-06 上海芯安信息科技有限公司 Software starting and upgrading failure backspacing method and device and terminal equipment
CN113535470A (en) * 2021-06-23 2021-10-22 浙江中控技术股份有限公司 Configuration backup method and device, electronic equipment and storage medium
CN113760332A (en) * 2021-08-30 2021-12-07 青岛信芯微电子科技股份有限公司 Software upgrading method and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958757A (en) * 2017-05-22 2018-12-07 中兴通讯股份有限公司 The upgrade method of complicated embedded device and complicated embedded device
CN108170460A (en) * 2017-12-15 2018-06-15 杭州中天微***有限公司 A kind of method and device of embedded system increment upgrading
CN109992450A (en) * 2018-01-03 2019-07-09 中兴通讯股份有限公司 System upgrade backing method, terminal, server and storage medium
CN111414185A (en) * 2020-02-28 2020-07-14 浙江吉利新能源商用车集团有限公司 Terminal upgrading method and device, terminal and storage medium
CN112181471A (en) * 2020-10-16 2021-01-05 北京紫光展锐通信技术有限公司 Differential upgrading method and device, storage medium and computer equipment
CN112328358A (en) * 2020-10-28 2021-02-05 惠州华阳通用电子有限公司 Dual-system starting method based on virtual machine and storage medium
CN112612642A (en) * 2020-12-17 2021-04-06 上海芯安信息科技有限公司 Software starting and upgrading failure backspacing method and device and terminal equipment
CN113535470A (en) * 2021-06-23 2021-10-22 浙江中控技术股份有限公司 Configuration backup method and device, electronic equipment and storage medium
CN113760332A (en) * 2021-08-30 2021-12-07 青岛信芯微电子科技股份有限公司 Software upgrading method and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Bsdiff差分算法的汽车OTA升级技术研究;邵学彬等;2021中国汽车工程学会年会暨展览会;963-966 *

Also Published As

Publication number Publication date
CN114675902A (en) 2022-06-28

Similar Documents

Publication Publication Date Title
RU2302089C2 (en) System for updating software in wireless devices
US20110041124A1 (en) Version Management System
KR20050061378A (en) Applying custom software image updates to non-volatile storage in a failsafe manner
EP1631905B1 (en) Dynamic bios execution and concurrent update for a blade server
US8949590B2 (en) Controlling access to software component state
US7216344B2 (en) Side-by-side drivers
CN114675902B (en) Management method and management device for software version based on embedded equipment
CN111880816A (en) Kubernetes working load upgrading method, device and equipment
CN104573496A (en) Method and device for inhibiting starting items from starting
CN110308914B (en) Upgrade processing method, device, equipment, system and computer readable storage medium
US20200364040A1 (en) System and Method for Restoring a Previously Functional Firmware Image on a Non-Volatile Dual Inline Memory Module
US20070079279A1 (en) Embedded device with software registry
KR20070060448A (en) Device and method for upgradin system using two step bootloader
CN114490124A (en) Method, device, equipment and medium for calling Application Programming Interface (API)
CN111966413A (en) Configuration method and device
CN116257326B (en) Method and device for managing storage space of container
CN111158771A (en) Processing method and device and computer equipment
JP2007011645A (en) Module update program
CN111142915B (en) Updating method, device and equipment
CN113645046B (en) Network card driver installation method, main server and medium
CN117762504A (en) System migration method and device
CN114816565A (en) Firmware loading method and device and electronic equipment
CN118170513A (en) Cloud storage-based application migration method, device, equipment and storage medium
CN115437748A (en) Virtual machine starting method and device and electronic equipment
CN113741926A (en) Upgrading method and device of kernel driver, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant