CN111736879A - Software upgrading method and system and computer - Google Patents

Software upgrading method and system and computer Download PDF

Info

Publication number
CN111736879A
CN111736879A CN202010874380.7A CN202010874380A CN111736879A CN 111736879 A CN111736879 A CN 111736879A CN 202010874380 A CN202010874380 A CN 202010874380A CN 111736879 A CN111736879 A CN 111736879A
Authority
CN
China
Prior art keywords
target
usb flash
flash disk
sequence
version numbers
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.)
Granted
Application number
CN202010874380.7A
Other languages
Chinese (zh)
Other versions
CN111736879B (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.)
Beijing Andi Technology Co Ltd
Original Assignee
Beijing Andi 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 Beijing Andi Technology Co Ltd filed Critical Beijing Andi Technology Co Ltd
Priority to CN202010874380.7A priority Critical patent/CN111736879B/en
Publication of CN111736879A publication Critical patent/CN111736879A/en
Application granted granted Critical
Publication of CN111736879B publication Critical patent/CN111736879B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

The invention relates to a software upgrading method, a system and a computer. When the USB flash disk is inserted into the USB interface, judging whether a user has the authority of using the USB flash disk, if so, mounting the USB flash disk; judging whether the sequence of at least two version numbers can be decrypted according to the identity of the USB flash disk, if so, executing: step S1: acquiring the current version number of the target software from the basic information of the target software; step S2: determining the sequence position of the current version number in the at least two version numbers according to the sequence of the at least two version numbers; step S3: if the ordinal position is not the top ordinal position, executing S4, and if the ordinal position is the top ordinal position, ending the current flow; step S4: determining a target version number of a previous sequential position of the sequential positions; step S5: and upgrading the target software currently loaded in the computer by using the target upgrade package, and returning to the step S1. The invention can conveniently upgrade the software.

Description

