WO2017016282A1 - Software upgrading method and apparatus, and computer storage medium - Google Patents

Software upgrading method and apparatus, and computer storage medium Download PDF

Info

Publication number
WO2017016282A1
WO2017016282A1 PCT/CN2016/082118 CN2016082118W WO2017016282A1 WO 2017016282 A1 WO2017016282 A1 WO 2017016282A1 CN 2016082118 W CN2016082118 W CN 2016082118W WO 2017016282 A1 WO2017016282 A1 WO 2017016282A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgrade
file
correctness
files
important
Prior art date
Application number
PCT/CN2016/082118
Other languages
French (fr)
Chinese (zh)
Inventor
邱炯
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017016282A1 publication Critical patent/WO2017016282A1/en

Links

Images

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

Definitions

  • the present invention relates to the field of information processing, and in particular, to a software upgrade method and apparatus, and a computer storage medium.
  • an embodiment of the present invention provides a software upgrade method and device, and a computer storage medium, which at least alleviate the problem of high software upgrade failure rate.
  • a first aspect of the embodiments of the present invention provides a software upgrade method, where the method includes:
  • the upgrade package includes a total of M upgrade files; the M is an integer not less than 2;
  • the software upgrade is performed based on the N upgrade files verified by the file correctness;
  • the N is a positive integer smaller than the M.
  • the software upgrade when the software upgrade cannot be performed based on the M upgrade files, the software upgrade is performed based on the upgrade files that are verified by the file correctness, including:
  • the software is upgraded based on the N upgrade files verified by the correctness of the file; wherein the N upgrades are verified by the correctness of the file.
  • the file includes at least all of the important upgrade files described.
  • the determining the important upgrade file of the upgrade package includes:
  • the important upgrade file is determined based on the download descriptor file.
  • the download descriptor file includes a file name of all files of the upgrade package and an importance level corresponding to the file;
  • Determining the important upgrade file based on the download descriptor file including:
  • the important upgrade file is determined.
  • the download descriptor file includes a file name of the important upgrade file in the upgrade package
  • the determining the important upgrade file of the upgrade package includes:
  • the method further includes:
  • the verification result of determining the correctness of the file of the important upgrade file includes:
  • the verification result of the verification of the correctness of the file of the important upgrade file is determined.
  • the correctness of the upgrade package is verified to verify the correctness of all files in the upgrade package
  • the verification result of the verification of the correctness of the file of the important upgrade file is determined, including:
  • the software upgrade when the software upgrade cannot be performed based on the M upgrade files, the software upgrade is performed based on the upgrade files that are verified by the file correctness, including:
  • the software upgrade is performed based on the N upgrade files verified by the correctness of the file.
  • a second aspect of the embodiments of the present invention provides a software upgrade apparatus, where the apparatus includes:
  • a receiving unit configured to receive an upgrade package, where the upgrade package includes a total of M upgrade files; the M is an integer not less than 2;
  • An upgrade unit configured to perform software upgrade based on the N upgrade files verified by file correctness when the software upgrade cannot be performed based on the M upgrade files;
  • the N is a positive integer smaller than the M.
  • the upgrading unit includes:
  • a first determining module configured to determine an important upgrade file of the upgrade package
  • a second determining module configured to determine a verification result of the correctness of the file of the important upgrade file
  • An upgrade module configured to: if the verification result indicates that the important upgrade file is verified by the correctness of the file, upgrade software based on the N upgrade files verified by the correctness of the file; wherein the N pass file correctness
  • the upgrade file verified includes at least all of the important upgrade files.
  • the first determining module is configured to receive a download descriptor file of the upgrade package; and determine the important upgrade file based on the download descriptor file.
  • the download descriptor file includes a file name of all files of the upgrade package and an importance level corresponding to the file;
  • the first determining module is further configured to compare the importance level with a level threshold; and determine the important upgrade file based on the result of the comparing.
  • the download descriptor file includes a file name of the important upgrade file in the upgrade package
  • the first determining module is further configured to extract a file name of the important upgrade file in the download descriptor file, and determine the important upgrade file.
  • the device further includes:
  • a verification unit configured to verify the correctness of the upgrade package of the upgrade package
  • the second determining module is further configured to: if the verification package correctness verification fails, determine a verification result of the file correctness verification of the important upgrade file.
  • the correctness of the upgrade package is verified to verify the correctness of all files in the upgrade package
  • the second determining module is further configured to obtain a verification result of the file correctness verification of the important upgrade file based on the verification result of the upgrade package correctness verification.
  • the upgrading unit is further configured to determine N the upgrade files that are verified by the correctness of the files in the M upgrade files; and based on the N upgrade files that are verified by the correctness of the files. software upgrade.
  • a third aspect of the embodiments of the present invention provides a computer storage medium.
  • the computer storage medium provided by the embodiment of the present invention stores a computer program, where the computer program is used to execute the software upgrade method.
  • the software upgrade method and device, and the computer storage medium in the embodiment of the present invention can perform software upgrade based on the upgrade file verified by the file correctness in the upgrade package, so that the prior art can be well avoided. Document correctness verification for individual upgrade files If it fails, the entire software cannot be upgraded and the upgrade fails. This improves the software upgrade success rate. It is especially suitable for software upgrades that have only minor differences between upgrade files and client upgrade files in some upgrade packages, and do not affect the main purpose of this upgrade.
  • FIG. 1 is a schematic flowchart of a software upgrade method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of providing software upgrade based on N upgrade files verified by file correctness according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of determining an important upgrade file according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a software upgrading apparatus according to an embodiment of the present invention.
  • FIG. 5 is a second schematic flowchart of a software upgrade method according to an embodiment of the present disclosure.
  • FIG. 6 is a third schematic flowchart of a software upgrade method according to an embodiment of the present invention.
  • an electronic device such as a mobile terminal such as a mobile phone, a tablet or a wearable device
  • the version downloaded to the device does not match the part of the expected shipping version, and may be based on the firmware of the Firmware Over The Air (FOTA).
  • FOTA Firmware Over The Air
  • the strict verification mechanism before the differential upgrade package is installed detects that the version of the differential upgrade package does not match the current version of the electronic device, and the upgrade fails.
  • the differential upgrade package is one of upgrade packages. The result is that the electronic device can only choose to upgrade the full version, which may overwrite many historical user data. In particular, if the current device does not support the full version upgrade, the device will never be upgraded in the future, which seriously affects the user experience.
  • the present application provides a software upgrade solution.
  • the software upgrade is performed based on a part of the upgrade files in the software package, which is also a software upgrade, so that at least Improved partial upgrade success rate based on upgrade package.
  • the software upgrade method when the differential upgrade package does not match the current device version, the user data retained by the electronic device can be saved, and the current version of the electronic device can be upgraded successfully, thereby improving the upgrade intelligence and the user. Experience.
  • this embodiment provides a software upgrade method, where the method includes:
  • Step S110 receiving an upgrade package
  • Step S120 When the software upgrade cannot be performed based on the M upgrade files, perform software upgrade based on the N upgrade files verified by file correctness;
  • the N is a positive integer smaller than the M.
  • the upgrade package may include an overall upgrade package and a differential upgrade package.
  • the overall upgrade package may be information for the upgrade version application, and the overall upgrade and replacement of the software may be implemented according to the complete upgrade package.
  • the differential upgrade package only includes difference information between the upgrade version and the current version, and only the partial upgrade replacement is performed when the software upgrade is performed based on the differential upgrade package.
  • the upgrade package is preferably a differential upgrade package.
  • the client may receive the upgrade package such as the differential upgrade package from the server side.
  • a software upgrade package includes a total of M upgrade files, and the probability that the M upgrade files are verified by the correctness of the files is obviously lower than the probability that only N of the M upgrade files are required to pass the correctness of the files.
  • the partial upgrade based on the upgrade package also implements the software upgrade, and obviously at least the partial upgrade success rate based on the upgrade package is improved.
  • the upgrade package includes not only the upgrade file but also the upgrade file is written in the flash area of the client.
  • the file correctness verification in the embodiment includes: performing file verification on the partition to be upgraded, and adopting the existing verification method. , need to compress and digitally sign the upgrade package, and After the upgrade package is downloaded to the electronic device, the above-mentioned file verification is performed by decompressing and digital signature.
  • the upgrade package here may include an OTA upgrade package, the OTA is an abbreviation of Over the Air Technology, and the corresponding Chinese is an over-the-air download technology.
  • the OTA upgrade package is an upgrade package downloaded by using an over-the-air download technology.
  • step S120 a sub-step of verifying the correctness of the file may be included.
  • the verification of the correctness of the file refer to the method for verifying the correctness of the file in the existing software upgrade technology.
  • the N upgrade files may include at least two of the following:
  • the upgrade file of the upgrade package includes a normal upgrade file and an important upgrade file; the N upgrade files are N important upgrade files that are verified by the correctness of the file.
  • N upgrade files can be all upgrade files verified by file correctness in M upgrade files.
  • the step S120 may include:
  • Step S121 determining an important upgrade file of the upgrade package
  • Step S122 determining a verification result of the correctness of the file of the important upgrade file
  • Step S123 If the verification result indicates that the important upgrade file is verified by the correctness of the file, the upgrade file is upgraded based on the N correctness of the file verification; wherein the N are verified by the correctness of the file.
  • the upgrade file includes at least all of the important upgrade files.
  • an upgrade package can include multiple files to be upgraded, and the upgrade importance of these files is different.
  • the upgrade file in the upgrade package in this embodiment may include a normal upgrade file and an important upgrade file.
  • the important upgrade file may be a file that must be upgraded in this software upgrade.
  • the important upgrade file of the upgrade package will be determined in step S121.
  • the step S121 can be Important upgrade files determined based on user instructions.
  • step S122 the important upgrade file in the upgrade package is verified for correctness. If the correctness verification is passed, the upgrade is performed based on at least the important upgrade file in step S123Z.
  • the N upgrade files verified by the correctness of the file include at least all the important upgrade files. It can be understood that if the important upgrade includes a total of P files, the N is not smaller than the P.
  • the software upgrade is performed based on at least all of the important upgrade files in step S123, and may also be performed based on all the importance upgrade files and some of the normal upgrade files.
  • the overall upgrade based on the upgrade package be performed based on each file in the upgrade package, but also the upgrade file based on the importance in the upgrade package, and the partial upgrade based on the upgrade package.
  • the correctness of the verification of a normal upgrade file is incorrect, the upgrade of the importance upgrade file is still performed, and the upgrade success is achieved, thereby improving the upgrade success rate.
  • the S121 may include:
  • Step S1201 Receive a download descriptor file of the upgrade package.
  • Step S1202 Determine the important upgrade file based on the download descriptor file.
  • the download descriptor file may be simply referred to as a DD file.
  • the DD is an abbreviation of Download Descriptiion.
  • the DD file may further include information such as a file size, a download address, and the like of the upgrade package. Usually it is a file that is downloaded before the client downloads the upgrade package.
  • the importance upgrade file is obtained from the DD file, instead of the information sent from other files sent by the server, the importance file is determined, and the number of information interactions between the client and the server can be reduced. Reduce the load of information interaction while reducing the power consumption of the client.
  • step S1202 there are various implementations of the step S1202, and two alternative methods are provided below:
  • the download descriptor file includes a file name of all files of the upgrade package and an importance level corresponding to the file;
  • the step S1202 may include:
  • the important upgrade file is determined.
  • the level threshold may be a level threshold formed by the client based on the user input instruction, or may be a level threshold configured by default before the electronic device leaves the factory.
  • the level threshold is higher, the importance of the corresponding upgrade file is higher. In this case, if the result of the comparison indicates that the importance level is not less than the level threshold, the importance level corresponds to the upgrade.
  • the file is the important upgrade file. If the level threshold is lower, the importance of the corresponding upgrade file is higher. In this case, if the result of the comparison indicates that the importance level is less than the level threshold, the upgrade file corresponding to the importance level For the important upgrade file.
  • the importance level of the upgrade file may be determined by the server side according to the upgrade purpose of the upgrade and the upgrade function of the upgrade file.
  • the download descriptor file includes a file name of the important upgrade file in the upgrade package
  • the step S1202 includes:
  • the DD file includes the file name and the importance level of all the files in the upgrade package.
  • the DD file may only include the file name of the important upgrade file, so that the client directly includes the file according to the DD file.
  • the file name determines which are important upgrade files.
  • the first method can set the level threshold according to the user's instruction, so that the user can participate in the control to determine the important upgrade file, so that the user can control the upgrade, and the importance file of the second method is determined by the server side. , but the implementation is easier.
  • the DD file may further include partition information of each upgrade file, and the partition information may be used to perform correct verification of the file.
  • the step S122 may include:
  • the verification result of the verification of the correctness of the file of the important upgrade file is determined.
  • the verification of the correctness of the upgrade package includes verification of the correctness of all the upgrade files in the upgrade package, such as the verification of the correctness of the normal upgrade file and the verification of the correctness of the important upgrade file.
  • the software upgrade method first performs the verification of the correctness of the upgrade package, and the verification of the correctness of the upgrade package is essentially the first correctness verification. If the first correctness verification is passed, it means that all the files in the entire upgrade package have passed the correctness verification. Obviously, all the upgrade files in the upgrade package can be upgraded based on the entire upgrade package. At this time, all the upgrades in the upgrade package are directly performed. The file is upgraded by the client software. At this time, if the upgrade package includes a total of M upgrade files; M is an integer of not less than 1, the client software upgrades M files, and the upgraded files are upgrade files in the software upgrade package.
  • the correct upgrade of the upgrade package fails, it means that the correctness of some upgrade files in the upgrade package cannot be passed.
  • the verification result of the correctness verification of the file of the important upgrade file is determined. If the correctness of the file verification of the important upgrade file is passed, it indicates that the software upgrade package can be partially upgraded. In this case, if the correctness of the file verification fails, the correct verification result of the normal upgrade file fails, and it is obvious that the software upgrade of the client can still be performed, which obviously improves the upgrade success rate of the software upgrade, and also avoids the software failure under extreme conditions. The result of the upgrade.
  • the verification result of the verification of the correctness of the file of the important upgrade file is determined, including: obtaining the important upgrade file based on the verification result of the verification of the correctness of the upgrade package. The verification result of the correctness of the file.
  • the verification result of the correctness verification of the file of the important upgrade file may be re-authenticated for the importance file, or the verification result of the important upgrade file may be confirmed based on the verification result of the verification of the correctness of the upgrade package. Obviously, it is determined directly based on the verification result of the verification of the correctness of the upgrade package, and the verification may be repeated to speed up the determination of efficiency.
  • the step S120 may include:
  • the software upgrade is performed based on the N upgrade files verified by the correctness of the file.
  • the embodiment of the invention provides a software upgrade method, which can perform software upgrade based on a part of the upgrade file in the upgrade package, and the partial upgrade is also an upgrade success rate, which obviously improves the upgrade success rate.
  • this embodiment provides a software upgrade apparatus, where the apparatus includes:
  • the receiving unit 110 is configured to receive an upgrade package, where the upgrade package includes a total of M upgrade files; the M is an integer not less than 2;
  • the upgrading unit 120 is configured to perform software upgrade based on the N upgrade files verified by file correctness when the software upgrade cannot be performed based on the M upgrade files;
  • the N is a positive integer smaller than the M.
  • the receiving unit 110 in this embodiment may include a communication interface configured to receive the upgrade package from a peripheral device such as a server.
  • the upgrade package may be the differential upgrade package described in the foregoing method embodiment, or may be an overall upgrade package.
  • the specific structure of the upgrading unit 120 may include a processor or processing circuit that can be used for information processing such as software upgrade processing.
  • the processor may include a central processing unit CPU, a microprocessor MCU, a digital signal processor DSP or a programmable array within the client Column PLC and other processors.
  • the processing circuit can include an application specific integrated circuit ASIC or the like.
  • the software upgrade device in this embodiment breaks all the files in the prior art based on all the upgrade files in the upgrade package, and the present application is based on the N upgrade files in the upgrade package that are verified by the correctness of the files. Upgrade, so through partial upgrades, improve the upgrade success rate and upgrade intelligence.
  • the upgrading unit 120 includes:
  • the first determining module 121 is configured to determine an important upgrade file of the upgrade package
  • the second determining module 122 is configured to determine a verification result of the correctness of the file of the important upgrade file
  • the upgrade module 123 is configured to: if the verification result indicates that the important upgrade file is verified by the correctness of the file, upgrade the software based on the N upgrade files verified by the correctness of the file; wherein the N pass files are correct.
  • the upgrade file of the sexual verification includes at least all of the important upgrade files.
  • the first determining module 121 has a plurality of structures, and may include receiving information from the peripheral device to determine the important upgrade file in the upgrade package, or may include the information parser determining the Important upgrade files.
  • the second determining module 122 may include a structure for performing information verification, and the comparator or the comparing circuit determines the file correctness verification of the important upgrade file in the software package by comparing and matching.
  • the upgrade module 123 is configured to perform software upgrade, and the specific structure may include the foregoing processor or processing circuit.
  • the software upgrade is performed based on at least all the important upgrade files in the upgrade package.
  • the software upgrade may be performed based on all the important upgrade files and some common upgrade files.
  • the first determining module 121 is configured to receive a download descriptor file of the upgrade package; and determine the important upgrade file based on the download descriptor file.
  • the first determining module 121 may include a communication interface and a parser, where the communication interface is configured to receive the download descriptor file, and the parser is configured to parse the download descriptor file to determine an important upgrade file.
  • the DD file of the upgrade package carries information indicating the important upgrade file, which simplifies the operation of the client to determine the important upgrade file.
  • the download descriptor file includes a file name of all files of the upgrade package and an importance level corresponding to the file; the first determining module 121 is further configured to compare the importance level with a level threshold; and Based on the result of the comparison, the important upgrade file is determined.
  • the DD file includes an importance level
  • the first determining module 121 may include a comparator, and by comparing the importance level with the level threshold, the comparison result can be obtained, and the important upgrade file is determined based on the comparison result. Therefore, the device based on the comparison structure can realize the software upgrade based on the partial threshold of the upgrade package based on the level threshold or the system default setting indicated by the user or the level threshold dynamically determined based on the historical upgrade record.
  • partial upgrades implemented by the technical solution of the present invention in the embodiments of the present invention refer to software upgrades based on partial upgrade files in the upgrade package; and the overall upgrade refers to software based on all upgrade files in the upgrade package. upgrade.
  • the download descriptor file includes a file name of the important upgrade file in the upgrade package, and the first determining module 121 is further configured to extract a file name of the important upgrade file in the download descriptor file, and determine Out of the important upgrade file.
  • the first determining module 121 in the solution may be different from the first determining module 121 in the previous solution.
  • the first determining module 121 directly confirms the important upgrade file according to the file name recorded in the DD file.
  • An upgrade file whose file name is recorded in the DD file can be regarded as an important upgrade file.
  • the DD file may further include partition information corresponding to the upgrade file, and the partition information may be used for file correctness verification.
  • the device further includes: a verification unit configured to upgrade the upgrade package
  • the second verification module 122 is further configured to determine a verification result of the file correctness verification of the important upgrade file if the verification package correctness verification fails.
  • the verification unit performs an upgrade package correctness verification on the upgrade package.
  • the verification of the correctness of the upgrade package indicates that all the files in the upgrade package have passed the correctness of the file.
  • the upgrade can be performed based on all the upgrade files of the upgrade package. Therefore, the upgrade module 123 is not required to perform partial upgrade. Therefore, the upgrade module 123 performs partial upgrade based on the N upgrade files verified by the correctness of the file when the verification of the correctness of the upgrade package fails.
  • the correctness of the upgrade package is verified to verify the correctness of all the files in the upgrade package.
  • the second determining module 122 is further configured to obtain the important upgrade file based on the verification result of the correctness verification of the upgrade package. The verification result of the correctness of the file verification. How to determine the file correctness verification of the important upgrade file, the second determining module 122 may perform one-by-one verification according to various file correctness verification algorithms, or may be determined based on the upgrade package correctness verification result. In the embodiment, the second determining module 122 determines the verification result of each of the importance upgrade files based on the verification result of the upgrade package correctness verification, which is more convenient.
  • the upgrading unit 120 is further configured to: determine, by the N upgrade files that are verified by the correctness of the files in the M upgrade files; and perform the N upgrade files that are verified by the correctness of the files.
  • software upgrade
  • the N upgrade files may be N upgrade files verified by file correctness, and it is no longer necessary to distinguish whether all the importance files are included. In this case, at least part of the software in the client can be upgraded.
  • the software upgrade device is provided in the embodiment, and the software upgrade can be performed based on the partial upgrade file in the upgrade package, so as to prevent the upgrade package from failing to pass the correctness of the file of the upgrade file, the upgrade cannot be performed at all. Phenomenon, improved upgrade success rate and upgrade intelligence.
  • the software upgrade method described in this example includes:
  • S001 The DM session initiates and the server interacts.
  • the execution body of this step is the client.
  • the client initiates a FOTA upgrade, and the DM session interacts with the server to query whether the server has a differential upgrade package available.
  • S002 Determine whether the server has a differential upgrade package available. If yes, go to S003. If no, go to S015.
  • S003 Download the DD file to obtain the dice address of the differential upgrade package in the DD file. If the server has a differential upgrade package, the server sends a DD file to the client.
  • the DD file contains the information of the original differential upgrade package size and download address, and the file name and location of the differential upgrade package upgrade file. Partition information and its importance level.
  • S004 Download a differential upgrade package based on the download address.
  • S005 Perform upgrade package integrity verification. Through the upgrade package integrity verification, it can be verified whether the upgrade package has data loss, bit error, and tampering during the transmission process; specifically, the upgrade can be verified by a checksum algorithm such as parity check or MD5 algorithm. The integrity of the package.
  • S005 The client restarts to enter the upgrade package correctness check. Before the verification, the client's upgrade agent obtains the file name of the image or file system to be updated by the upgrade package, the partition information of the file, and their importance level.
  • S006 Determine whether the integrity verification is passed. If yes, go to S007, if no, go to S014.
  • S007 Obtain a file name, a partition information, and an importance level information of the upgrade file in the upgrade package included in the DD file.
  • the partition information indicates the write area of each file in the software.
  • S008 Perform the first correctness verification on all upgrade files in the upgrade package.
  • the first correctness verification here is equivalent to the verification of the correctness of the upgrade package in the previous embodiment.
  • S009 Determine whether the first correctness verification is passed, and if yes, go to S013; if not, go to S010.
  • S010 Determine an important upgrade file according to the importance level obtained by S007, and upgrade the important upgrade.
  • the file is verified for the second time. Only verify that the importance level is in the partition where the level threshold and above are located. Verify that the image and file system information of this part of the partition completely match the image and file system information of the version of the differential upgrade package.
  • S011 Determine whether the second correctness verification is passed, and if yes, go to S012; if not, go to S014.
  • step S012 Ignore the verification and upgrade of other parts, and determine that the software upgrade is performed based only on the partition where the important upgrade file passed in step S010 is verified. This is equivalent to performing a partial upgrade in the foregoing embodiment.
  • the software upgrade method of this example includes:
  • S101 The client detects that an upgrade package is available on the server.
  • S102 Download a DD file, and obtain information content of the DD file, where the information content may include information such as an upgrade package size and a download address, and further include a file name, a partition information, and an importance of the upgrade file included in the available upgrade package. grade.
  • S104 Obtain information such as a file name, a partition information, and an importance level of the upgrade file included in the upgrade package.
  • S106 The verification finds that the sb11.mbn file in the client does not match the sb11.mbn file in the upgrade package, and other files match. At this point, it indicates that the first correctness verification failed.
  • S108 Determine that the upgrade file included in the upgrade package has NON-NLOS.bin and sb11.mbn, if The current client specifies a level threshold of 3, and determines whether the importance level of NON-HLOS.bin is not less than 3, and the importance level of sb11.mbn is less than 3; then only the partition where NON-HLOS.bin is located is verified. And upgrade, ignore the checksum upgrade of the partition where sb11.mbn is located. Of course, the higher the importance level in this example, the higher the importance of the upgrade.
  • the software upgrade device and the client described in the embodiments of the present invention all correspond to terminal devices such as mobile phones, network televisions, tablet computers, or wearable devices, especially mobile terminals.
  • the software upgrade device can even be part of the client.
  • the client or terminal including the software upgrade device in this embodiment has the characteristics of high software upgrade success rate and high upgrade intelligence.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the above integration
  • the unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing may be completed by a program instruction related hardware, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes the steps of the foregoing method embodiment; and the foregoing storage medium includes: mobile storage A device that can store program code, such as a device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • magnetic disk or an optical disk.
  • the embodiment of the present invention further provides a computer storage medium, wherein a computer program is stored, and the computer program is used to execute the software upgrade method of the embodiment of the present invention.
  • the software upgrade when the software is upgraded, the software upgrade may be performed based on the upgrade file verified by the file correctness in the upgrade package, so that the files of the individual upgrade files in the prior art are well avoided. If the verification fails, the entire software cannot be upgraded and the upgrade fails. This improves the software upgrade success rate. It is especially suitable for software upgrades that have only minor differences between upgrade files and client upgrade files in some upgrade packages, and do not affect the main purpose of this upgrade.

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

