Verification method, system and equipment for confirming OTA upgrading safety through file characteristic value

By calculating and comparing the characteristic values ​​of OTA upgrade files, we solve the problem that viruses or Trojans may be embedded in OTA upgrade files during the download process or the download is incomplete, thus ensuring the security and integrity of the upgrade files.

CN119336351APending Publication Date: 2025-01-21INSPUR FINANCIAL INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411367169.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, OTA upgrade files are easily embedded in viruses or Trojans during the download process, or the download is incomplete, resulting in the security and integrity of the upgrade being unable to be guaranteed.

Method used

Confirm the security of the OTA upgrade file by calculating the file characteristic value. The specific steps include extracting and calculating the key information of the upgrade file respectively at the publishing end and the terminal, using the MD5 algorithm to generate a 128-bit hash value as the unique characteristic value, and comparing it. to determine the integrity and security of the file.

Benefits of technology

Through the comparison of file characteristic values, it is ensured that the downloaded upgrade file is consistent with the original file, thereby ensuring the security and integrity of the OTA upgrade, thus preventing the intrusion of viruses or Trojans and the problem of incomplete downloads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336351A_ABST
    Figure CN119336351A_ABST
Patent Text Reader

Abstract

The invention discloses a verification method, system and device for confirming OTA upgrade safety through file feature values, and the method comprises the following steps: an upgrade file release step: releasing an OTA upgrade file, extracting key information in the upgrade file, calculating the key information to obtain a unique feature value of the corresponding file, and storing the unique feature value; a file acquisition step: the terminal acquires and downloads the OTA upgrading file; a feature value calculation step: extracting key information of the OTA upgrade file, and calculating the key information to obtain a unique feature value of the corresponding file; and a judgment step: comparing the unique characteristic value calculated in the step of releasing the lifting file with the unique characteristic value calculated in the step of calculating the characteristic value, if the two values are the same, carrying out an upgrading step, and if the two values are inconsistent, ending the process. The method can ensure that the obtained upgrading file is a correct version, thereby ensuring the upgrading safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of OTA upgrade, and in particular to a verification method, system and device for confirming the security of OTA upgrade through file feature values. Background Art

[0002] In recent years, with the development of science and technology, the types and quantity of terminal devices for various purposes, such as set-top boxes, new energy charging piles and mobile phones, have increased day by day. While enriching people's spiritual culture and improving people's life convenience, they have also adapted well to the rapid development trend of the Internet today.

[0003] At the same time, with the development of the times, terminal devices also need to continuously meet people's new needs within the permitted scope and provide more and better-quality functions. Therefore, it is necessary to reliably and stably iterate and upgrade the terminal device system. Therefore, most terminal devices need to be able to communicate with the service provider's central service to support remote OTA upgrades of the terminal device system. However, the actual network environment is more complex and dangerous. It often happens that the upgrade file is embedded with viruses or Trojans or the upgrade file is not downloaded completely, which affects the upgrade and use, and even causes greater harm and losses. Summary of the invention

[0004] The technical problem solved by the present invention is to provide a verification method for confirming the security of OTA upgrade through file feature values, which can ensure the security of OTA upgrade.

[0005] The technical solution adopted by the present invention to solve the technical problem is: a verification method for confirming the safety of OTA upgrade through file feature values, comprising the following steps:

[0006] Upgrade file publishing step: publish the OTA upgrade file, extract the key information in the upgrade file, calculate the key information to obtain the unique feature value of the corresponding file and save it;

[0007] File acquisition step: The terminal obtains the OTA upgrade file and downloads it;

[0008] Eigenvalue calculation step: extract key information of the OTA upgrade file, and calculate the key information to obtain a unique eigenvalue of the corresponding file;

[0009] Judgment step: compare the unique characteristic value calculated in the promotion and demotion file publishing step with the unique characteristic value calculated in the characteristic value calculation step. If the two values ​​are the same, perform the upgrade step. If they are inconsistent, the process ends.