Software upgrading method and system and computer
Technical Field
The invention relates to the technical field of computers, in particular to a software upgrading method, a software upgrading system and a computer.
Background
At present, power plant projects are distributed all over the country and are increasing in number, the projects usually include a plurality of pieces of software, and the software upgrading is an important work for maintaining the normal progress of the projects because the latest versions of software usually include upgrading of functions or repair some bugs.
However, software in a power plant project is usually deployed in a local area network and cannot be upgraded online, so that software upgrade requires a professional technician to come to the field. Since power plant projects are distributed all over the country, technicians need time to respond, so that the latest functions of software cannot be used in time and new-version function repairs cannot be obtained in time, and the operation is very inconvenient.
Therefore, in view of the above disadvantages, it is desirable to provide a convenient software upgrading method.
Disclosure of Invention
The invention aims to solve the technical problem of a convenient software upgrading method, and provides a software upgrading method, a system and a computer aiming at the defects in the prior art.
In a first aspect, an embodiment of the present invention provides a software upgrading method, which is applied to a computer, where the computer performs software upgrading through a usb disk; at least two version numbers of target software and an upgrade package corresponding to each version number are stored in the USB flash disk; the sequence of the version numbers exists between the at least two version numbers, wherein the sequence of the newer version numbers is more advanced, and the upgrade packages corresponding to the newer version numbers are newer;
when the USB flash disk is inserted into the USB interface, judging whether a user of the USB flash disk has the authority of using the USB flash disk;
when determining that a user of the USB flash disk has the authority to use the USB flash disk, mounting the USB flash disk;
judging whether the sequence of the at least two version numbers can be decrypted according to the identity of the USB flash disk;
when the sequence of the at least two version numbers is determined to be capable of being decrypted, executing:
step S1: acquiring the current version number of the target software currently loaded by the computer from the basic information of the target software currently loaded by the computer;
step S2: determining the sequence position of the current version number in the at least two version numbers according to the sequence of the at least two version numbers;
step S3: if the ordinal position is not the top ordinal position, executing S4, and if the ordinal position is the top ordinal position, ending the current flow;
step S4: determining a target version number of a sequential position immediately preceding the sequential position;
step S5: and upgrading the target software currently loaded in the computer by using the target upgrading packet corresponding to the target version number stored in the U disk, and returning to the step S1.
Preferably, the first and second electrodes are formed of a metal,
the judging whether the user of the USB flash disk has the authority to use the USB flash disk comprises the following steps:
shooting an iris image of a user of the USB flash disk, acquiring at least one target iris image which is stored in the USB flash disk and represents at least one authorized user with the USB flash disk use authority, comparing the iris image with the at least one target iris image one by one, judging whether the target iris image which is the same as the iris image exists, if so, determining that the user has the authority to use the USB flash disk, and if not, mounting the USB flash disk.
Preferably, the first and second electrodes are formed of a metal,
the judging whether the sequence of the at least two version numbers can be decrypted according to the identity of the USB flash disk comprises the following steps:
acquiring the sequence of the at least two version numbers stored in the USB flash disk, wherein the sequence of the at least two version numbers is encrypted through a default public key;
and acquiring the serial number of the U disk, judging whether the serial number can be used as a private key to decrypt the sequence of the at least two encrypted version numbers, if so, executing S1, and if not, unloading the U disk.
Preferably, the first and second electrodes are formed of a metal,
in S5, the upgrading the target software currently loaded in the computer by using the target upgrade package corresponding to the target version number stored in the usb disk includes:
and acquiring a target upgrade package corresponding to the target version number stored in the USB flash disk, verifying the target upgrade package, upgrading the target software currently loaded in the computer by using the target upgrade package when the verification is passed, and ending the current process when the verification is not passed.
Preferably, the first and second electrodes are formed of a metal,
the verifying the target upgrade package comprises: and converting the target upgrading packet into corresponding information codes according to an information abstract algorithm MD5, acquiring the correct target information codes which are stored in the target upgrading packet and represent the target upgrading packet, comparing the information codes with the target information codes, if the information codes are the same as the target information codes, determining that the verification is passed, and if the information codes are different from the target information codes, ending the current flow.
In a second aspect, an embodiment of the present invention provides a computer based on the software upgrading method provided in any one of the first aspects, including:
the device comprises a first judgment module, a mounting module, a second judgment module and a processing module;
the first judging module is used for judging whether a user of the USB flash disk has the authority to use the USB flash disk or not when the USB flash disk is inserted into the USB interface;
the mounting module is used for mounting the USB flash disk when the first judging module determines that a user of the USB flash disk has the authority of using the USB flash disk;
the second judging module is used for judging whether the sequence of the at least two version numbers can be decrypted according to the identity of the USB flash disk;
the processing module is configured to execute, when the second determining module determines that the sequence of the at least two version numbers can be decrypted:
step S1: acquiring the current version number of the target software currently loaded by the computer from the basic information of the target software currently loaded by the computer;
step S2: determining the sequence position of the current version number in the at least two version numbers according to the sequence of the at least two version numbers;
step S3: if the ordinal position is not the top ordinal position, executing S4, and if the ordinal position is the top ordinal position, ending the current flow;
step S4: determining a target version number of a sequential position immediately preceding the sequential position;
step S5: and upgrading the target software currently loaded in the computer by using the target upgrading packet corresponding to the target version number stored in the U disk, and returning to the step S1.
Preferably, the first and second electrodes are formed of a metal,
the first judging module, when executing the judgment that whether the user of the usb disk has the right to use the usb disk, specifically executes:
shooting an iris image of a user of the USB flash disk, acquiring at least one target iris image which is stored in the USB flash disk and represents at least one authorized user with the USB flash disk use authority, comparing the iris image with the at least one target iris image one by one, judging whether the target iris image which is the same as the iris image exists, if so, determining that the user has the authority to use the USB flash disk, and if not, mounting the USB flash disk.
Preferably, the first and second electrodes are formed of a metal,
the second judging module is configured to obtain a sequence of the at least two version numbers stored in the usb disk, where the sequence of the at least two version numbers is encrypted by a default public key;
acquiring a serial number of the U disk, judging whether the serial number can be used as a private key to decrypt the sequence of the at least two encrypted version numbers, if so, triggering the processing unit to execute S1, and if not, unloading the U disk;
preferably, the first and second electrodes are formed of a metal,
the processing module, when executing the upgrading of the target software currently loaded in the computer by using the target upgrade package corresponding to the target version number stored in the usb disk in S5, specifically executes:
and acquiring a target upgrade package corresponding to the target version number stored in the USB flash disk, verifying the target upgrade package, upgrading the target software currently loaded in the computer by using the target upgrade package when the verification is passed, and ending the current process when the verification is not passed.
Preferably, the first and second electrodes are formed of a metal,
the processing module, when executing the verification of the target upgrade package, specifically executes: and converting the target upgrading packet into corresponding information codes according to an information abstract algorithm MD5, acquiring the correct target information codes which are stored in the target upgrading packet and represent the target upgrading packet, comparing the information codes with the target information codes, if the information codes are the same as the target information codes, determining that the verification is passed, and if the information codes are different from the target information codes, ending the current flow.
In a third aspect, an embodiment of the present invention provides a software upgrading system, including: the computer and the USB flash disk provided by any one of the second aspects;
the USB flash disk is used for storing at least two version numbers of target software and an upgrade package corresponding to each version number; the sequence of the version numbers exists between the at least two version numbers, wherein the sequence of the newer version numbers is more advanced, and the upgrade package corresponding to the newer version numbers is newer.
According to the technical scheme, the computer performs software upgrading through the USB flash disk, at least two version numbers of target software on the computer and the upgrading package corresponding to each version number are stored in the USB flash disk in advance, the version numbers are in sequence, and the upgrading package corresponding to the newer version number is correspondingly updated when the sequence of the newer version number is earlier. When detecting that the USB flash disk is inserted into the USB interface of the computer, firstly, determining whether the current user of the USB flash disk has the authority to use the USB flash disk. And when the user side is determined to have the right to use the USB flash disk, mounting the USB flash disk. Then, whether the sequence of the at least two version numbers stored in the USB flash disk can be decrypted according to the identity of the USB flash disk is judged, and if the sequence of the at least two version numbers can be decrypted, the following steps are executed: firstly, acquiring the version number of the current target software from basic information of the currently loaded target software of a computer, determining the sequence of the version number of the current target software in at least two version numbers according to the sequence of at least two version numbers decrypted before, and if the current version number is at the forefront position, indicating that the version of the current target software is the newest and does not need to be updated. If the current version number is not at the top sequential position, the current version number is not up to date and needs to be updated. And determining a target version number of a previous sequence position of the current version number in the sequence of at least two version numbers, upgrading the target software from a target upgrading packet corresponding to the target version number stored in the USB flash disk, judging whether the updated version number is the latest or not after upgrading is finished, and if not, continuously acquiring the version number of the previous sequence and updating until the sequence position of the version number in the sequence of at least two version numbers is the foremost, namely, upgrading to the latest version. Therefore, the sequence of at least two version numbers in the USB flash disk is decrypted, whether the version number of the current target software is at the forefront sequence position in the sequence is judged, if not, the target version number of the previous sequence position is determined, the target software is upgraded according to the upgrade package corresponding to the target version number stored in the USB flash disk, and whether the target software is the latest is judged again. The user only needs to insert the USB flash disk into the computer and conduct identity verification, the target software can be automatically upgraded according to the interaction, operation of professional technicians is not needed, time is saved, and therefore software upgrading can be conducted conveniently.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of a software upgrade method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a computer provided by an embodiment of the invention;
fig. 3 is a schematic diagram of a software upgrading system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As mentioned above, software in a power plant project is usually deployed in a local area network and cannot be upgraded online, so that software upgrade requires a professional technician to go to the field. Since power plant projects are distributed all over the country, technicians need time to respond, so that the latest functions of software cannot be used in time and new-version function repairs cannot be obtained in time, and the operation is very inconvenient.
The following describes an intelligent device control panel and an intelligent device control system according to embodiments of the present invention in detail with reference to the accompanying drawings.
As shown in fig. 1, an embodiment of the present invention provides a software upgrading method, which is applied to a computer, where the computer performs software upgrading through a usb disk; at least two version numbers of target software and an upgrade package corresponding to each version number are stored in the USB flash disk; the sequence of the version numbers exists between the at least two version numbers, wherein the sequence of the newer version numbers is more advanced, and the upgrade package corresponding to the newer version numbers is newer. The method comprises the following steps:
step 101: when it is detected that the USB interface is inserted into the USB disk, it is determined whether a user of the USB disk has a right to use the USB disk, and if yes, step 102 is executed.
Step 102: and mounting the USB flash disk, judging whether the sequence of the at least two version numbers can be decrypted according to the identity of the USB flash disk, and if so, executing step 103.
Step 103: and acquiring the current version number of the target software currently loaded by the computer from the basic information of the target software currently loaded by the computer.
Step 104: and determining whether the sequence position of the current version number in the at least two version numbers is the foremost according to the sequence of the at least two version numbers, if not, executing 105, and if so, executing 106.
Step 105: and determining a target version number of the previous sequence position of the sequence positions, upgrading the target software currently loaded in the computer by using a target upgrading packet corresponding to the target version number stored in the U disk, and returning to the step 103.
Step 106: the current flow is ended.
In an embodiment of the present invention, the computer performs software upgrade through a usb disk, where at least two version numbers of target software on the computer and an upgrade package corresponding to each version number are stored in the usb disk in advance, and the version numbers are in sequence, and the sequence of newer version numbers is earlier, the upgrade package corresponding to the newer version numbers is correspondingly updated. When detecting that the USB flash disk is inserted into the USB interface of the computer, firstly, determining whether the current user of the USB flash disk has the authority to use the USB flash disk. And when the user side is determined to have the right to use the USB flash disk, mounting the USB flash disk. Then, whether the sequence of the at least two version numbers stored in the USB flash disk can be decrypted according to the identity of the USB flash disk is judged, and if the sequence of the at least two version numbers can be decrypted, the following steps are executed: firstly, acquiring the version number of the current target software from basic information of the currently loaded target software of a computer, determining the sequence of the version number of the current target software in at least two version numbers according to the sequence of at least two version numbers decrypted before, and if the current version number is at the forefront position, indicating that the version of the current target software is the newest and does not need to be updated. If the current version number is not at the top sequential position, the current version number is not up to date and needs to be updated. And determining a target version number of a previous sequence position of the current version number in the sequence of at least two version numbers, upgrading the target software from a target upgrading packet corresponding to the target version number stored in the USB flash disk, judging whether the updated version number is the latest or not after upgrading is finished, and if not, continuously acquiring the version number of the previous sequence and updating until the sequence position of the version number in the sequence of at least two version numbers is the foremost, namely, upgrading to the latest version. Therefore, the sequence of at least two version numbers in the USB flash disk is decrypted, whether the version number of the current target software is at the forefront sequence position in the sequence is judged, if not, the target version number of the previous sequence position is determined, the target software is upgraded according to the upgrade package corresponding to the target version number stored in the USB flash disk, and whether the target software is the latest is judged again. The user only needs to insert the USB flash disk into the computer and conduct identity verification, the target software can be automatically upgraded according to the interaction, operation of professional technicians is not needed, time is saved, and therefore software upgrading can be conducted conveniently.
In an embodiment of the present invention, the determining whether the user of the usb disk has the right to use the usb disk includes:
shooting an iris image of a user of the USB flash disk, acquiring at least one target iris image which is stored in the USB flash disk and represents at least one authorized user with the USB flash disk use authority, comparing the iris image with the at least one target iris image one by one, judging whether the target iris image which is the same as the iris image exists, if so, determining that the user has the authority to use the USB flash disk, and if not, mounting the USB flash disk.
Specifically, in order to ensure the security of data in the usb disk, only a user with the usb disk usage right can use the usb disk to update software. A plurality of iris images with USB flash disk use authority are stored in the USB flash disk in advance, the iris images are stored in the USB flash disk in a single partition mode and only used for authentication of the authority, the iris images cannot be seen in a file system when the USB flash disk is mounted on a computer, and safety of the iris images is guaranteed. When a user of the USB flash disk inserts the USB flash disk into the USB port, the computer shoots an iris image of the user, the shot iris image is compared with an iris image stored in the USB flash disk in advance, whether the iris image is consistent or not is judged according to detail characteristics such as spots, filaments, crowns, stripes, recesses and the like which are staggered in the iris image, if the shot iris image is consistent with any one of the iris images stored in advance, the user of the current USB flash disk is determined to have the use authority of the USB flash disk, and the USB flash disk is mounted.
In an embodiment of the present invention, the determining whether the sequence of the at least two version numbers can be decrypted according to the id of the usb disk in step 102 includes:
acquiring the sequence of the at least two version numbers stored in the USB flash disk, wherein the sequence of the at least two version numbers is encrypted through a default public key;
and acquiring the serial number of the USB flash disk, judging whether the serial number can be used as a private key to decrypt the sequence of the at least two encrypted version numbers, if so, executing 103, and if not, unloading the USB flash disk.
Specifically, at least two version numbers stored in the usb disk are sequentially encrypted by a default public key through an asymmetric encryption algorithm, which requires two keys: a public key and a private key. The public key and the private key are a pair, and if data is encrypted by the public key, the data can be decrypted only by the corresponding private key. This algorithm is called asymmetric encryption algorithm because two different keys are used for encryption and decryption. The basic process of realizing confidential information exchange by the asymmetric encryption algorithm is as follows: the first party generates a pair of secret keys and discloses the public keys, and other roles (the second party) needing to send information to the first party encrypt the confidential information by using the secret keys (the public keys of the first party) and then send the encrypted confidential information to the first party; the first party decrypts the encrypted information by using the private key of the first party. The method is characterized in that when the party A wants to reply to the party B, the opposite is true, the public key of the party B is used for encrypting data, and similarly, the party B uses the private key of the party B for decrypting. As can be seen from the above, data transmission is performed between the usb disk and the computer, the usb disk is encrypted by the default public key and can only be decrypted by the private key of the computer, i.e., the serial number of the usb disk. If the decryption cannot be carried out, the serial number of the U disk is wrong, and the software cannot be updated.
In an embodiment of the present invention, the upgrading, in step 105, the target software currently loaded in the computer by using the target upgrade package corresponding to the target version number stored in the usb disk includes:
and acquiring a target upgrade package corresponding to the target version number stored in the USB flash disk, verifying the target upgrade package, upgrading the target software currently loaded in the computer by using the target upgrade package when the verification is passed, and ending the current process when the verification is not passed.
In an embodiment of the present invention, the verifying the target upgrade package includes: and converting the target upgrading packet into corresponding information codes according to an information abstract algorithm MD5, acquiring the correct target information codes which are stored in the target upgrading packet and represent the target upgrading packet, comparing the information codes with the target information codes, if the information codes are the same as the target information codes, determining that the verification is passed, and if the information codes are different from the target information codes, ending the current flow.
Specifically, in order to ensure the success of software upgrade, after the target upgrade package corresponding to the target version number is determined, the integrity of the target upgrade package needs to be verified. The currently stored target upgrade package is converted into the corresponding information code through the information abstract algorithm MD5, and meanwhile, the target upgrade package stores the target information code corresponding to the complete target upgrade package, because if the upgrade package has data loss, the information code calculated through the MD5 is determined to be changed, only when the information code is the same as the correct target information code, the target upgrade package can be determined to be complete, and the software can be updated through the target upgrade package.
As shown in fig. 2, an embodiment of the present invention provides a computer based on the software upgrading method provided in any one of the above embodiments, including:
the system comprises a first judgment module 201, a mounting module 202, a second judgment module 203 and a processing module 204;
the first judging module 201 is configured to, when it is detected that the USB interface is inserted into the USB disk, judge whether a user of the USB disk has an authority to use the USB disk;
the mounting module 202 is configured to mount the usb disk when the first determining module 201 determines that a user of the usb disk has an authority to use the usb disk;
the second determining module 203 is configured to determine whether the sequence of the at least two version numbers can be decrypted according to the identity of the usb disk;
the processing module 204 is configured to, when the second determining module 203 determines that the sequence of the at least two version numbers can be decrypted, execute:
step S1: acquiring the current version number of the target software currently loaded by the computer from the basic information of the target software currently loaded by the computer;
step S2: determining the sequence position of the current version number in the at least two version numbers according to the sequence of the at least two version numbers;
step S3: if the ordinal position is not the top ordinal position, executing S4, and if the ordinal position is the top ordinal position, ending the current flow;
step S4: determining a target version number of a sequential position immediately preceding the sequential position;
step S5: and upgrading the target software currently loaded in the computer by using the target upgrading packet corresponding to the target version number stored in the U disk, and returning to the step S1.
In an embodiment of the present invention, when the first determining module 201 performs the determining whether the user of the usb disk has the right to use the usb disk, the first determining module specifically performs:
shooting an iris image of a user of the USB flash disk, acquiring at least one target iris image which is stored in the USB flash disk and represents at least one authorized user with the USB flash disk use authority, comparing the iris image with the at least one target iris image one by one, judging whether the target iris image which is the same as the iris image exists, if so, determining that the user has the authority to use the USB flash disk, and if not, mounting the USB flash disk.
In an embodiment of the present invention, the second determining module 203 is configured to obtain a sequence of the at least two version numbers stored in the usb disk, where the sequence of the at least two version numbers is encrypted by a default public key;
acquiring a serial number of the U disk, judging whether the serial number can be used as a private key to decrypt the sequence of the at least two encrypted version numbers, if so, triggering the processing unit to execute S1, and if not, unloading the U disk;
in an embodiment of the present invention, when the target upgrade package corresponding to the target version number stored in the usb disk is used to upgrade the target software currently loaded in the computer in S5, the processing module 204 specifically executes:
and acquiring a target upgrade package corresponding to the target version number stored in the USB flash disk, verifying the target upgrade package, upgrading the target software currently loaded in the computer by using the target upgrade package when the verification is passed, and ending the current process when the verification is not passed.
In an embodiment of the present invention, when the processing module 204 performs the verification on the target upgrade package, specifically perform: and converting the target upgrading packet into corresponding information codes according to an information abstract algorithm MD5, acquiring the correct target information codes which are stored in the target upgrading packet and represent the target upgrading packet, comparing the information codes with the target information codes, if the information codes are the same as the target information codes, determining that the verification is passed, and if the information codes are different from the target information codes, ending the current flow.
It should be understood that the illustrated structure of the embodiment of the present invention is not intended to limit the computer. In other embodiments of the invention, a computer may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
As shown in fig. 3, an embodiment of the present invention provides a software upgrading system, including: the computer 301 and the usb disk 302 provided in any of the above embodiments;
the USB flash disk 302 is used for storing at least two version numbers of target software and an upgrade package corresponding to each version number; the sequence of the version numbers exists between the at least two version numbers, wherein the sequence of the newer version numbers is more advanced, and the upgrade package corresponding to the newer version numbers is newer.
The information interaction, execution process and other contents between the units in the system are based on the same concept as the embodiment of the apparatus of the present invention, and specific contents can be referred to the description in the embodiment of the apparatus of the present invention, and are not described herein again.
In summary, the embodiments of the present invention have at least the following advantages:
1. in the embodiment of the invention, the sequence of at least two version numbers in the USB flash disk is decrypted, whether the version number of the current target software is at the top sequence position in the sequence is judged, if not, the target version number of the top sequence position is determined, the target software is upgraded according to the upgrade package corresponding to the target version number stored in the USB flash disk, and whether the target software is the latest is judged again. The user only needs to insert the USB flash disk into the computer and conduct identity verification, the target software can be automatically upgraded according to the interaction, operation of professional technicians is not needed, time is saved, and therefore software upgrading can be conducted conveniently.
2. In the embodiment of the invention, before the USB flash disk is mounted, iris recognition is carried out on the user of the USB flash disk, and the USB flash disk can be mounted for software updating after the iris recognition is passed, so that the safety of the scheme provided by the invention is improved.
3. In the embodiment of the invention, the information code corresponding to the target update package is calculated through the MD5 algorithm, and is compared with the correct target information code to judge whether the target update package is complete, and the update is carried out only under the condition that the target update package is complete, so that the success of software upgrade is ensured.
It should be noted that not all steps and modules in the above flows and system structure diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution order of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by a plurality of physical entities, or some components in a plurality of independent devices may be implemented together.
In the above embodiments, the hardware unit may be implemented mechanically or electrically. For example, a hardware element may comprise permanently dedicated circuitry or logic (such as a dedicated processor, FPGA or ASIC) to perform the corresponding operations. The hardware elements may also comprise programmable logic or circuitry, such as a general purpose processor or other programmable processor, that may be temporarily configured by software to perform the corresponding operations. The specific implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the invention has been shown and described in detail in the drawings and in the preferred embodiments, it is not intended to limit the invention to the embodiments disclosed, and it will be apparent to those skilled in the art that various combinations of the code auditing means in the various embodiments described above may be used to obtain further embodiments of the invention, which are also within the scope of the invention.