A software upgrading method and apparatus, and a computer storage medium. The method comprises: receiving an upgrade package (S110), wherein the upgrade package comprises M upgrade files in total, M being an integer not less than 2; and when software upgrading cannot be performed based on the M upgrade files, performing software upgrading based on N of the upgrade files which have passed the file correctness verification (S120), where N is a positive integer less than M.

Description

软件升级方法及装置、计算机存储介质Software upgrade method and device, computer storage medium 技术领域Technical field
本发明涉及信息处理领域,尤其涉及一种软件升级方法及装置、计算机存储介质。The present invention relates to the field of information processing, and in particular, to a software upgrade method and apparatus, and a computer storage medium.
背景技术Background technique
随着信息技术的发展和电子设备的广泛应用,电子设备中应用,会通过升级频繁更新升级应用,来完善和提升应用的功能,提高应用的智能性和用户使用满意度。但是在应用升级的过程中,常常发现升级包与当前设备版本不匹配,导致升级失败,进而升级失败率高。若采用覆盖性升级则会导致很多用户数据丢失,从而影响用户升级后的使用,故如何提高升级成功率是现有技术中亟待解决的问题。With the development of information technology and the widespread application of electronic devices, applications in electronic devices will improve and enhance the functions of applications by upgrading and upgrading applications frequently, and improving application intelligence and user satisfaction. However, during the application upgrade process, it is often found that the upgrade package does not match the current device version, resulting in an upgrade failure, and the upgrade failure rate is high. If the coverage upgrade is used, many user data will be lost, which will affect the user's use after the upgrade. Therefore, how to improve the upgrade success rate is an urgent problem to be solved in the prior art.
发明内容Summary of the invention
为解决上述技术问题,本发明实施例提供了一种软件升级方法及装置、计算机存储介质,至少缓解软件升级失败率高的问题。To solve the above technical problem, an embodiment of the present invention provides a software upgrade method and device, and a computer storage medium, which at least alleviate the problem of high software upgrade failure rate.
本发明实施例第一方面提供一种软件升级方法,所述方法包括:A first aspect of the embodiments of the present invention provides a software upgrade method, where the method includes:
接收升级包;其中,所述升级包共包括M个升级文件;所述M为不小于2的整数;Receiving an upgrade package, where the upgrade package includes a total of M upgrade files; the M is an integer not less than 2;
当无法基于所述M个升级文件进行软件升级时,基于N个通过文件正确性验证的所述升级文件进行软件升级;When the software upgrade cannot be performed based on the M upgrade files, the software upgrade is performed based on the N upgrade files verified by the file correctness;
其中,所述N为小于所述M的正整数。Wherein, the N is a positive integer smaller than the M.
基于上述方案,所述当无法基于所述M个升级文件进行软件升级时,基于N个通过文件正确性验证的所述升级文件进行软件升级,包括: Based on the foregoing solution, when the software upgrade cannot be performed based on the M upgrade files, the software upgrade is performed based on the upgrade files that are verified by the file correctness, including:
确定所述升级包的重要升级文件;Determining important upgrade files for the upgrade package;
确定所述重要升级文件的文件正确性的验证结果;Determining the verification result of the correctness of the file of the important upgrade file;
若所述验证结果表明所述重要升级文件通过所述文件正确性验证,基于N个通过文件正确性验证的所述升级文件升级软件;其中,所述N个通过文件正确性验证的所述升级文件至少包括所有的所述重要升级文件。If the verification result indicates that the important upgrade file is verified by the correctness of the file, the software is upgraded based on the N upgrade files verified by the correctness of the file; wherein the N upgrades are verified by the correctness of the file. The file includes at least all of the important upgrade files described.
基于上述方案,所述确定所述升级包的重要升级文件,包括:Based on the foregoing solution, the determining the important upgrade file of the upgrade package includes:
接收所述升级包的下载描述符文件;Receiving a download descriptor file of the upgrade package;
基于所述下载描述符文件确定所述重要升级文件。The important upgrade file is determined based on the download descriptor file.
基于上述方案,所述下载描述符文件包括所述升级包所有文件的文件名及所述文件对应的重要性等级;Based on the above solution, the download descriptor file includes a file name of all files of the upgrade package and an importance level corresponding to the file;
所述基于所述下载描述符文件确定所述重要升级文件,包括:Determining the important upgrade file based on the download descriptor file, including:
将所述重要性等级与等级阈值进行比较;Comparing the importance level to a level threshold;
基于所述比较的结果,确定所述重要升级文件。Based on the result of the comparison, the important upgrade file is determined.
基于上述方案,所述下载描述符文件包括所述升级包中所述重要升级文件的文件名;Based on the above solution, the download descriptor file includes a file name of the important upgrade file in the upgrade package;
所述确定所述升级包的重要升级文件,包括:The determining the important upgrade file of the upgrade package includes:
提取所述下载描述符文件中所述重要升级文件的文件名,确定出所述重要升级文件。Extracting a file name of the important upgrade file in the download descriptor file to determine the important upgrade file.
基于上述方案,所述方法还包括:Based on the foregoing solution, the method further includes:
对所述升级包进行升级包正确性验证;Performing the correctness verification of the upgrade package for the upgrade package;
所述确定所述重要升级文件的文件正确性的验证结果,包括:The verification result of determining the correctness of the file of the important upgrade file includes:
若所述升级包正确性验证不通过,确定所述重要升级文件的文件正确性验证的验证结果。If the verification of the correctness of the upgrade package fails, the verification result of the verification of the correctness of the file of the important upgrade file is determined.
基于上述方案,所述升级包正确性验证为对所述升级包中所有文件进行正确性验证; Based on the foregoing solution, the correctness of the upgrade package is verified to verify the correctness of all files in the upgrade package;
所述若所述升级包正确性验证不通过,确定所述重要升级文件的文件正确性验证的验证结果,包括:If the verification of the correctness of the upgrade package fails, the verification result of the verification of the correctness of the file of the important upgrade file is determined, including:
基于所述升级包正确性验证的验证结果,获取所述重要升级文件的文件正确性验证的验证结果。And obtaining, according to the verification result of the verification of the correctness of the upgrade package, the verification result of the verification of the correctness of the file of the important upgrade file.
基于上述方案,所述当无法基于所述M个升级文件进行软件升级时,基于N个通过文件正确性验证的所述升级文件进行软件升级,包括:Based on the foregoing solution, when the software upgrade cannot be performed based on the M upgrade files, the software upgrade is performed based on the upgrade files that are verified by the file correctness, including:
确定所述M个升级文件中文件正确性验证性通过的N个所述升级文件;Determining, by the N upgrade files, the correctness of the files in the M upgrade files;
基于通过所述文件正确性验证的N个升级文件,进行软件升级。The software upgrade is performed based on the N upgrade files verified by the correctness of the file.
本发明实施例第二方面提供一种软件升级装置,所述装置包括:A second aspect of the embodiments of the present invention provides a software upgrade apparatus, where the apparatus includes:
接收单元,配置为接收升级包;其中,所述升级包共包括M个升级文件;所述M为不小于2的整数;a receiving unit, configured to receive an upgrade package, where the upgrade package includes a total of M upgrade files; the M is an integer not less than 2;
升级单元,配置为当无法基于所述M个升级文件进行软件升级时,基于N个通过文件正确性验证的所述升级文件进行软件升级;An upgrade unit configured to perform software upgrade based on the N upgrade files verified by file correctness when the software upgrade cannot be performed based on the M upgrade files;
其中,所述N为小于所述M的正整数。Wherein, the N is a positive integer smaller than the M.
基于上述方案,所述升级单元,包括:Based on the foregoing solution, the upgrading unit includes:
第一确定模块,配置为确定所述升级包的重要升级文件;a first determining module, configured to determine an important upgrade file of the upgrade package;
第二确定模块,配置为确定所述重要升级文件的文件正确性的验证结果;a second determining module, configured to determine a verification result of the correctness of the file of the important upgrade file;
升级模块,配置为若所述验证结果表明所述重要升级文件通过所述文件正确性验证,基于N个通过文件正确性验证的所述升级文件升级软件;其中,所述N个通过文件正确性验证的所述升级文件至少包括所有的所述重要升级文件。An upgrade module, configured to: if the verification result indicates that the important upgrade file is verified by the correctness of the file, upgrade software based on the N upgrade files verified by the correctness of the file; wherein the N pass file correctness The upgrade file verified includes at least all of the important upgrade files.
基于上述方案,所述第一确定模块,配置为接收所述升级包的下载描述符文件;及基于所述下载描述符文件确定所述重要升级文件。 Based on the above solution, the first determining module is configured to receive a download descriptor file of the upgrade package; and determine the important upgrade file based on the download descriptor file.
基于上述方案,所述下载描述符文件包括所述升级包所有文件的文件名及所述文件对应的重要性等级;Based on the above solution, the download descriptor file includes a file name of all files of the upgrade package and an importance level corresponding to the file;
所述第一确定模块,还配置为将所述重要性等级与等级阈值进行比较;及基于所述比较的结果,确定所述重要升级文件。The first determining module is further configured to compare the importance level with a level threshold; and determine the important upgrade file based on the result of the comparing.
基于上述方案,所述下载描述符文件包括所述升级包中所述重要升级文件的文件名;Based on the above solution, the download descriptor file includes a file name of the important upgrade file in the upgrade package;
所述第一确定模块,还配置为提取所述下载描述符文件中所述重要升级文件的文件名,确定出所述重要升级文件。The first determining module is further configured to extract a file name of the important upgrade file in the download descriptor file, and determine the important upgrade file.
基于上述方案,所述装置还包括:Based on the above solution, the device further includes:
验证单元,配置为对所述升级包进行升级包正确性验证;a verification unit configured to verify the correctness of the upgrade package of the upgrade package;
所述第二确定模块,还配置为若所述升级包正确性验证不通过,确定所述重要升级文件的文件正确性验证的验证结果。The second determining module is further configured to: if the verification package correctness verification fails, determine a verification result of the file correctness verification of the important upgrade file.
基于上述方案,所述升级包正确性验证为对所述升级包中所有文件进行正确性验证;Based on the foregoing solution, the correctness of the upgrade package is verified to verify the correctness of all files in the upgrade package;
所述第二确定模块,还配置为基于所述升级包正确性验证的验证结果,获取所述重要升级文件的文件正确性验证的验证结果。The second determining module is further configured to obtain a verification result of the file correctness verification of the important upgrade file based on the verification result of the upgrade package correctness verification.
基于上述方案,所述升级单元,还配置为确定所述M个升级文件中文件正确性验证性通过的N个所述升级文件;及基于通过所述文件正确性验证的N个升级文件,进行软件升级。Based on the above solution, the upgrading unit is further configured to determine N the upgrade files that are verified by the correctness of the files in the M upgrade files; and based on the N upgrade files that are verified by the correctness of the files. software upgrade.
本发明实施例第三方面提供一种计算机存储介质,本发明实施例提供的计算机存储介质存储有计算机程序,该计算机程序用于执行上述软件升级方法。A third aspect of the embodiments of the present invention provides a computer storage medium. The computer storage medium provided by the embodiment of the present invention stores a computer program, where the computer program is used to execute the software upgrade method.
本发明实施例软件升级方法及装置、计算机存储介质,在进行软件升级时,可以基于升级包中的部分通过文件正确性验证的升级文件进行软件升级,这样就可以很好的避免现有技术中个别升级文件的文件正确性验证 不通过,导致整个软件都无法升级造成的升级失败的现象,从而提升了软件升级成功率。尤其适用于对于某些升级包内升级文件与客户端升级文件仅有微小差异码,不影响本次升级主要目的的软件升级。The software upgrade method and device, and the computer storage medium in the embodiment of the present invention can perform software upgrade based on the upgrade file verified by the file correctness in the upgrade package, so that the prior art can be well avoided. Document correctness verification for individual upgrade files If it fails, the entire software cannot be upgraded and the upgrade fails. This improves the software upgrade success rate. It is especially suitable for software upgrades that have only minor differences between upgrade files and client upgrade files in some upgrade packages, and do not affect the main purpose of this upgrade.
附图说明DRAWINGS
图1为本发明实施例所述的软件升级方法的流程示意图之一;1 is a schematic flowchart of a software upgrade method according to an embodiment of the present invention;
图2为本发明实施例提供基于N个通过文件正确性验证的升级文件进行软件升级的流程示意图;2 is a schematic flowchart of providing software upgrade based on N upgrade files verified by file correctness according to an embodiment of the present invention;
图3为本发明实施例提供的确定重要升级文件的流程示意图;3 is a schematic flowchart of determining an important upgrade file according to an embodiment of the present invention;
图4为本发明实施例提供的软件升级装置的结构示意图;4 is a schematic structural diagram of a software upgrading apparatus according to an embodiment of the present invention;
图5为本发明实施例所述的软件升级方法的流程示意图之二;FIG. 5 is a second schematic flowchart of a software upgrade method according to an embodiment of the present disclosure;
图6为本发明实施例所述的软件升级方法的流程示意图之三。FIG. 6 is a third schematic flowchart of a software upgrade method according to an embodiment of the present invention.
具体实施方式detailed description
在电子设备(如手机、平板电脑或可穿戴设备等移动终端)使用过程中,如果用户有意或者无意间更改了电子设备中应用或软件当前版本的某些配置信息,或者用户对设备进行了刷机处理,甚至因为出厂前批量生产时出现的某种异常导致了下载到设备里的版本与预期发货版本的某部分文件不符,均可能在基于空口固件升级(Firmware Over The Air,FOTA)的软件升级时,会因为该差分升级包被安装之前严格的校验机制检测到制作差分升级包的版本与电子设备的当前版本不匹配,导致升级失败。所述差分升级包是升级包的一种。这样的后果是:电子设备只能选择全版本升级,可能会覆盖掉很多历史用户数据;特别的,如果当前设备不支持全版本升级,那么该设备后续将永远无法升级,严重影响到用户体验。In the process of using an electronic device (such as a mobile terminal such as a mobile phone, a tablet or a wearable device), if the user intentionally or unintentionally changes some configuration information of the current version of the application or software in the electronic device, or the user has flashed the device Processing, even because of some abnormality in the mass production before shipment, the version downloaded to the device does not match the part of the expected shipping version, and may be based on the firmware of the Firmware Over The Air (FOTA). When the upgrade is performed, the strict verification mechanism before the differential upgrade package is installed detects that the version of the differential upgrade package does not match the current version of the electronic device, and the upgrade fails. The differential upgrade package is one of upgrade packages. The result is that the electronic device can only choose to upgrade the full version, which may overwrite many historical user data. In particular, if the current device does not support the full version upgrade, the device will never be upgraded in the future, which seriously affects the user experience.
本申请提供了一种软件升级方案,当出现上述升级失败现象时,基于软件包中的部分升级文件进行软件升级,这也是一种软件升级,这样至少 提升了基于升级包的部分升级成功率。且这种软件升级方法,当出现了如上所述差分升级包与当前设备版本不匹配时,既可以让电子设备保留的用户数据,也可以让电子设备当前版本升级成功,提升升级智能性及用户体验。The present application provides a software upgrade solution. When the above upgrade failure occurs, the software upgrade is performed based on a part of the upgrade files in the software package, which is also a software upgrade, so that at least Improved partial upgrade success rate based on upgrade package. And the software upgrade method, when the differential upgrade package does not match the current device version, the user data retained by the electronic device can be saved, and the current version of the electronic device can be upgraded successfully, thereby improving the upgrade intelligence and the user. Experience.
以下结合说明书附图及具体实施例对本发明的技术方案做进一步的详细阐述。The technical solutions of the present invention are further elaborated below in conjunction with the drawings and specific embodiments.
如图1所示,本实施例提供一种软件升级方法,所述方法包括:As shown in FIG. 1 , this embodiment provides a software upgrade method, where the method includes:
步骤S110:接收升级包;Step S110: receiving an upgrade package;
步骤S120:当无法基于所述M个升级文件进行软件升级时,基于N个通过文件正确性验证的所述升级文件进行软件升级;Step S120: When the software upgrade cannot be performed based on the M upgrade files, perform software upgrade based on the N upgrade files verified by file correctness;
其中,所述N为小于所述M的正整数。Wherein, the N is a positive integer smaller than the M.
在本实施例中,所述升级包可包括整体升级包和差分升级包。所述整体升级包可为升级版本应用的信息,根据完整升级包可以实现软件的整体升级和替换。所述差分升级包仅包括升级版本和当前版本的差异信息,基于所述差分升级包在软件升级时,仅进行部分升级替换。在本实施例中所述升级包优选为差分升级包。在步骤S110中可为客户端从服务器侧接收所述差分升级包等升级包。In this embodiment, the upgrade package may include an overall upgrade package and a differential upgrade package. The overall upgrade package may be information for the upgrade version application, and the overall upgrade and replacement of the software may be implemented according to the complete upgrade package. The differential upgrade package only includes difference information between the upgrade version and the current version, and only the partial upgrade replacement is performed when the software upgrade is performed based on the differential upgrade package. In the embodiment, the upgrade package is preferably a differential upgrade package. In step S110, the client may receive the upgrade package such as the differential upgrade package from the server side.
一个软件升级包共包括了M个升级文件,要求这M个升级文件均通过文件正确性验证的概率,显然低于仅要求M个中的N个升级文件通过文件正确性验证的概率。当无法基于软件升级包中的所有升级文件进行整体性软件升级时,基于所述升级包进行部分升级,也是实现了软件升级,显然至少提升了基于升级包的部分升级成功率。A software upgrade package includes a total of M upgrade files, and the probability that the M upgrade files are verified by the correctness of the files is obviously lower than the probability that only N of the M upgrade files are required to pass the correctness of the files. When the overall software upgrade cannot be performed based on all the upgrade files in the software upgrade package, the partial upgrade based on the upgrade package also implements the software upgrade, and obviously at least the partial upgrade success rate based on the upgrade package is improved.
所述升级包中不仅包括升级文件,还包括升级文件写入客户端的flash区域;本实施例中所述文件正确性验证包括:对需要升级的分区进行文件校验,采用现有的校验方法,制作升级包时需要压缩和进行数字签名,而 升级包下载到电子设备以后采用解压缩和对数字签名进行前述的文件验证。这里的升级包可包括OTA升级包,所述OTA为Over the Air Technology的缩写,对应的中文为空中下载技术。所述OTA升级包为利用空中下载技术下载的升级包。The upgrade package includes not only the upgrade file but also the upgrade file is written in the flash area of the client. The file correctness verification in the embodiment includes: performing file verification on the partition to be upgraded, and adopting the existing verification method. , need to compress and digitally sign the upgrade package, and After the upgrade package is downloaded to the electronic device, the above-mentioned file verification is performed by decompressing and digital signature. The upgrade package here may include an OTA upgrade package, the OTA is an abbreviation of Over the Air Technology, and the corresponding Chinese is an over-the-air download technology. The OTA upgrade package is an upgrade package downloaded by using an over-the-air download technology.
值得注意的所述文件正确性验证不局限于上述举例。在步骤S120可包括文件正确性验证的子步骤,所述文件正确性验证,可参见现有软件升级技术中对文件的文件正确性验证方法。It is worth noting that the document correctness verification is not limited to the above examples. In step S120, a sub-step of verifying the correctness of the file may be included. For the verification of the correctness of the file, refer to the method for verifying the correctness of the file in the existing software upgrade technology.
所述N个升级文件可包括以下至少两种:The N upgrade files may include at least two of the following:
第一种:The first:
所述升级包的升级文件包括普通升级文件和重要升级文件;所述N个升级文件为N个通过文件正确性验证的重要升级文件。The upgrade file of the upgrade package includes a normal upgrade file and an important upgrade file; the N upgrade files are N important upgrade files that are verified by the correctness of the file.
第二种:N个升级文件可为M个升级文件中通过文件正确性验证的所有升级文件。Second: N upgrade files can be all upgrade files verified by file correctness in M upgrade files.
针对于第一种:For the first one:
如图2所示,所述步骤S120可包括:As shown in FIG. 2, the step S120 may include:
步骤S121:确定所述升级包的重要升级文件;Step S121: determining an important upgrade file of the upgrade package;
步骤S122:确定所述重要升级文件的文件正确性的验证结果;Step S122: determining a verification result of the correctness of the file of the important upgrade file;
步骤S123:若所述验证结果表明所述重要升级文件通过所述文件正确性验证,基于N个通过文件正确性验证的所述升级文件升级软件;其中,所述N个通过文件正确性验证的所述升级文件至少包括所有的所述重要升级文件。Step S123: If the verification result indicates that the important upgrade file is verified by the correctness of the file, the upgrade file is upgraded based on the N correctness of the file verification; wherein the N are verified by the correctness of the file. The upgrade file includes at least all of the important upgrade files.
通常一个升级包中可包括多个待升级的文件,这些文件的升级重要性是不一样的。在本实施例中所述升级包中的升级文件可包括普通升级文件和重要升级文件。所述重要升级文件可是本次软件升级必须要升级的文件。Usually, an upgrade package can include multiple files to be upgraded, and the upgrade importance of these files is different. The upgrade file in the upgrade package in this embodiment may include a normal upgrade file and an important upgrade file. The important upgrade file may be a file that must be upgraded in this software upgrade.
在步骤S121将确定所述升级包的重要升级文件。所述步骤S121可为 基于用户指示确定的重要升级文件。The important upgrade file of the upgrade package will be determined in step S121. The step S121 can be Important upgrade files determined based on user instructions.
在步骤S122中将对所述升级包中的重要升级文件进行正确性验证,若正确性验证通过,则步骤S123Z中至少基于所述重要升级文件进行升级。这里,所述N个通过文件正确性验证的所述升级文件至少包括所有的重要升级文件,可理解为,若所述重要升级共包括P个文件,则所述N不小于所述P。In step S122, the important upgrade file in the upgrade package is verified for correctness. If the correctness verification is passed, the upgrade is performed based on at least the important upgrade file in step S123Z. Here, the N upgrade files verified by the correctness of the file include at least all the important upgrade files. It can be understood that if the important upgrade includes a total of P files, the N is not smaller than the P.
在步骤S123中至少基于所有重要升级文件进行软件升级,还可能基于所有重要性升级文件和部分普通升级文件进行所述软件升级。这样的话,不仅能够基于升级包中各个文件进行基于升级包的整体性升级,还能够基于升级包中的重要性升级文件,基于升级包的部分升级。这样的话,当某个普通升级文件的正确性验证出现错误时,依然进行重要性升级文件的升级,实现了升级的成功,从而提升了升级成功率。The software upgrade is performed based on at least all of the important upgrade files in step S123, and may also be performed based on all the importance upgrade files and some of the normal upgrade files. In this case, not only can the overall upgrade based on the upgrade package be performed based on each file in the upgrade package, but also the upgrade file based on the importance in the upgrade package, and the partial upgrade based on the upgrade package. In this case, when the correctness of the verification of a normal upgrade file is incorrect, the upgrade of the importance upgrade file is still performed, and the upgrade success is achieved, thereby improving the upgrade success rate.
如图3所示,所述S121可包括:As shown in FIG. 3, the S121 may include:
步骤S1201:接收所述升级包的下载描述符文件;Step S1201: Receive a download descriptor file of the upgrade package.
步骤S1202:基于所述下载描述符文件确定所述重要升级文件。Step S1202: Determine the important upgrade file based on the download descriptor file.
所述下载描述符文件,可简称为DD文件。所述DD为Download Descriptiion的缩写。所述DD文件还可包括升级包的文件大小、下载地址等信息。通常是进行客户端下载所述升级包之前下载的一个文件。在本实施例中将从DD文件中获取所述重要性升级文件,而不是从服务器发送的其他文件中发送的信息确定所述重要性文件,可以减少客户端与服务器之间的信息交互次数,降低信息交互负荷,同时降低客户端的功耗。The download descriptor file may be simply referred to as a DD file. The DD is an abbreviation of Download Descriptiion. The DD file may further include information such as a file size, a download address, and the like of the upgrade package. Usually it is a file that is downloaded before the client downloads the upgrade package. In this embodiment, the importance upgrade file is obtained from the DD file, instead of the information sent from other files sent by the server, the importance file is determined, and the number of information interactions between the client and the server can be reduced. Reduce the load of information interaction while reducing the power consumption of the client.
所述步骤S1202的实现方式有多种,以下提供两种可选方式:There are various implementations of the step S1202, and two alternative methods are provided below:
方式一:method one:
所述下载描述符文件包括所述升级包所有文件的文件名及所述文件对应的重要性等级; The download descriptor file includes a file name of all files of the upgrade package and an importance level corresponding to the file;
所述步骤S1202可包括:The step S1202 may include:
将所述重要性等级与等级阈值进行比较;Comparing the importance level to a level threshold;
基于所述比较的结果,确定所述重要升级文件。Based on the result of the comparison, the important upgrade file is determined.
这里的所述等级阈值可以为客户端基于用户输入指令形成的等级阈值,也可以为电子设备出厂前默认配置的等级阈值。The level threshold may be a level threshold formed by the client based on the user input instruction, or may be a level threshold configured by default before the electronic device leaves the factory.
若所述等级阈值越高,表示对应的升级文件的重要性越高,这样的话,若所述比较的结果表明,所述重要性等级不小于所述等级阈值时,该重要性等级对应的升级文件为所述重要升级文件。若所述等级阈值越低,表示对应的升级文件的重要性越高,这样的话,若所述比较的结果表明,所述重要性等级小于所述等级阈值时,该重要性等级对应的升级文件为所述重要升级文件。If the level threshold is higher, the importance of the corresponding upgrade file is higher. In this case, if the result of the comparison indicates that the importance level is not less than the level threshold, the importance level corresponds to the upgrade. The file is the important upgrade file. If the level threshold is lower, the importance of the corresponding upgrade file is higher. In this case, if the result of the comparison indicates that the importance level is less than the level threshold, the upgrade file corresponding to the importance level For the important upgrade file.
所述升级文件的重要性等级可以由服务器侧根据本次升级的升级目的及升级文件的升级功能来确定所述重要性等级。The importance level of the upgrade file may be determined by the server side according to the upgrade purpose of the upgrade and the upgrade function of the upgrade file.
方式二:Method 2:
所述下载描述符文件包括所述升级包中所述重要升级文件的文件名;The download descriptor file includes a file name of the important upgrade file in the upgrade package;
所述步骤S1202包括:The step S1202 includes:
提取所述下载描述符文件中所述重要升级文件的文件名,确定出所述重要升级文件。Extracting a file name of the important upgrade file in the download descriptor file to determine the important upgrade file.
在方式一中DD文件包括了升级包中所有文件的文件名和重要性等级,在本实施例中所述DD文件可以仅包括重要升级文件的文件名,这样的话,客户端直接根据DD文件中包括的文件名确定出哪些是重要升级文件。In the first mode, the DD file includes the file name and the importance level of all the files in the upgrade package. In this embodiment, the DD file may only include the file name of the important upgrade file, so that the client directly includes the file according to the DD file. The file name determines which are important upgrade files.
值得注意的是,方式一可以根据用户指令来设置等级阈值,方便用户参与控制确定重要升级文件,这样的话能够提高用户对升级的控制力度,而方式二的重要性文件的确定是由服务器侧控制的,但是实现方式更为简便。 It is worth noting that the first method can set the level threshold according to the user's instruction, so that the user can participate in the control to determine the important upgrade file, so that the user can control the upgrade, and the importance file of the second method is determined by the server side. , but the implementation is easier.
在具体的实现过程中,所述DD文件中还可包括各个升级文件的分区信息,该分区信息可用于进行所述文件正确验证。In a specific implementation process, the DD file may further include partition information of each upgrade file, and the partition information may be used to perform correct verification of the file.
本实施例所述方法还包括:The method in this embodiment further includes:
对所述升级包进行升级包正确性验证;Performing the correctness verification of the upgrade package for the upgrade package;
所述步骤S122可包括:The step S122 may include:
若所述升级包正确性验证不通过,确定所述重要升级文件的文件正确性验证的验证结果。If the verification of the correctness of the upgrade package fails, the verification result of the verification of the correctness of the file of the important upgrade file is determined.
此处的所述升级包正确性验证包括对所述升级包中所有升级文件的正确性验证,如普通升级文件的正确性验证和重要升级文件的正确性验证。The verification of the correctness of the upgrade package here includes verification of the correctness of all the upgrade files in the upgrade package, such as the verification of the correctness of the normal upgrade file and the verification of the correctness of the important upgrade file.
在本实施例中,所述软件升级方法,首先将进行升级包正确性验证,所述升级包正确性验证实质上是第一次正确性验证。若所述第一次正确性验证通过,表示整个升级包内所有文件都通过了正确性验证,显然可以基于整个升级包进行升级包中所有升级文件的升级,此时直接进行升级包中所有升级文件进行客户端的软件升级。此时,若升级包共包括M个升级文件;M为不小于1的整数,则客户端的软件升级M个文件,且升级的文件为软件升级包中升级文件。In this embodiment, the software upgrade method first performs the verification of the correctness of the upgrade package, and the verification of the correctness of the upgrade package is essentially the first correctness verification. If the first correctness verification is passed, it means that all the files in the entire upgrade package have passed the correctness verification. Obviously, all the upgrade files in the upgrade package can be upgraded based on the entire upgrade package. At this time, all the upgrades in the upgrade package are directly performed. The file is upgraded by the client software. At this time, if the upgrade package includes a total of M upgrade files; M is an integer of not less than 1, the client software upgrades M files, and the upgraded files are upgrade files in the software upgrade package.
当升级包正确性升级不通过,表示升级包中有部分升级文件的正确性无法通过,则此时,确定重要升级文件的文件正确性验证的验证结果。若重要升级文件的文件正确性验证通过,表明可以基于所述软件升级包进行部分升级。这样的话,若文件正确性验证不通过的原因是普通升级文件的正确性验证结果失败,显然依然能够进行客户端的软件升级,显然提升了软件升级的升级成功率,也避免了极端状况下软件不能升级的结果。When the correct upgrade of the upgrade package fails, it means that the correctness of some upgrade files in the upgrade package cannot be passed. At this time, the verification result of the correctness verification of the file of the important upgrade file is determined. If the correctness of the file verification of the important upgrade file is passed, it indicates that the software upgrade package can be partially upgraded. In this case, if the correctness of the file verification fails, the correct verification result of the normal upgrade file fails, and it is obvious that the software upgrade of the client can still be performed, which obviously improves the upgrade success rate of the software upgrade, and also avoids the software failure under extreme conditions. The result of the upgrade.
此外,所述若所述升级包正确性验证不通过,确定所述重要升级文件的文件正确性验证的验证结果,包括:基于所述升级包正确性验证的验证结果,获取所述重要升级文件的文件正确性的验证结果。 In addition, if the verification of the correctness of the upgrade package fails, the verification result of the verification of the correctness of the file of the important upgrade file is determined, including: obtaining the important upgrade file based on the verification result of the verification of the correctness of the upgrade package. The verification result of the correctness of the file.
对重要升级文件的文件正确性验证的验证结果,可以重新对所述重要性文件进行一次正确性验证,也可以基于升级包正确性验证的验证结果,确信出所述重要升级文件的验证结果。显然直接基于升级包正确性验证的验证结果来确定,可以必满重复验证,加速确定效率。The verification result of the correctness verification of the file of the important upgrade file may be re-authenticated for the importance file, or the verification result of the important upgrade file may be confirmed based on the verification result of the verification of the correctness of the upgrade package. Obviously, it is determined directly based on the verification result of the verification of the correctness of the upgrade package, and the verification may be repeated to speed up the determination of efficiency.
第二种:Second:
所述步骤S120可包括:The step S120 may include:
确定所述M个升级文件中文件正确性验证性通过的N个所述升级文件;Determining, by the N upgrade files, the correctness of the files in the M upgrade files;
基于通过所述文件正确性验证的N个升级文件,进行软件升级。The software upgrade is performed based on the N upgrade files verified by the correctness of the file.
本发明实施例提供了一种软件升级方法,可以基于升级包中的部分升级文件进行软件升级,部分升级也是一种升级成功率,显然就提升了升级成功率。The embodiment of the invention provides a software upgrade method, which can perform software upgrade based on a part of the upgrade file in the upgrade package, and the partial upgrade is also an upgrade success rate, which obviously improves the upgrade success rate.
装置实施例:Device embodiment:
如图4所示,本实施例提供一种软件升级装置,所述装置包括:As shown in FIG. 4, this embodiment provides a software upgrade apparatus, where the apparatus includes:
接收单元110,配置为接收升级包;其中,所述升级包共包括M个升级文件;所述M为不小于2的整数;The receiving unit 110 is configured to receive an upgrade package, where the upgrade package includes a total of M upgrade files; the M is an integer not less than 2;
升级单元120,配置为当无法基于所述M个升级文件进行软件升级时,基于N个通过文件正确性验证的所述升级文件进行软件升级;The upgrading unit 120 is configured to perform software upgrade based on the N upgrade files verified by file correctness when the software upgrade cannot be performed based on the M upgrade files;
其中,所述N为小于所述M的正整数。Wherein, the N is a positive integer smaller than the M.
本实施例所述接收单元110可包括通信接口,配置为从服务器等外设接收所述升级包。所述升级包可为前述方法实施例中所述的差分升级包,也可以是整体升级包。The receiving unit 110 in this embodiment may include a communication interface configured to receive the upgrade package from a peripheral device such as a server. The upgrade package may be the differential upgrade package described in the foregoing method embodiment, or may be an overall upgrade package.
所述升级单元120的具体结构可包括处理器或处理电路,所述处理器或处理电路能够用于软件升级处理等信息处理。所述处理器可包括客户端内的中央处理器CPU、微处理器MCU、数字信号处理器DSP或可编程阵 列PLC等处理器。所述处理电路可包括专用集成电路ASIC等。The specific structure of the upgrading unit 120 may include a processor or processing circuit that can be used for information processing such as software upgrade processing. The processor may include a central processing unit CPU, a microprocessor MCU, a digital signal processor DSP or a programmable array within the client Column PLC and other processors. The processing circuit can include an application specific integrated circuit ASIC or the like.
本实施例所述软件升级装置,打破现有技术中仅能基于升级包内的所有升级文件进行所有文件的升级,而本申请中将基于升级包内通过文件正确性验证的N个升级文件进行升级,这样通过部分升级,提高了升级成功率及升级智能性。The software upgrade device in this embodiment breaks all the files in the prior art based on all the upgrade files in the upgrade package, and the present application is based on the N upgrade files in the upgrade package that are verified by the correctness of the files. Upgrade, so through partial upgrades, improve the upgrade success rate and upgrade intelligence.
如图5所示,所述升级单元120,包括:As shown in FIG. 5, the upgrading unit 120 includes:
第一确定模块121,配置为确定所述升级包的重要升级文件;The first determining module 121 is configured to determine an important upgrade file of the upgrade package;
第二确定模块122,配置为确定所述重要升级文件的文件正确性的验证结果;The second determining module 122 is configured to determine a verification result of the correctness of the file of the important upgrade file;
升级模块123,配置为若所述验证结果表明所述重要升级文件通过所述文件正确性验证,基于N个通过文件正确性验证的所述升级文件升级软件;其中,所述N个通过文件正确性验证的所述升级文件至少包括所有的所述重要升级文件。The upgrade module 123 is configured to: if the verification result indicates that the important upgrade file is verified by the correctness of the file, upgrade the software based on the N upgrade files verified by the correctness of the file; wherein the N pass files are correct The upgrade file of the sexual verification includes at least all of the important upgrade files.
所述第一确定模块121结构有多种,可包括从外设接收信息确定出所述升级包中的所述重要升级文件,也可以包括信息解析器通过解析所述升级包本身确定出所述重要升级文件。The first determining module 121 has a plurality of structures, and may include receiving information from the peripheral device to determine the important upgrade file in the upgrade package, or may include the information parser determining the Important upgrade files.
所述第二确定模块122可包括进行信息验证的结构,可比较器或比较电路,通过比较匹配确定出所述软件包中重要升级文件的文件正确性验证。The second determining module 122 may include a structure for performing information verification, and the comparator or the comparing circuit determines the file correctness verification of the important upgrade file in the software package by comparing and matching.
所述升级模块123用于进行软件升级,具体结构可包括前述的处理器或处理电路。The upgrade module 123 is configured to perform software upgrade, and the specific structure may include the foregoing processor or processing circuit.
在本实施例中升级模块123进行升级时,至少基于升级包中所有的重要升级文件进行软件升级,当然也可以基于所有重要升级文件和部分普通升级文件进行软件升级。In the embodiment, when the upgrade module 123 is upgraded, the software upgrade is performed based on at least all the important upgrade files in the upgrade package. Of course, the software upgrade may be performed based on all the important upgrade files and some common upgrade files.
进一步地,所述第一确定模块121,配置为接收所述升级包的下载描述符文件;及基于所述下载描述符文件确定所述重要升级文件。 Further, the first determining module 121 is configured to receive a download descriptor file of the upgrade package; and determine the important upgrade file based on the download descriptor file.
所述第一确定模块121可包括通信接口和解析器,所述通信接口可用于接收所述下载描述符文件,所述解析器用于解析所述下载描述符文件确定出重要升级文件。在本实施例中所述升级包的DD文件携带指示重要升级文件的信息,简化了客户端确定重要升级文件的操作。The first determining module 121 may include a communication interface and a parser, where the communication interface is configured to receive the download descriptor file, and the parser is configured to parse the download descriptor file to determine an important upgrade file. In this embodiment, the DD file of the upgrade package carries information indicating the important upgrade file, which simplifies the operation of the client to determine the important upgrade file.
所述下载描述符文件包括所述升级包所有文件的文件名及所述文件对应的重要性等级;所述第一确定模块121,还配置为将所述重要性等级与等级阈值进行比较;及基于所述比较的结果,确定所述重要升级文件。The download descriptor file includes a file name of all files of the upgrade package and an importance level corresponding to the file; the first determining module 121 is further configured to compare the importance level with a level threshold; and Based on the result of the comparison, the important upgrade file is determined.
在本实施例中所述DD文件中包括重要性等级,所述第一确定模块121可包括比较器,通过比较重要性等级与等级阈值,能够得到比较结果,再基于比较结果确定出重要升级文件,这样基于比较结构的装置,能够基于用户指示的等级阈值或系统默认设置或基于历史升级记录确定策略动态确定的等级阈值,能够实现方便更好的控制基于升级包中部分升级文件的软件升级。In the embodiment, the DD file includes an importance level, and the first determining module 121 may include a comparator, and by comparing the importance level with the level threshold, the comparison result can be obtained, and the important upgrade file is determined based on the comparison result. Therefore, the device based on the comparison structure can realize the software upgrade based on the partial threshold of the upgrade package based on the level threshold or the system default setting indicated by the user or the level threshold dynamically determined based on the historical upgrade record.
值得注意的是:本发明实施例中利用本发明技术方案实现的部分升级,指的均是基于升级包中部分升级文件的软件升级;而整体升级指的是基于升级包中所有升级文件的软件升级。It is to be noted that the partial upgrades implemented by the technical solution of the present invention in the embodiments of the present invention refer to software upgrades based on partial upgrade files in the upgrade package; and the overall upgrade refers to software based on all upgrade files in the upgrade package. upgrade.
所述下载描述符文件包括所述升级包中所述重要升级文件的文件名;所述第一确定模块121,还配置为提取所述下载描述符文件中所述重要升级文件的文件名,确定出所述重要升级文件。本方案中的第一确定模块121可不同于前一方案中的第一确定模块121,本方案中第一确定模块121直接根据DD文件中记录的文件名,确认出所述重要升级文件。因为文件名被记录在所述DD文件中的升级文件均可视为重要升级文件。The download descriptor file includes a file name of the important upgrade file in the upgrade package, and the first determining module 121 is further configured to extract a file name of the important upgrade file in the download descriptor file, and determine Out of the important upgrade file. The first determining module 121 in the solution may be different from the first determining module 121 in the previous solution. In the present solution, the first determining module 121 directly confirms the important upgrade file according to the file name recorded in the DD file. An upgrade file whose file name is recorded in the DD file can be regarded as an important upgrade file.
在具体实现过程中,所述DD文件还可包括升级文件对应的分区信息,所述分区信息可用于文件正确性验证。In a specific implementation process, the DD file may further include partition information corresponding to the upgrade file, and the partition information may be used for file correctness verification.
此外,所述装置还包括:验证单元,配置为对所述升级包进行升级包 正确性验证;所述第二确定模块122,还配置为若所述升级包正确性验证不通过,确定所述重要升级文件的文件正确性验证的验证结果。在本实施例中所述验证单元会对升级包进行升级包正确性验证。升级包正确性验证通过表示升级包中所有文件都通过了文件正确性验证,通常此时可以直接基于升级包的所有升级文件进行整体升级,故无需升级模块123进行部分升级。故升级模块123是在升级包正确性验证不通过时,进行基于N个通过文件正确性验证的升级文件进行部分升级。In addition, the device further includes: a verification unit configured to upgrade the upgrade package The second verification module 122 is further configured to determine a verification result of the file correctness verification of the important upgrade file if the verification package correctness verification fails. In this embodiment, the verification unit performs an upgrade package correctness verification on the upgrade package. The verification of the correctness of the upgrade package indicates that all the files in the upgrade package have passed the correctness of the file. Generally, the upgrade can be performed based on all the upgrade files of the upgrade package. Therefore, the upgrade module 123 is not required to perform partial upgrade. Therefore, the upgrade module 123 performs partial upgrade based on the N upgrade files verified by the correctness of the file when the verification of the correctness of the upgrade package fails.
所述升级包正确性验证为对所述升级包中所有文件进行正确性验证;所述第二确定模块122,还配置为基于所述升级包正确性验证的验证结果,获取所述重要升级文件的文件正确性验证的验证结果。如何确定重要升级文件的文件正确性验证,所述第二确定模块122可以根据各种文件正确性验证算法,进行逐一验证,也可以基于所述升级包正确性验证结果来确定。在本实施例中所述第二确定模块122为基于升级包正确性验证的验证结果来确定各所述重要性升级文件的验证结果,这样实现更加简便。The correctness of the upgrade package is verified to verify the correctness of all the files in the upgrade package. The second determining module 122 is further configured to obtain the important upgrade file based on the verification result of the correctness verification of the upgrade package. The verification result of the correctness of the file verification. How to determine the file correctness verification of the important upgrade file, the second determining module 122 may perform one-by-one verification according to various file correctness verification algorithms, or may be determined based on the upgrade package correctness verification result. In the embodiment, the second determining module 122 determines the verification result of each of the importance upgrade files based on the verification result of the upgrade package correctness verification, which is more convenient.
进一步地,所述升级单元120,还配置为确定所述M个升级文件中文件正确性验证性通过的N个所述升级文件;及基于通过所述文件正确性验证的N个升级文件,进行软件升级。本实施例中N个升级文件可为通过文件正确性验证的N个升级文件,而不再区分是不是包括所有的重要性文件。这样的话,也至少能够对客户端中的软件进行部分升级。Further, the upgrading unit 120 is further configured to: determine, by the N upgrade files that are verified by the correctness of the files in the M upgrade files; and perform the N upgrade files that are verified by the correctness of the files. software upgrade. In this embodiment, the N upgrade files may be N upgrade files verified by file correctness, and it is no longer necessary to distinguish whether all the importance files are included. In this case, at least part of the software in the client can be upgraded.
总之本实施例中提供例一种软件升级装置,能够基于升级包内的部分升级文件进行软件升级,避免升级包只要有一个升级文件的文件正确性验证不通过时,就导致升级完全不能进行的现象,提高了升级成功率和升级智能性。In an embodiment, the software upgrade device is provided in the embodiment, and the software upgrade can be performed based on the partial upgrade file in the upgrade package, so as to prevent the upgrade package from failing to pass the correctness of the file of the upgrade file, the upgrade cannot be performed at all. Phenomenon, improved upgrade success rate and upgrade intelligence.
以下结合上述任意实施例,提供几个具体示例。Several specific examples are provided below in connection with any of the above embodiments.
示例一: Example 1:
如图5所示,本示例所述软件升级方法包括:As shown in FIG. 5, the software upgrade method described in this example includes:
S001:DM会话发起和服务器交互,本步骤的执行主体为客户端。S001: The DM session initiates and the server interacts. The execution body of this step is the client.
客户端发起FOTA升级,通过DM会话和服务器交互,查询服务器是否存在可用差分升级包。The client initiates a FOTA upgrade, and the DM session interacts with the server to query whether the server has a differential upgrade package available.
S002:判断服务器是否有可用差分升级包,若是,进入S003,若否,进入S015。S002: Determine whether the server has a differential upgrade package available. If yes, go to S003. If no, go to S015.
S003:下载DD文件,获取DD文件中差分升级包的瞎子地址。若服务器存在可用差分升级包,则服务器下发DD文件到客户端,该DD文件除了包含原有差分升级包大小、下载地址等信息外,还包含了该差分升级包升级文件的文件名称、所在分区信息及其重要性等级。S003: Download the DD file to obtain the dice address of the differential upgrade package in the DD file. If the server has a differential upgrade package, the server sends a DD file to the client. The DD file contains the information of the original differential upgrade package size and download address, and the file name and location of the differential upgrade package upgrade file. Partition information and its importance level.
S004:基于所述下载地址,下载差分升级包。S004: Download a differential upgrade package based on the download address.
S005:进行升级包完整性验证。通过升级包完整性验证可验证出所述升级包在传输的过程中是否出现数据丢失、误码以及被篡改等现象;具体可通过奇偶校验或MD5算法等校验算法,校验所述升级包的完整性。S005: Perform upgrade package integrity verification. Through the upgrade package integrity verification, it can be verified whether the upgrade package has data loss, bit error, and tampering during the transmission process; specifically, the upgrade can be verified by a checksum algorithm such as parity check or MD5 algorithm. The integrity of the package.
S005:客户端重启进入升级包正确性校验。在校验前客户端的升级代理通过DD中获取到该升级包即将更新的镜像或文件系统的文件名称、所在的分区信息,以及他们的重要性等级。S005: The client restarts to enter the upgrade package correctness check. Before the verification, the client's upgrade agent obtains the file name of the image or file system to be updated by the upgrade package, the partition information of the file, and their importance level.
S006:判断完整性验证是否通过,若是,进入S007,若否,进入S014。S006: Determine whether the integrity verification is passed. If yes, go to S007, if no, go to S014.
S007:获取DD文件包括的升级包内升级文件的文件名称、分区信息及重要性等级信息。所述分区信息表明的是软件中各文件的写入区域。S007: Obtain a file name, a partition information, and an importance level information of the upgrade file in the upgrade package included in the DD file. The partition information indicates the write area of each file in the software.
S008:对升级包内所有升级文件进行第一次正确性验证。此处的第一次正确性验证相当于前述实施例中的升级包正确性验证。S008: Perform the first correctness verification on all upgrade files in the upgrade package. The first correctness verification here is equivalent to the verification of the correctness of the upgrade package in the previous embodiment.
S009:判断第一次正确性验证是否通过,若是,进入S013;若否,进入S010。S009: Determine whether the first correctness verification is passed, and if yes, go to S013; if not, go to S010.
S010:根据S007获取的重要性等级确定出重要升级文件,对重要升级 文件进行第二次正确性验证。只对重要性等级在等级阈值及以上的内容所在分区再次进行校验,校验这部分分区的镜像和文件系统信息完全与制作该差分升级包版本的镜像和文件系统信息完全匹配。S010: Determine an important upgrade file according to the importance level obtained by S007, and upgrade the important upgrade. The file is verified for the second time. Only verify that the importance level is in the partition where the level threshold and above are located. Verify that the image and file system information of this part of the partition completely match the image and file system information of the version of the differential upgrade package.
S011:判断第二次正确性验证是否通过,若是,进入S012;若否,进入S014。S011: Determine whether the second correctness verification is passed, and if yes, go to S012; if not, go to S014.
S012:忽略其他部分的验证和升级,确定仅基于步骤S010验证通过的重要升级文件所在分区进行软件升级。这里相当于执行前述实施例中的部分升级。S012: Ignore the verification and upgrade of other parts, and determine that the software upgrade is performed based only on the partition where the important upgrade file passed in step S010 is verified. This is equivalent to performing a partial upgrade in the foregoing embodiment.
S013:升级软件,提示升级成功。S013: Upgrade the software, indicating that the upgrade is successful.
S014:提示升级失败。S014: The upgrade failed.
S015:提示无可用差分升级包。S015: Prompt that no differential upgrade package is available.
示例二:Example two:
如图6所示,本示例软件升级方法包括:As shown in Figure 6, the software upgrade method of this example includes:
S101:客户端检测服务器上存在可用升级包。S101: The client detects that an upgrade package is available on the server.
S102:下载DD文件,获取DD文件的信息内容,所述信息内容可包括升级包的大小及下载地址等信息;此外,还包括该可用升级包包括的升级文件的文件名称、分区信息及重要性等级。S102: Download a DD file, and obtain information content of the DD file, where the information content may include information such as an upgrade package size and a download address, and further include a file name, a partition information, and an importance of the upgrade file included in the available upgrade package. grade.
S103:下载升级后包,并验证升级包完整性。S103: Download the upgrade package and verify the integrity of the upgrade package.
S104:获取升级包包括的升级文件的文件名称、分区信息及重要性等级等信息。S104: Obtain information such as a file name, a partition information, and an importance level of the upgrade file included in the upgrade package.
S105:客户端重启进入第一次正确性验证。S105: The client restarts to enter the first correctness verification.
S106:验证发现客户端中的sb11.mbn文件与升级包中sb11.mbn文件不匹配,其他文件匹配。此时,表示第一次正确性验证失败。S106: The verification finds that the sb11.mbn file in the client does not match the sb11.mbn file in the upgrade package, and other files match. At this point, it indicates that the first correctness verification failed.
S107:进行第二次正确性验证。S107: Perform a second correctness verification.
S108:确定升级包包括的升级文件有NON-NLOS.bin和sb11.mbn,若 当前客户端指定的等级阈值为3,且判断出NON-HLOS.bin的重要性等级是否不小于3,sb11.mbn的重要性等级小于3;则仅对NON-HLOS.bin所在分区进行校验和升级,忽略sb11.mbn所在分区的校验和升级。当然在本示例中所述重要性等级越高表示升级重要性越高。S108: Determine that the upgrade file included in the upgrade package has NON-NLOS.bin and sb11.mbn, if The current client specifies a level threshold of 3, and determines whether the importance level of NON-HLOS.bin is not less than 3, and the importance level of sb11.mbn is less than 3; then only the partition where NON-HLOS.bin is located is verified. And upgrade, ignore the checksum upgrade of the partition where sb11.mbn is located. Of course, the higher the importance level in this example, the higher the importance of the upgrade.
值得注意的是:本发明实施例中所述的软件升级装置和客户端均对应于手机、网络电视、平板电脑或可穿戴式设备等终端设备,尤其是移动终端。所述软件升级装置甚至可为所述客户端的组成部分。总之,包括本实施例所述软件升级装置的客户端或终端,具有软件升级成功率高及升级智能性高的特点。It should be noted that the software upgrade device and the client described in the embodiments of the present invention all correspond to terminal devices such as mobile phones, network televisions, tablet computers, or wearable devices, especially mobile terminals. The software upgrade device can even be part of the client. In summary, the client or terminal including the software upgrade device in this embodiment has the characteristics of high software upgrade success rate and high upgrade intelligence.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the above integration The unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。One of ordinary skill in the art can understand that all or part of the steps of the above method embodiments are implemented. The foregoing may be completed by a program instruction related hardware, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes the steps of the foregoing method embodiment; and the foregoing storage medium includes: mobile storage A device that can store program code, such as a device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
相应地,本发明实施例还提供一种计算机存储介质,其中存储有计算机程序,该计算机程序用于执行本发明实施例的软件升级方法。Correspondingly, the embodiment of the present invention further provides a computer storage medium, wherein a computer program is stored, and the computer program is used to execute the software upgrade method of the embodiment of the present invention.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.
工业实用性Industrial applicability
本发明实施例的技术方案,在进行软件升级时,可以基于升级包中的部分通过文件正确性验证的升级文件进行软件升级,这样就可以很好的避免现有技术中个别升级文件的文件正确性验证不通过,导致整个软件都无法升级造成的升级失败的现象,从而提升了软件升级成功率。尤其适用于对于某些升级包内升级文件与客户端升级文件仅有微小差异码,不影响本次升级主要目的的软件升级。 In the technical solution of the embodiment of the present invention, when the software is upgraded, the software upgrade may be performed based on the upgrade file verified by the file correctness in the upgrade package, so that the files of the individual upgrade files in the prior art are well avoided. If the verification fails, the entire software cannot be upgraded and the upgrade fails. This improves the software upgrade success rate. It is especially suitable for software upgrades that have only minor differences between upgrade files and client upgrade files in some upgrade packages, and do not affect the main purpose of this upgrade.