[0010] Furthermore, in the judgment step, specifically:

[0011] The terminal uploads the calculated unique feature value to the upgrade file publishing end, and the publishing end compares the saved unique feature value with the received unique feature value calculated by the terminal, and returns the comparison result to the terminal;

[0012] The terminal receives the returned result. If the result is consistent, the formal upgrade begins and the update file is installed. If it is inconsistent, the process ends.

[0013] Furthermore, in the upgrade file publishing step, key information in the upgrade file is extracted, and the key information may be one or more of the file name, the file length, and the last modification time of the file.

[0014] Furthermore, in the upgrade file publishing step, the key information is calculated, specifically, the key information in the extracted upgrade file is calculated using the md5 algorithm, and a 128-bit hash value is generated, and the hash value is a unique characteristic value.

[0015] Furthermore, the key information in the upgrade file extracted in the upgrade file publishing step is consistent with the key information extraction position of the upgrade file extracted in the feature value calculation step;

[0016] The method for calculating the key information in the upgrade file publishing step is consistent with the method for calculating the key information in the characteristic value calculation step.

[0017] The present invention also discloses a verification system for confirming the safety of OTA upgrade through file characteristic values, including an upgrade file publishing module, a file acquisition module, a characteristic value calculation module and a judgment module;

[0018] The upgrade file publishing module is used to publish the OTA upgrade file, extract key information from the upgrade file, calculate the key information to obtain the unique feature value of the corresponding file and save it;

[0019] The file acquisition module is used for the terminal to obtain and download OTA upgrade files;

[0020] The characteristic value calculation module is used to extract key information of the OTA upgrade file and calculate the key information to obtain a unique characteristic value of the corresponding file;

[0021] The judgment module is used to compare the unique characteristic value calculated in the promotion file publishing step with the unique characteristic value calculated in the characteristic value calculation step. If the two values ​​are the same, the upgrading step is performed; if they are inconsistent, the process ends.

[0022] Furthermore, in the judgment module, specifically:

[0023] The terminal uploads the calculated unique feature value to the upgrade file publishing end, and the publishing end compares the saved unique feature value with the received unique feature value calculated by the terminal, and returns the comparison result to the terminal;

[0024] The terminal receives the returned result. If the result is consistent, the formal upgrade begins and the update file is installed. If it is inconsistent, the process ends.

[0025] Furthermore, in the upgrade file publishing module, key information in the upgrade file is extracted, and the key information may be one or more of the file name, the file length, and the last modification time of the file;

[0026] The upgrade file publishing module calculates the key information, specifically: uses the md5 algorithm to calculate the key information in the extracted upgrade file, and generates a 128-bit hash value, which is a unique feature value.

[0027] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned verification method for confirming the security of OTA upgrade through file feature values ​​are implemented.

[0028] The present invention also discloses a computer device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein:

[0029] The memory is used to store computer programs;

[0030] The processor is used to execute the steps of the above-mentioned verification method for confirming the safety of OTA upgrade through file feature values ​​by running the program stored in the memory.

[0031] The beneficial effect of the present invention is that after downloading the upgrade file, the method compares the downloaded upgrade file with the original upgrade file by calculating the characteristic value, and then compares the integrity and security of the downloaded upgrade file, thereby ensuring that the obtained upgrade file is the correct version, thereby ensuring the safety of the upgrade. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A flowchart of a verification method for confirming OTA upgrade security through file feature values ​​according to an embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0034] like Figure 1 As shown, the embodiment of the present application discloses a verification method for confirming the security of OTA upgrade through file feature values, comprising the following steps:

[0035] Upgrade file publishing step: publish the OTA upgrade file, extract the key information in the upgrade file, calculate the key information to obtain the unique feature value of the corresponding file and save it;

[0036] File acquisition step: The terminal obtains the OTA upgrade file and downloads it;