Claims (10)

1. The software upgrading method is characterized by being applied to a computer, wherein the computer carries out software upgrading through a USB flash disk; at least two version numbers of target software and an upgrade package corresponding to each version number are stored in the USB flash disk; the sequence of the version numbers exists between the at least two version numbers, wherein the sequence of the newer version numbers is more advanced, and the upgrade packages corresponding to the newer version numbers are newer;
when the USB flash disk is inserted into the USB interface, judging whether a user of the USB flash disk has the authority of using the USB flash disk;
when determining that a user of the USB flash disk has the authority to use the USB flash disk, mounting the USB flash disk;
judging whether the sequence of the at least two version numbers can be decrypted according to the identity of the USB flash disk;
when the sequence of the at least two version numbers is determined to be capable of being decrypted, executing:
step S1: acquiring the current version number of the target software currently loaded by the computer from the basic information of the target software currently loaded by the computer;
step S2: determining the sequence position of the current version number in the at least two version numbers according to the sequence of the at least two version numbers;
step S3: if the ordinal position is not the top ordinal position, executing S4, and if the ordinal position is the top ordinal position, ending the current flow;
step S4: determining a target version number of a sequential position immediately preceding the sequential position;
step S5: and upgrading the target software currently loaded in the computer by using the target upgrading packet corresponding to the target version number stored in the U disk, and returning to the step S1.
2. The method of claim 1,
the judging whether the user of the USB flash disk has the authority to use the USB flash disk comprises the following steps:
shooting an iris image of a user of the USB flash disk, acquiring at least one target iris image which is stored in the USB flash disk and represents at least one authorized user with the USB flash disk use authority, comparing the iris image with the at least one target iris image one by one, judging whether the target iris image which is the same as the iris image exists, if so, determining that the user has the authority to use the USB flash disk, and if not, mounting the USB flash disk.
3. The method of claim 1,
the judging whether the sequence of the at least two version numbers can be decrypted according to the identity of the USB flash disk comprises the following steps:
acquiring the sequence of the at least two version numbers stored in the USB flash disk, wherein the sequence of the at least two version numbers is encrypted through a default public key;
and acquiring the serial number of the U disk, judging whether the serial number can be used as a private key to decrypt the sequence of the at least two encrypted version numbers, if so, executing S1, and if not, unloading the U disk.
4. The method of claim 1,
in S5, the upgrading the target software currently loaded in the computer by using the target upgrade package corresponding to the target version number stored in the usb disk includes:
and acquiring a target upgrade package corresponding to the target version number stored in the USB flash disk, verifying the target upgrade package, upgrading the target software currently loaded in the computer by using the target upgrade package when the verification is passed, and ending the current process when the verification is not passed.
5. The method of claim 4,
the verifying the target upgrade package comprises: and converting the target upgrading packet into corresponding information codes according to an information abstract algorithm MD5, acquiring the correct target information codes which are stored in the target upgrading packet and represent the target upgrading packet, comparing the information codes with the target information codes, if the information codes are the same as the target information codes, determining that the verification is passed, and if the information codes are different from the target information codes, ending the current flow.
6. A computer based software upgrade method according to any one of claims 1 to 5, comprising:
the device comprises a first judgment module, a mounting module, a second judgment module and a processing module;
the first judging module is used for judging whether a user of the USB flash disk has the authority to use the USB flash disk or not when the USB flash disk is inserted into the USB interface;
the mounting module is used for mounting the USB flash disk when the first judging module determines that a user of the USB flash disk has the authority of using the USB flash disk;
the second judging module is used for judging whether the sequence of the at least two version numbers can be decrypted according to the identity of the USB flash disk;
the processing module is configured to execute, when the second determining module determines that the sequence of the at least two version numbers can be decrypted:
step S1: acquiring the current version number of the target software currently loaded by the computer from the basic information of the target software currently loaded by the computer;
step S2: determining the sequence position of the current version number in the at least two version numbers according to the sequence of the at least two version numbers;
step S3: if the ordinal position is not the top ordinal position, executing S4, and if the ordinal position is the top ordinal position, ending the current flow;
step S4: determining a target version number of a sequential position immediately preceding the sequential position;
step S5: and upgrading the target software currently loaded in the computer by using the target upgrading packet corresponding to the target version number stored in the U disk, and returning to the step S1.
7. The computer of claim 6,
the first judging module, when executing the judgment that whether the user of the usb disk has the right to use the usb disk, specifically executes:
shooting an iris image of a user of the USB flash disk, acquiring at least one target iris image which is stored in the USB flash disk and represents at least one authorized user with the USB flash disk use authority, comparing the iris image with the at least one target iris image one by one, judging whether the target iris image which is the same as the iris image exists, if so, determining that the user has the authority to use the USB flash disk, and if not, mounting the USB flash disk.
8. The computer of claim 6,
the second judging module is configured to obtain a sequence of the at least two version numbers stored in the usb disk, where the sequence of the at least two version numbers is encrypted by a default public key;
acquiring a serial number of the U disk, judging whether the serial number can be used as a private key to decrypt the sequence of the at least two encrypted version numbers, if so, triggering the processing module to execute S1, and if not, unloading the U disk;
and/or the presence of a gas in the gas,
the processing module, when executing the upgrading of the target software currently loaded in the computer by using the target upgrade package corresponding to the target version number stored in the usb disk in S5, specifically executes:
and acquiring a target upgrade package corresponding to the target version number stored in the USB flash disk, verifying the target upgrade package, upgrading the target software currently loaded in the computer by using the target upgrade package when the verification is passed, and ending the current process when the verification is not passed.
9. The computer of claim 8,
the processing module, when executing the verification of the target upgrade package, specifically executes: and converting the target upgrading packet into corresponding information codes according to an information abstract algorithm MD5, acquiring the correct target information codes which are stored in the target upgrading packet and represent the target upgrading packet, comparing the information codes with the target information codes, if the information codes are the same as the target information codes, determining that the verification is passed, and if the information codes are different from the target information codes, ending the current flow.
10. A software upgrade system, comprising: the computer and the USB flash drive of any one of claims 6-9;
the USB flash disk is used for storing at least two version numbers of target software and an upgrade package corresponding to each version number; the sequence of the version numbers exists between the at least two version numbers, wherein the sequence of the newer version numbers is more advanced, and the upgrade package corresponding to the newer version numbers is newer.
CN202010874380.7A 2020-08-27 2020-08-27 Software upgrading method and system and computer Active CN111736879B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010874380.7A CN111736879B (en) 2020-08-27 2020-08-27 Software upgrading method and system and computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010874380.7A CN111736879B (en) 2020-08-27 2020-08-27 Software upgrading method and system and computer