Claims (17)

  1. 一种软件升级方法,所述方法包括:A software upgrade method, the method comprising:
    接收升级包;其中,所述升级包共包括M个升级文件;所述M为不小于2的整数;Receiving an upgrade package, where the upgrade package includes a total of M upgrade files; the M is an integer not less than 2;
    当无法基于所述M个升级文件进行软件升级时,基于N个通过文件正确性验证的所述升级文件进行软件升级;When the software upgrade cannot be performed based on the M upgrade files, the software upgrade is performed based on the N upgrade files verified by the file correctness;
    其中,所述N为小于所述M的正整数。Wherein, the N is a positive integer smaller than the M.
  2. 根据权利要求1所述的方法,其中,所述当无法基于所述M个升级文件进行软件升级时,基于N个通过文件正确性验证的所述升级文件进行软件升级,包括:The method according to claim 1, wherein when the software upgrade cannot be performed based on the M upgrade files, the software upgrade is performed based on the upgrade files that are verified by the file correctness, including:
    确定所述升级包的重要升级文件;Determining important upgrade files for the upgrade package;
    确定所述重要升级文件的文件正确性的验证结果;Determining the verification result of the correctness of the file of the important upgrade file;
    若所述验证结果表明所述重要升级文件通过所述文件正确性验证,基于N个通过文件正确性验证的所述升级文件升级软件;其中,所述N个通过文件正确性验证的所述升级文件至少包括所有的所述重要升级文件。If the verification result indicates that the important upgrade file is verified by the correctness of the file, the software is upgraded based on the N upgrade files verified by the correctness of the file; wherein the N upgrades are verified by the correctness of the file. The file includes at least all of the important upgrade files described.
  3. 根据权利要求2所述的方法,其中,所述确定所述升级包的重要升级文件,包括:The method of claim 2, wherein the determining the important upgrade file of the upgrade package comprises:
    接收所述升级包的下载描述符文件;Receiving a download descriptor file of the upgrade package;
    基于所述下载描述符文件确定所述重要升级文件。The important upgrade file is determined based on the download descriptor file.
  4. 根据权利要求3所述的方法,其中,所述下载描述符文件包括所述升级包所有文件的文件名及所述文件对应的重要性等级;The method according to claim 3, wherein said download descriptor file includes a file name of all files of said upgrade package and an importance level corresponding to said file;
    所述基于所述下载描述符文件确定所述重要升级文件,包括:Determining the important upgrade file based on the download descriptor file, including:
    将所述重要性等级与等级阈值进行比较;Comparing the importance level to a level threshold;
    基于所述比较的结果,确定所述重要升级文件。Based on the result of the comparison, the important upgrade file is determined.
  5. 根据权利要求3所述的方法,其中,所述下载描述符文件包括所述 升级包中所述重要升级文件的文件名;The method of claim 3 wherein said download descriptor file comprises said The file name of the important upgrade file described in the upgrade package;
    所述确定所述升级包的重要升级文件,包括:The determining the important upgrade file of the upgrade package includes:
    提取所述下载描述符文件中所述重要升级文件的文件名,确定出所述重要升级文件。Extracting a file name of the important upgrade file in the download descriptor file to determine the important upgrade file.
  6. 根据权利要求2所述的方法,其中,所述方法还包括:The method of claim 2, wherein the method further comprises:
    对所述升级包进行升级包正确性验证;Performing the correctness verification of the upgrade package for the upgrade package;
    所述确定所述重要升级文件的文件正确性的验证结果,包括:The verification result of determining the correctness of the file of the important upgrade file includes:
    若所述升级包正确性验证不通过,确定所述重要升级文件的文件正确性验证的验证结果。If the verification of the correctness of the upgrade package fails, the verification result of the verification of the correctness of the file of the important upgrade file is determined.
  7. 根据权利要求6所述的方法,其中,所述升级包正确性验证为对所述升级包中所有文件进行正确性验证;The method according to claim 6, wherein the upgrade package correctness is verified as correctness verification of all files in the upgrade package;
    所述若所述升级包正确性验证不通过,确定所述重要升级文件的文件正确性验证的验证结果,包括:If the verification of the correctness of the upgrade package fails, the verification result of the verification of the correctness of the file of the important upgrade file is determined, including:
    基于所述升级包正确性验证的验证结果,获取所述重要升级文件的文件正确性验证的验证结果。And obtaining, according to the verification result of the verification of the correctness of the upgrade package, the verification result of the verification of the correctness of the file of the important upgrade file.
  8. 根据权利要求1所述的方法,其中,所述当无法基于所述M个升级文件进行软件升级时,基于N个通过文件正确性验证的所述升级文件进行软件升级,包括:The method according to claim 1, wherein when the software upgrade cannot be performed based on the M upgrade files, the software upgrade is performed based on the upgrade files that are verified by the file correctness, including:
    确定所述M个升级文件中文件正确性验证性通过的N个所述升级文件;Determining, by the N upgrade files, the correctness of the files in the M upgrade files;
    基于通过所述文件正确性验证的N个升级文件,进行软件升级。The software upgrade is performed based on the N upgrade files verified by the correctness of the file.
  9. 一种软件升级装置,所述装置包括:A software upgrade device, the device comprising:
    接收单元,配置为接收升级包;其中,所述升级包共包括M个升级文件;所述M为不小于2的整数;a receiving unit, configured to receive an upgrade package, where the upgrade package includes a total of M upgrade files; the M is an integer not less than 2;
    升级单元,配置为当无法基于所述M个升级文件进行软件升级时,基 于N个通过文件正确性验证的所述升级文件进行软件升级;An upgrade unit configured to perform a software upgrade based on the M upgrade files, Performing software upgrades on the N upgrade files verified by file correctness;
    其中,所述N为小于所述M的正整数。Wherein, the N is a positive integer smaller than the M.
  10. 根据权利要求9所述的装置,其中,所述升级单元,包括:The apparatus according to claim 9, wherein the upgrading unit comprises:
    第一确定模块,配置为确定所述升级包的重要升级文件;a first determining module, configured to determine an important upgrade file of the upgrade package;
    第二确定模块,配置为确定所述重要升级文件的文件正确性的验证结果;a second determining module, configured to determine a verification result of the correctness of the file of the important upgrade file;
    升级模块,配置为若所述验证结果表明所述重要升级文件通过所述文件正确性验证,基于N个通过文件正确性验证的所述升级文件升级软件;其中,所述N个通过文件正确性验证的所述升级文件至少包括所有的所述重要升级文件。An upgrade module, configured to: if the verification result indicates that the important upgrade file is verified by the correctness of the file, upgrade software based on the N upgrade files verified by the correctness of the file; wherein the N pass file correctness The upgrade file verified includes at least all of the important upgrade files.
  11. 根据权利要求10所述的装置,其中,所述第一确定模块,配置为接收所述升级包的下载描述符文件;及基于所述下载描述符文件确定所述重要升级文件。The apparatus of claim 10, wherein the first determining module is configured to receive a download descriptor file of the upgrade package; and determine the important upgrade file based on the download descriptor file.
  12. 根据权利要求11所述的装置,其中,所述下载描述符文件包括所述升级包所有文件的文件名及所述文件对应的重要性等级;The device according to claim 11, wherein the download descriptor file includes a file name of all files of the upgrade package and an importance level corresponding to the file;
    所述第一确定模块,还配置为将所述重要性等级与等级阈值进行比较;及基于所述比较的结果,确定所述重要升级文件。The first determining module is further configured to compare the importance level with a level threshold; and determine the important upgrade file based on the result of the comparing.
  13. 根据权利要求11所述的装置,其中,所述下载描述符文件包括所述升级包中所述重要升级文件的文件名;The apparatus according to claim 11, wherein said download descriptor file includes a file name of said important upgrade file in said upgrade package;
    所述第一确定模块,还配置为提取所述下载描述符文件中所述重要升级文件的文件名,确定出所述重要升级文件。The first determining module is further configured to extract a file name of the important upgrade file in the download descriptor file, and determine the important upgrade file.
  14. 根据权利要求10所述的装置,其中,所述装置还包括:The device of claim 10, wherein the device further comprises:
    验证单元,配置为对所述升级包进行升级包正确性验证;a verification unit configured to verify the correctness of the upgrade package of the upgrade package;
    所述第二确定模块,还配置为若所述升级包正确性验证不通过,确定所述重要升级文件的文件正确性验证的验证结果。 The second determining module is further configured to: if the verification package correctness verification fails, determine a verification result of the file correctness verification of the important upgrade file.
  15. 根据权利要求14所述的装置,其中,所述升级包正确性验证为对所述升级包中所有文件进行正确性验证;The apparatus according to claim 14, wherein said upgrade package correctness is verified as correctness verification of all files in said upgrade package;
    所述第二确定模块,还配置为基于所述升级包正确性验证的验证结果,获取所述重要升级文件的文件正确性验证的验证结果。The second determining module is further configured to obtain a verification result of the file correctness verification of the important upgrade file based on the verification result of the upgrade package correctness verification.
  16. 根据权利要求9所述的装置,其中,所述升级单元,还配置为确定所述M个升级文件中文件正确性验证性通过的N个所述升级文件;及基于通过所述文件正确性验证的N个升级文件,进行软件升级。The apparatus according to claim 9, wherein the upgrading unit is further configured to determine N the upgrade files through which the file correctness verification is passed in the M upgrade files; and verifying by using the file correctness N upgrade files for software upgrades.
  17. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令配置为执行权利要求1-8任一项所述的软件升级方法。 A computer storage medium having stored therein computer executable instructions configured to perform the software upgrade method of any of claims 1-8.