[0037] Eigenvalue calculation step: extract key information of the OTA upgrade file, and calculate the key information to obtain a unique eigenvalue of the corresponding file;

[0038] Judgment step: compare the unique characteristic value calculated in the promotion and demotion file publishing step with the unique characteristic value calculated in the characteristic value calculation step. If the two values ​​are the same, perform the upgrade step. If they are inconsistent, the process ends.

[0039] Specifically, it needs to be explained that OTA refers to over-the-air download technology, that is, downloading data through wireless transmission.

[0040] Specifically, the method includes an upgrade file publishing end and a terminal for receiving the upgrade file. The terminal can download the upgrade file from the publishing end for its own upgrade use.

[0041] Specifically, the judging step includes:

[0042] The terminal uploads the calculated unique feature value to the upgrade file publishing end, and the publishing end compares the saved unique feature value with the received unique feature value calculated by the terminal, and returns the comparison result to the terminal;

[0043] The terminal receives the returned result. If the result is consistent, the formal upgrade begins and the update file is installed. If it is inconsistent, the process ends.

[0044] In this step, the unique feature values ​​of the upgrade files before and after receiving are calculated respectively. If the files before and after receiving are the same, the unique feature values ​​calculated twice should be the same. If a file error occurs during the receiving process, the unique feature value calculated for the upgrade file after receiving will be different from the original one.

[0045] Therefore, after downloading the upgrade file, this method compares the downloaded upgrade file with the original upgrade file by calculating the characteristic value, and then compares the integrity and security of the downloaded upgrade file to ensure that the obtained upgrade file is the correct version, thereby ensuring the safety of the upgrade.

[0046] In this embodiment, in the upgrade file publishing step, key information in the upgrade file is extracted, and the key information may be one or more of the file name, the file length, and the last modification time of the file.

[0047] Specifically, in order to ensure the accuracy of the detection, multiple key information such as the file name, file length, and the last modification time of the file can be extracted at the same time, and then the above key information can be calculated by a corresponding calculation method to obtain a unique feature value.

[0048] Specifically, the unique characteristic value can be calculated in various ways, such as converting the key information into numbers, and then converting each number into a unique characteristic value through a certain mathematical calculation method.

[0049] In this method, the key information is calculated in the upgrade file publishing step, specifically: the key information in the extracted upgrade file is calculated using the md5 algorithm, and a 128-bit hash value is generated, and the hash value is a unique characteristic value.

[0050] It should be explained that the above-mentioned md5 algorithm is Message-DigestAlgorithm 5, which is used to ensure the integrity and consistency of information transmission. It is one of the hash algorithms (also translated as digest algorithm, hash algorithm) widely used in computers, and MD5 is generally implemented in mainstream programming languages. The basic principle of the hash algorithm is to calculate data (such as Chinese characters) into another fixed length value.

[0051] Therefore, the MD5 algorithm can be used to generate a unique hash value based on the corresponding information, reducing the possibility of different files generating the same unique characteristic value.

[0052] In this embodiment, the key information in the upgrade file extracted in the upgrade file publishing step is extracted from the same position as the key information in the upgrade file extracted in the feature value calculation step;

[0053] The method for calculating the key information in the upgrade file publishing step is consistent with the method for calculating the key information in the characteristic value calculation step.

[0054] In this method, when verifying the downloaded upgrade file, the same key information extraction method and the same key information calculation method are used, so as to ensure that when the upgrade file is not damaged, the calculated unique characteristic value must be the same, thereby ensuring the accuracy of the judgment on the security of the upgrade file.

[0055] The following is a specific embodiment of the present application:

[0056] It is set that a certain model A smart set-top box plans to carry out a small-scale upgrade of the new version of the ROM system to test the support of the new high-definition player function and improve the user viewing experience. The upgrade range is the current version 1.1, and the usage type is the established scope of the test.