Publications (2)

Publication Number Publication Date
CN111736879A true CN111736879A (en) 2020-10-02
CN111736879B CN111736879B (en) 2020-12-22

Family

ID=72658819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010874380.7A Active CN111736879B (en) 2020-08-27 2020-08-27 Software upgrading method and system and computer

Country Status (1)

Country Link
CN (1) CN111736879B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202093838U (en) * 2011-05-31 2011-12-28 艾博闻 Wireless encrypted U disk
CN102662689A (en) * 2012-03-15 2012-09-12 青岛海信传媒网络技术有限公司 Method and system for upgrading embedded software based on USB interface
US20140325201A1 (en) * 2013-04-26 2014-10-30 Core Logic Inc. Automatic entrance device and method for upgrade boot mode
CN107943530A (en) * 2017-11-02 2018-04-20 安徽科微智能科技有限公司 USB interface-based unmanned boat system automatically updating method
CN108874414A (en) * 2018-04-02 2018-11-23 广州视源电子科技股份有限公司 Software upgrading method and device, readable storage medium and television equipment
CN109710290A (en) * 2018-12-27 2019-05-03 郑州云海信息技术有限公司 A kind of method of embedded type terminal equipment flash disk upgrading

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202093838U (en) * 2011-05-31 2011-12-28 艾博闻 Wireless encrypted U disk
CN102662689A (en) * 2012-03-15 2012-09-12 青岛海信传媒网络技术有限公司 Method and system for upgrading embedded software based on USB interface
US20140325201A1 (en) * 2013-04-26 2014-10-30 Core Logic Inc. Automatic entrance device and method for upgrade boot mode
CN107943530A (en) * 2017-11-02 2018-04-20 安徽科微智能科技有限公司 USB interface-based unmanned boat system automatically updating method
CN108874414A (en) * 2018-04-02 2018-11-23 广州视源电子科技股份有限公司 Software upgrading method and device, readable storage medium and television equipment
CN109710290A (en) * 2018-12-27 2019-05-03 郑州云海信息技术有限公司 A kind of method of embedded type terminal equipment flash disk upgrading