PCT/CN2016/082118 2015-07-30 2016-05-13 Software upgrading method and apparatus, and computer storage medium WO2017016282A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510458577.1A CN106406922A (en) 2015-07-30 2015-07-30 Software upgrade method and device
CN201510458577.1 2015-07-30

Publications (1)

Publication Number Publication Date
WO2017016282A1 true WO2017016282A1 (en) 2017-02-02

Family

ID=57884078

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/082118 WO2017016282A1 (en) 2015-07-30 2016-05-13 Software upgrading method and apparatus, and computer storage medium

Country Status (2)

Country Link
CN (1) CN106406922A (en)
WO (1) WO2017016282A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122668A (en) * 2017-04-28 2017-09-01 环球智达科技(北京)有限公司 Firmware encrypting method
CN107122212A (en) * 2017-04-28 2017-09-01 环球智达科技(北京)有限公司 Firmware encrypting method
CN107391145A (en) * 2017-07-27 2017-11-24 中兴通讯股份有限公司 AKU preparation method and device, the method and device of upgrade file
TWI657676B (en) * 2017-11-09 2019-04-21 和碩聯合科技股份有限公司 Communicative device updating system
CN111176685A (en) * 2019-12-27 2020-05-19 深圳市优必选科技股份有限公司 Upgrading method and device
CN113157286A (en) * 2021-04-20 2021-07-23 深圳市优必选科技股份有限公司 System upgrading method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050102669A1 (en) * 2003-10-15 2005-05-12 Siemens Medical Solutions Usa, Inc. Software installation file verification media and methods for medical equipment
CN102622250A (en) * 2012-03-07 2012-08-01 四川长虹电器股份有限公司 Software upgrading method for set top box supporting multi-flash equipment
CN102830995A (en) * 2012-08-03 2012-12-19 广东欧珀移动通信有限公司 Method for upgrading Android platform software with user data reserved
CN103092634A (en) * 2011-10-31 2013-05-08 四川长虹电器股份有限公司 Set-top box software upgrading method for multiple flash devices
CN103577202A (en) * 2012-07-23 2014-02-12 深圳市中兴移动通信有限公司 Software upgrading method and system
CN104052818A (en) * 2014-06-27 2014-09-17 青岛海信移动通信技术股份有限公司 Version upgrade method and device for mobile terminal
CN104216736A (en) * 2014-08-14 2014-12-17 小米科技有限责任公司 Method and device for incremental upgrading and terminal device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050102669A1 (en) * 2003-10-15 2005-05-12 Siemens Medical Solutions Usa, Inc. Software installation file verification media and methods for medical equipment
CN103092634A (en) * 2011-10-31 2013-05-08 四川长虹电器股份有限公司 Set-top box software upgrading method for multiple flash devices
CN102622250A (en) * 2012-03-07 2012-08-01 四川长虹电器股份有限公司 Software upgrading method for set top box supporting multi-flash equipment
CN103577202A (en) * 2012-07-23 2014-02-12 深圳市中兴移动通信有限公司 Software upgrading method and system
CN102830995A (en) * 2012-08-03 2012-12-19 广东欧珀移动通信有限公司 Method for upgrading Android platform software with user data reserved
CN104052818A (en) * 2014-06-27 2014-09-17 青岛海信移动通信技术股份有限公司 Version upgrade method and device for mobile terminal
CN104216736A (en) * 2014-08-14 2014-12-17 小米科技有限责任公司 Method and device for incremental upgrading and terminal device