[0057] The central upgrade system first publishes the OTA upgrade file, and uses the MD5 algorithm to calculate and save the feature values ​​of the upgrade file attributes, such as file name, file length, and the last modification time of the file. After the terminal device obtains the OTA upgrade information, it starts to download the upgrade file. After the download is complete, the upgrade file attributes are extracted in the same way, and the MD5 algorithm is used to calculate the feature value. Then the terminal initiates a request to the central upgrade system and reports the obtained feature value. The central service upgrade system verifies the feature value of the file reported by the terminal with the feature value saved at the time of release, and returns the verification result to the terminal. If the verification is consistent, the formal upgrade begins, the update upgrade file is installed, the ROM system is updated, and the final upgrade is completed. If the results are inconsistent, the upgrade is terminated.

[0058] This method can ensure the security of the upgrade and thus improve the user experience.

[0059] The present invention also discloses a verification system for confirming the safety of OTA upgrade through file characteristic values, including an upgrade file publishing module, a file acquisition module, a characteristic value calculation module and a judgment module;

[0060] The upgrade file publishing module is used to publish the OTA upgrade file, extract key information from the upgrade file, calculate the key information to obtain the unique feature value of the corresponding file and save it;

[0061] The file acquisition module is used for the terminal to obtain and download OTA upgrade files;

[0062] The characteristic value calculation module is used to extract key information of the OTA upgrade file and calculate the key information to obtain a unique characteristic value of the corresponding file;

[0063] The judgment module is used to compare the unique characteristic value calculated in the promotion file publishing step with the unique characteristic value calculated in the characteristic value calculation step. If the two values ​​are the same, the upgrading step is performed; if they are inconsistent, the process ends.

[0064] Specifically, in the judgment module, specifically:

[0065] The terminal uploads the calculated unique feature value to the upgrade file publishing end, and the publishing end compares the saved unique feature value with the received unique feature value calculated by the terminal, and returns the comparison result to the terminal;

[0066] The terminal receives the returned result. If the result is consistent, the formal upgrade begins and the update file is installed. If it is inconsistent, the process ends.

[0067] Specifically, in the upgrade file publishing module, key information in the upgrade file is extracted, and the key information may be one or more of the file name, the file length, and the last modification time of the file;

[0068] The upgrade file publishing module calculates the key information, specifically: uses the md5 algorithm to calculate the key information in the extracted upgrade file, and generates a 128-bit hash value, which is a unique feature value.

[0069] The system compares the downloaded upgrade file with the original upgrade file by calculating the characteristic value, and then compares the integrity and security of the downloaded upgrade file to ensure that the obtained upgrade file is the correct version, thereby ensuring the safety of the upgrade.

[0070] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned verification method for confirming the security of OTA upgrade through file feature values ​​are implemented.

[0071] In addition, the computer-readable storage medium of this embodiment may adopt any combination of one or more computer-readable storage media, wherein the computer-readable storage medium includes electrical, optical, electromagnetic, infrared or semiconductor systems, devices or components, or any combination thereof.

[0072] The present invention also discloses a computer device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein:

[0073] The memory is used to store computer programs;

[0074] The processor is used to execute the steps of the above-mentioned verification method for confirming the safety of OTA upgrade through file feature values ​​by running the program stored in the memory.

[0075] As an embodiment of the present invention, the communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.

[0076] As an implementation mode of the present invention, the communication interface is used for communication between the above-mentioned terminal and other devices.

[0077] As an embodiment of the present invention, the memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0078] As an embodiment of the present invention, the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0079] Different from the existing technology, after downloading the upgrade file, this method compares the downloaded upgrade file with the original upgrade file by calculating the characteristic value, and then compares the integrity and security of the downloaded upgrade file, so as to ensure that the obtained upgrade file is the correct version, thereby ensuring the safety of the upgrade.