Also Published As

Publication number Publication date
CN111736879B (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN109313690B (en) Self-contained encrypted boot policy verification
US8627086B2 (en) Secure loading and storing of data in a data processing device
US20200272745A1 (en) Security Data Processing Device
EP2565811A2 (en) System and method for authenticating a gaming device
US9866553B2 (en) Method for securing access to a computer device
EP2879327A1 (en) Encryption and decryption processing method, apparatus and device
CN108595198B (en) Safe firmware updating method
JPH10282884A (en) Data processing method and its system
CN110688660B (en) Method and device for safely starting terminal and storage medium
EP1645931A1 (en) Secure loading and storing of data in a data processing device
CN112534793A (en) Vehicle-mounted equipment upgrading method and related device
CN109144552A (en) A kind of boot firmware method for refreshing and device
CN103269271A (en) Method and system for back-upping private key in electronic signature token
CN114662087B (en) Multi-terminal verification security chip firmware updating method and device
EP1574928A1 (en) Program execution control apparatus, os, client terminal, server, program execution control system, program execution control method, and program execution control program
CN111026419A (en) Application program upgrading method, device and system of single chip microcomputer
CN111177709A (en) Execution method and device of terminal trusted component and computer equipment
KR20210097379A (en) Secure device, electronic device, secure boot management system, method for generating boot image, and method for excuting boot chain
JP2009253783A (en) Mobile terminal, data protection method and program for data protection
CN115242397A (en) OTA upgrade security verification method and readable storage medium for vehicle EUC
CN110674525A (en) Electronic equipment and file processing method thereof
EP3610401B1 (en) Storing data on target data processing devices
CN111385083B (en) Key protection method and key protection system
CN111736879B (en) Software upgrading method and system and computer
CN110445774B (en) Security protection method, device and equipment for IoT (Internet of things) equipment

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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20201002

Assignee: CHINA TECHNOLOGY EXCHANGE Co.,Ltd.

Assignor: Beijing andI Technology Co.,Ltd.

Contract record no.: X2021980013280

Denomination of invention: Software upgrade method, system and computer

Granted publication date: 20201222

License type: Exclusive License

Record date: 20211124

EE01 Entry into force of recordation of patent licensing contract
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Software upgrade method, system and computer

Effective date of registration: 20211125

Granted publication date: 20201222

Pledgee: CHINA TECHNOLOGY EXCHANGE Co.,Ltd.

Pledgor: Beijing andI Technology Co.,Ltd.

Registration number: Y2021110000074

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230529

Granted publication date: 20201222

Pledgee: CHINA TECHNOLOGY EXCHANGE Co.,Ltd.

Pledgor: Beijing andI Technology Co.,Ltd.

Registration number: Y2021110000074

EC01 Cancellation of recordation of patent licensing contract
EC01 Cancellation of recordation of patent licensing contract

Assignee: CHINA TECHNOLOGY EXCHANGE Co.,Ltd.

Assignor: Beijing andI Technology Co.,Ltd.

Contract record no.: X2021980013280

Date of cancellation: 20230529