Also Published As

Publication number Publication date
CN106406922A (en) 2017-02-15

Similar Documents

Publication Publication Date Title
WO2017016282A1 (en) Software upgrading method and apparatus, and computer storage medium
CN106250192B (en) Software upgrading method and system of upper computer
WO2017067448A1 (en) Firmware-over-the-air upgrade method, system and computer storage medium
US9128878B2 (en) System and method for auto-failover and version matching of bootloader in an access controller
WO2019076037A1 (en) Firmware updating method and device
CN107179909A (en) Method for upgrading software, device and computer-readable recording medium
CN109964215B (en) Flow control in remote direct memory access data communications with ring buffer mirroring
CN107066300B (en) Firmware upgrading method of storage device and storage device
TWI533216B (en) Operating system updating method
WO2017161947A1 (en) Multi-system ota upgrade method and multi-system device
JP5039986B2 (en) Apparatus, method, data carrier and computer program for synchronizing controller firmware downloads
CN106572372A (en) Set-top box upgrading method and set-top box
US11977637B2 (en) Technique for authentication and prerequisite checks for software updates
US8544053B2 (en) System and method for upgrading a multiprocessor set-top box device with a monolithilic firmware image
US9519786B1 (en) Firmware integrity ensurance and update
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
US11886886B2 (en) System and method for runtime synchronization and authentication of pre-boot device drivers for a rescue operating system
WO2016062146A1 (en) Serial number information update method, device and terminal
CN110633092A (en) Server for OTA (over the air) upgrading and embedded equipment upgrading method and device
CN112286565A (en) Embedded system differential upgrading method based on storage container
CN111176685A (en) Upgrading method and device
WO2024041283A1 (en) Client upgrading method and apparatus, terminal device, and storage medium
US9792168B2 (en) System and method for cloud remediation of a client with a non-bootable storage medium
WO2019129271A1 (en) Method for electronic device authentication and firmware update, and electronic device
CN115879111A (en) Method, device and system for safe starting

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16829649

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16829649

Country of ref document: EP

Kind code of ref document: A1