[0080] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A verification method for confirming the safety of OTA upgrade through file feature values, characterized in that: The steps include: Upgrade file publishing step: publish the OTA upgrade file, extract the key information in the upgrade file, calculate the key information to obtain the unique feature value of the corresponding file and save it; File acquisition step: The terminal obtains the OTA upgrade file and downloads it; Eigenvalue calculation step: extract key information of the OTA upgrade file, and calculate the key information to obtain a unique eigenvalue of the corresponding file; Judgment step: compare the unique characteristic value calculated in the promotion and demotion file publishing step with the unique characteristic value calculated in the characteristic value calculation step. If the two values ​​are the same, perform the upgrade step. If they are inconsistent, the process ends.

2. The verification method for confirming OTA upgrade security through file feature values ​​according to claim 1, characterized in that: The judging step specifically includes: The terminal uploads the calculated unique feature value to the upgrade file publishing end, and the publishing end compares the saved unique feature value with the received unique feature value calculated by the terminal, and returns the comparison result to the terminal; The terminal receives the returned result. If the result is consistent, the formal upgrade begins and the update file is installed. If it is inconsistent, the process ends.

3. The verification method for confirming OTA upgrade security through file feature values ​​as claimed in claim 1, characterized in that: In the upgrade file publishing step, key information in the upgrade file is extracted, and the key information may be one or more of the file name, the file length, and the last modification time of the file.

4. The verification method for confirming OTA upgrade security through file feature values ​​as claimed in claim 1, characterized in that: In the upgrade file publishing step, the key information is calculated, specifically: the key information in the extracted upgrade file is calculated using the md5 algorithm, and a 128-bit hash value is generated, and the hash value is a unique characteristic value.

5. The verification method for confirming OTA upgrade security through file feature values ​​as claimed in claim 1, characterized in that: The key information in the upgrade file extracted in the upgrade file publishing step is consistent with the key information extraction position of the upgrade file extracted in the eigenvalue calculation step; The method for calculating the key information in the upgrade file publishing step is consistent with the method for calculating the key information in the characteristic value calculation step.

6. A verification system for confirming the safety of OTA upgrades through file feature values, characterized in that: It includes an upgrade file publishing module, a file acquisition module, a feature value calculation module and a judgment module; The upgrade file publishing module is used to publish the OTA upgrade file, extract key information from the upgrade file, calculate the key information to obtain the unique feature value of the corresponding file and save it; The file acquisition module is used for the terminal to obtain and download OTA upgrade files; The characteristic value calculation module is used to extract key information of the OTA upgrade file and calculate the key information to obtain a unique characteristic value of the corresponding file; The judgment module is used to compare the unique characteristic value calculated in the promotion file publishing step with the unique characteristic value calculated in the characteristic value calculation step. If the two values ​​are the same, the upgrading step is performed; if they are inconsistent, the process ends.

7. The verification system for confirming OTA upgrade security through file feature values ​​as claimed in claim 6, characterized in that: The judgment module specifically includes: The terminal uploads the calculated unique feature value to the upgrade file publishing end, and the publishing end compares the saved unique feature value with the received unique feature value calculated by the terminal, and returns the comparison result to the terminal; The terminal receives the returned result. If the result is consistent, the formal upgrade begins and the update file is installed. If it is inconsistent, the process ends.

8. The verification system for confirming OTA upgrade security through file feature values ​​as claimed in claim 7, characterized in that: In the upgrade file publishing module, key information in the upgrade file is extracted, and the key information may be one or more of the file name, the file length, and the last modification time of the file; The upgrade file publishing module calculates the key information, specifically: uses the md5 algorithm to calculate the key information in the extracted upgrade file and generates a 128-bit hash value, which is a unique feature value.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the verification method for confirming the security of OTA upgrade through file feature values ​​described in any one of claims 1 to 5 are implemented.

10. A computer device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is used to execute the steps of the verification method for confirming OTA upgrade security through file feature values ​​according to any one of claims 1 to 5 by running the program stored in the memory.