A version upgrading method, server, terminal and computer readable storage medium

CN122431704APending Publication Date: 2026-07-21SHENZHEN XINGUODU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN XINGUODU TECH
Filing Date
2025-01-14
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, a large amount of redundant data needs to be transmitted during the terminal system version upgrade process, resulting in low upgrade efficiency.

Method used

By obtaining the differences between the current version image and the upgraded version image of the terminal, a patch file is generated, and the patch file and signature information are pushed for verification to ensure the security and integrity of the image.

Benefits of technology

This reduces the amount of data transmitted, improves upgrade efficiency, ensures the security and reliability of the upgrade process, and reduces the risk of malicious tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122431704A_ABST
    Figure CN122431704A_ABST
Patent Text Reader

Abstract

The application discloses a version upgrade method, a server, a terminal and a computer readable storage medium, which are used for reducing the amount of data transmission and improving the version upgrade efficiency of the terminal. The method of the embodiment of the application comprises the following steps: acquiring a first version image and a second version image, wherein the first version image is a current version image of a terminal, and the second version image is a version image after the first version image is upgraded; generating a patch file according to the difference information of the first version image and the second version image; and pushing the patch file and signature information of the second version image to the terminal, wherein the terminal stores verification information, and the verification information is used for verifying the signature information of the second version image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of equipment upgrade technology, and in particular to a version upgrade method, server, terminal and computer-readable storage medium. Background Technology

[0002] Terminal system upgrades typically involve assessing the existing system version and its functional requirements, downloading and installing the latest operating system, backing up important data to prevent loss, rebooting the device to complete the update, and finally checking the compatibility and performance optimizations of the new system. Through system upgrades, users can obtain better security, new features, and a smoother user experience.

[0003] In existing technologies, the common upgrade method for terminal system versions is OTA (Over-The-Air) upgrade. During the upgrade process, the server uses a differential algorithm to compare the current version image of the terminal with the target version image (i.e., the image of the version the terminal is upgrading to). This results in a differential image, which is then pushed to the terminal, allowing the terminal to perform a system upgrade. However, in addition to the necessary difference files between the two versions, the differential image contains a large amount of redundant data. This necessitates the transmission of a significant amount of data during the upgrade process, thus impacting the efficiency of the terminal's version upgrade. Summary of the Invention

[0004] This application provides a version upgrade method, server, terminal, and computer-readable storage medium, which can reduce the amount of data transmitted, thereby improving the efficiency of terminal version upgrades.

[0005] The first aspect of this application provides a version upgrade method applied to a server, the method comprising:

[0006] Obtain the first version image and the second version image. The first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image.

[0007] Based on the differences between the first version image and the second version image, a patch file is generated;

[0008] The patch file and the signature information of the second version image are pushed to the terminal, wherein the terminal stores verification information, which is used to verify the signature information of the second version image.

[0009] Optionally, the method further includes:

[0010] The verification information is pushed to the terminal so that the terminal saves the verification information.

[0011] Optionally, pushing the patch file and the signature information of the second version image to the terminal includes:

[0012] Retrieve the private key from the preset public-private key pair;

[0013] The signature information of the second version image is encrypted using the private key to obtain encrypted signature information;

[0014] The patch file and the encrypted signature information are pushed to the terminal, wherein the terminal stores the public key of the preset public-private key pair.

[0015] Optionally, the method further includes:

[0016] The public key of the preset public-private key pair is pushed to the terminal so that the terminal can save the public key of the preset public-private key pair.

[0017] A second aspect of this application provides a version upgrade method applied to a terminal, the method comprising:

[0018] Obtain the patch file pushed by the server and the signature information of the second version image. The patch file is a patch file generated by the server based on the difference information between the first version image and the second version image. The first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image.

[0019] Retrieve saved verification information;

[0020] The signature information of the second version image is verified using the verification information.

[0021] If the verification is successful, the first version image is upgraded using the patch file to obtain the second version image.

[0022] Optionally, before verifying the signature information of the second version image using the verification information, the method further includes:

[0023] Remove the signature information from the first version image.

[0024] Optionally, after upgrading the first version image using the patch file to obtain the second version image, the method further includes:

[0025] Add the signature information of the second version image to the second version image.

[0026] A third aspect of this application provides a server, including:

[0027] The acquisition unit is used to acquire a first version image and a second version image, wherein the first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image;

[0028] The generation unit is used to generate patch files based on the differences between the first version image and the second version image;

[0029] The first push unit is used to push the patch file and the signature information of the second version image to the terminal, wherein the terminal stores verification information, which is used to verify the signature information of the second version image.

[0030] Optionally, the server further includes:

[0031] The second push unit is used to push the verification information to the terminal so that the terminal can save the verification information.

[0032] Optionally, the first push unit includes:

[0033] The acquisition module is used to acquire the private key from a preset public-private key pair;

[0034] An encryption module is used to encrypt the signature information of the second version image using the private key to obtain encrypted signature information;

[0035] The first push module is used to push the patch file and the encrypted signature information to the terminal, wherein the terminal stores the public key of the preset public-private key pair.

[0036] Optionally, the first push unit further includes:

[0037] The second push unit is used to push the public key of the preset public-private key pair to the terminal, so that the terminal can save the public key of the preset public-private key pair.

[0038] A fourth aspect of this application provides a server, including:

[0039] Processor, memory, input / output units, and bus;

[0040] The processor is connected to the memory, the input / output unit, and the bus;

[0041] The memory stores a program, and the processor calls the program to execute the method of the first aspect and any possible implementation of the first aspect.

[0042] A fifth aspect of this application provides a terminal, including:

[0043] The acquisition unit is used to acquire the patch file pushed by the server and the signature information of the second version image. The patch file is a patch file generated by the server based on the difference information between the acquired first version image and the second version image. The first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image.

[0044] The calling unit is used to retrieve the saved verification information;

[0045] The verification unit is used to verify the signature information of the second version image using the verification information;

[0046] The upgrade unit is used to upgrade the first version image to the second version image by means of the patch file when the verification is successful.

[0047] Optionally, the terminal further includes:

[0048] The clearing unit is used to clear the signature information of the first version image.

[0049] Optionally, the terminal further includes:

[0050] An adding unit is used to add the signature information of the second version image to the second version image. A sixth aspect of this application provides a terminal, including:

[0051] Processor, memory, input / output units, and bus;

[0052] The processor is connected to the memory, the input / output unit, and the bus;

[0053] The memory stores a program, and the processor calls the program to execute the method of the second aspect and any possible implementation of the second aspect.

[0054] A seventh aspect of this application provides a computer-readable storage medium storing a program that, when executed on a computer, causes the computer to perform the methods of the first aspect and any possible implementation thereof, and the second aspect and any possible implementation thereof.

[0055] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0056] In this embodiment, by acquiring two version images and generating patch files, the server can efficiently push the differences to the terminal, reducing the burden of image transmission and thus reducing the amount of data that needs to be transmitted, which is beneficial to improving the upgrade efficiency of the terminal. Simultaneously, pushing and verifying signature information ensures the security and reliability of the update process, reducing the risk caused by malicious tampering. Attached Figure Description

[0057] Figure 1 This is a flowchart illustrating one embodiment of the version upgrade method in this application.

[0058] Figure 2 This is a flowchart illustrating one embodiment of pushing verification information to the terminal in this application.

[0059] Figure 3 This is a flowchart illustrating one embodiment of pushing patch files and signature information of a second version image to a terminal in this application.

[0060] Figure 4 This is a flowchart illustrating another embodiment of the version upgrade method in this application.

[0061] Figure 5 This is a schematic diagram of the structure of one embodiment of the server in this application;

[0062] Figure 6 This is a schematic diagram of another embodiment of the server in this application.

[0063] Figure 7 This is a schematic diagram of the structure of one embodiment of the terminal in this application;

[0064] Figure 8 This is a schematic diagram of another embodiment of the terminal in this application. Detailed Implementation

[0065] This application provides a version upgrade method, server, terminal, and computer-readable storage medium to reduce the amount of data transmitted, thereby improving the upgrade efficiency of the terminal.

[0066] The embodiments of this application will now be described with reference to the accompanying drawings.

[0067] Please see Figure 1 One embodiment of the version upgrade method applied to the server in this application includes:

[0068] 101. Obtain the first version image and the second version image. The first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image.

[0069] The server first needs to acquire two versions of the image: a first-version image and a second-version image. The first-version image is the one currently running on the terminal, representing the terminal's current operating system or application version. The second-version image is the upgraded version of the first-version image, typically including patched vulnerabilities, new features, or other updates. The server can obtain these images from local storage or a remote source, ensuring the integrity and correctness of the image files. By acquiring these two images, the server can determine the terminal's current system state and the target state after the upgrade, providing a foundation for subsequent steps such as difference comparison and patch generation.

[0070] 102. Generate patch files based on the differences between the first and second version images;

[0071] The server analyzes the differences between the first and second version images by comparing them. These differences may include changes in file content, additions, deletions, or modifications, and may even include changes to configurations or dependencies. The server generates a patch file based on these differences. This patch file only contains information about the changes between the first and second version images, not the entire image content. Therefore, transferring the patch file is more efficient than transferring the complete image, saving bandwidth and storage space. The process of generating the patch file needs to ensure the accuracy of the difference comparison so that the generated patch can be correctly applied to the first version image on the terminal, ensuring a seamless transition from the updated image to the second version image.

[0072] 103. Push the patch file and the signature information of the second version image to the terminal. The terminal stores the verification information, which is used to verify the signature information of the second version image.

[0073] After generating the patch file, the server pushes the patch file and the signature information of the second-version image to the terminal. The terminal typically has pre-stored verification information to verify the signature of the second-version image, ensuring the image has not been tampered with. The signature information pushed by the server contains the digital signature of the second-version image. Upon receiving this signature information, the terminal can verify the signature against its locally stored verification information. The verification process usually uses a public-key algorithm to check the integrity and authenticity of the image file, ensuring the second-version image has not been maliciously modified. This process ensures the security and trustworthiness of the image, avoiding security issues caused by image tampering.

[0074] In this embodiment, by acquiring two versions of the image and generating patch files, the server can efficiently push the differences to the terminal, reducing the burden of image transmission and thus reducing the amount of data that needs to be transmitted, which is beneficial to improving the upgrade efficiency of the terminal. Simultaneously, pushing and verifying signature information ensures the security and reliability of the update process, reducing the risk caused by malicious tampering.

[0075] Please see Figure 2 In some embodiments of this application, before step 103 of the above embodiments pushes the patch file and the signature information of the second version image to the terminal, the version upgrade method of this application may further include the following steps:

[0076] 201. Push verification information to the terminal so that the terminal can save the verification information.

[0077] The server needs to push verification information to the terminal. This operation ensures that the terminal can use this verification information to verify the signature's correctness after subsequently receiving the signature information for the second-version image. The verification information typically includes the public key, certificate chain, or other related encrypted data used to verify the digital signature. This verification information helps the terminal determine whether the image is genuine and has not been tampered with after receiving the image's signature. During the process of pushing the verification information, the server needs to ensure that the terminal can correctly receive and save this information, usually storing it in a secure storage area of ​​the system for later use during signature verification. This step ensures that the terminal has the ability to verify the signature of the second-version image, thereby improving system security.

[0078] In this embodiment, by pushing verification information in advance, the server provides the terminal with the necessary tools and data, enabling the terminal to securely verify the image signature upon receiving the second version image. This step enhances system security, ensuring that only verified images can be used during version upgrades, thereby reducing the risk of malicious tampering.

[0079] Please see Figure 3 In some embodiments of this application, step 103 in the above embodiments, which pushes the patch file and the signature information of the second version image to the terminal, may include the following steps:

[0080] 301. Obtain the private key from the preset public-private key pair;

[0081] First, the server needs to obtain the private key from a pre-defined public-private key pair. A public-private key pair is a pair of keys used for encryption and decryption operations; the private key is used for signing or encryption, while the public key is used to verify the signature or decrypt the data. The server extracts the private key from the pre-defined public-private key pair to encrypt the signature information of the second-version image. The private key must be kept secret and can only be used on the server side. Obtaining the private key is a crucial step in ensuring the encryption operation, ensuring that the server can generate valid encrypted signature information used to verify the integrity and origin of the image received by the terminal.

[0082] 302. Encrypt the signature information of the second version image using the private key to obtain encrypted signature information;

[0083] After obtaining the private key, the server uses it to encrypt the signature information of the second-version image. This process generates encrypted signature information (i.e., encrypted signature information). The encrypted signature information is ciphertext generated by encrypting the signature data of the second-version image using the private key, ensuring that the signature information is not tampered with during transmission. The encrypted signature information is then transmitted to the terminal. Upon receiving the encrypted signature information, the terminal can decrypt it using the corresponding public key to verify the signature's validity. This step aims to increase security and prevent malicious modification of the signature information during transmission. The encrypted signature information can only be decrypted using the corresponding public key, ensuring that only the terminal can correctly verify the signature's validity.

[0084] 303. Push the patch file and encrypted signature information to the terminal, where the terminal stores the public key of the preset public-private key pair.

[0085] After completing the signature encryption, the server pushes the patch file and encrypted signature information to the terminal. Upon receiving this information, the terminal can use its stored public key (which the server can push to the terminal in step 201) to decrypt the encrypted signature information, thereby obtaining the original signature data. The terminal then verifies whether the signature matches the second-version image, confirming that the image has not been tampered with during transmission. This step ensures the security of the image update, guaranteeing that only encrypted and verified patch files and image versions can be correctly applied.

[0086] Furthermore, in some embodiments of this application, before pushing the patch file and encryption signature information to the terminal in step 303 of the above embodiments, the version upgrade method of this application may also include the following steps:

[0087] The public key of a preset public-private key pair is pushed to the terminal so that the terminal can save the public key of the preset public-private key pair.

[0088] The server first needs to push the public key to the terminal so that the terminal can save and use the public key. The public key is used to verify the signature. After the server encrypts the signature information, the terminal decrypts it using the public key, thereby ensuring the validity of the signature information.

[0089] After the server pushes the public key to the terminal, the terminal stores it in a secure location for later use. When verifying the signature, the terminal uses this public key to decrypt the encrypted signature information and compares the signature data with the image.

[0090] In this embodiment, the server ensures data security during the image update process. It encrypts the signature information with a private key and pushes it to the terminal to prevent tampering during transmission. Simultaneously, it pushes the public key to the terminal, enabling it to correctly decrypt the signature information and verify its validity, further ensuring that only verified images can be used. These steps combined enhance the overall security of the system, prevent the use of unauthorized images, and ensure the credibility of the upgrade process.

[0091] The following describes the version upgrade method of this application from the perspective of the terminal. Please refer to [link / reference]. Figure 4 One embodiment of the version upgrade method applied to the terminal in this application includes:

[0092] 401. Obtain the patch file pushed by the server and the signature information of the second version image. The patch file is generated by the server based on the difference information between the first version image and the second version image. The first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image.

[0093] The terminal receives two important pieces of information from the server: a patch file and the signature information for the second-version image. The patch file is generated by the server after comparing the first-version and second-version images, containing only the changes between them. The first-version image is the terminal's current image, representing the terminal's current operating system or application state, while the second-version image is the updated version, containing the new features, fixes, or optimizations required for the upgrade. The signature information is the digital signature of the second-version image, ensuring the image's integrity and authenticity. After receiving this information, the terminal prepares to verify and update the image.

[0094] 402. Retrieve saved verification information;

[0095] The terminal has pre-stored verification information (such as a public key or other keys used for signature verification). Upon receiving the signature information of the second version image from the server, the terminal calls the stored verification information to prepare for verifying the signature of the second version image. The verification information is necessary to ensure the validity of the signature; it helps the terminal confirm whether the second version image was indeed provided by the server and has not been tampered with during transmission.

[0096] 403. Verify the signature information of the second version image using the verification information;

[0097] The terminal uses the verification information obtained in step 402 to decrypt and verify the signature information of the second-version image. The verification process typically uses a digital signature algorithm; the terminal uses its public key to decrypt the signature information and then compares the decrypted data with the hash value of the actual image data. If they match, it proves that the image has not been tampered with during transmission, and the signature verification is successful.

[0098] The purpose of signature verification is to ensure that the image received by the terminal is trustworthy, preventing maliciously tampered images from being installed mistakenly. If verification fails, the terminal will refuse to apply the image, avoiding system instability or security issues caused by untrusted images.

[0099] 404. If the verification passes, the first version image will be upgraded using the patch file to obtain the second version image.

[0100] Once signature verification is successful, the terminal can trust the contents of the second-version image. Therefore, the terminal upgrades the current first-version image by applying the difference information using the patch file obtained from the server. The patch file contains all the changes between the first and second-version images, allowing the terminal to modify only the necessary parts without downloading the entire new second-version image. Patch files are typically small, helping to save bandwidth and storage space while ensuring an efficient and seamless upgrade process.

[0101] Finally, after the patch is applied, the terminal will successfully upgrade from the first version image to the second version image.

[0102] In this embodiment, the terminal can ensure that version upgrades can only be performed if signature verification is successful, thereby avoiding risks caused by malicious tampering or insecure images. Using patch files for version upgrades effectively reduces the amount of data that needs to be transferred, improves upgrade efficiency, and ensures that the terminal does not experience inconsistent or insecure states during the upgrade process, thus guaranteeing the security, integrity, and efficiency of the upgrade process.

[0103] Furthermore, in some embodiments of this application, before step 403 in the above embodiments verifies the signature information of the second version image using verification information, the version upgrade method may further include the following steps:

[0104] Remove the signature information from the first version image.

[0105] Before performing signature verification, the terminal clears the signature information of the first-version image. The purpose of clearing the signature information is to prevent the signature information of the old version image from affecting the verification of the new version image during the upgrade process. If the old signature information is not cleared, the terminal may use an outdated signature during verification, leading to verification failure or inconsistent verification results. In this embodiment, by clearing the signature information of the old version image before signature verification, the terminal avoids potential verification errors or signature conflicts, ensuring that the signature information of the new version image is correctly verified. Clearing the old signature information increases the reliability of the system upgrade, avoids inconsistent verification, and improves security and the accuracy of the upgrade process. This process ensures that only verified and secure images are applied, while optimizing upgrade efficiency through patch files, improving terminal performance and user experience.

[0106] Furthermore, in some embodiments of this application, if verification passes at step 404 in the above embodiments, the first version image is upgraded using a patch file to obtain the second version image. The version upgrade method may further include the following steps:

[0107] Add the signature information of the second version image to the second version image.

[0108] After successfully upgrading to the second-version image, the terminal adds the second-version image's signature information to the new image. This is done to ensure the integrity and trustworthiness of the image when it is used subsequently. The signature information becomes part of the second-version image, ensuring that the image's origin and content can be verified in future checks. After adding the signature information, the terminal can continue with subsequent operations or verify the image's integrity when necessary.

[0109] In this embodiment, the terminal adds the signature information of the second-version image to the upgraded image, ensuring that the image maintains its integrity and trustworthiness after the upgrade, especially when further verification or operation of the image is required in the future. Through this step, the terminal ensures that the image provides security every time it is used, avoiding the problem of lost or missing signature information, and increasing the security and trustworthiness of the system. At the same time, this step provides necessary support for subsequent maintenance, updates, and verification, ensuring the reliability of the image in future operations.

[0110] Please see Figure 5 One embodiment of the server in this application includes:

[0111] The acquisition unit 501 is used to acquire a first version image and a second version image. The first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image.

[0112] The generation unit 502 is used to generate patch files based on the differences between the first version image and the second version image;

[0113] The first push unit 503 is used to push patch files and signature information of the second version image to the terminal. The terminal stores verification information, which is used to verify the signature information of the second version image.

[0114] In this embodiment, by acquiring two versions of the image through the acquisition unit 501 and generating a patch file through the generation unit 502, the first push unit 503 can efficiently push the differences to the terminal, reducing the burden of image transmission and thus reducing the amount of data that needs to be transmitted, which is beneficial to improving the upgrade efficiency of the terminal. At the same time, pushing signature information and verifying it ensures the security and reliability of the update process and reduces the risk caused by malicious tampering.

[0115] Optionally, the server may also include:

[0116] The second push unit is used to push verification information to the terminal so that the terminal can save the verification information.

[0117] Optionally, the first push unit 503 includes:

[0118] The acquisition module is used to acquire the private key from a preset public-private key pair;

[0119] The encryption module is used to encrypt the signature information of the second version image using a private key to obtain encrypted signature information;

[0120] The first push module is used to push patch files and encrypted signature information to the terminal, where the terminal stores the public key of a preset public-private key pair.

[0121] Optionally, the first push unit may also include:

[0122] The second push unit is used to push the public key of the preset public-private key pair to the terminal so that the terminal can save the public key of the preset public-private key pair.

[0123] In this implementation, the functions of each unit and module are as described above. Figures 1 to 3 The steps in the illustrated embodiments are the same and will not be repeated here.

[0124] Please see Figure 6Another embodiment of the server in this application includes:

[0125] Processor 601, memory 602, input / output unit 603, and bus 604;

[0126] The processor 601 is connected to the memory 602, the input / output unit 603, and the bus 604;

[0127] The memory 602 stores a program, which the processor 601 calls to execute. Figures 1 to 3 The steps in the illustrated embodiment.

[0128] In this embodiment, the function of processor 601 is the same as described above. Figures 1 to 3 The steps in the illustrated embodiments are the same and will not be repeated here.

[0129] Please see Figure 7 One embodiment of the terminal in this application includes:

[0130] The acquisition unit 701 is used to acquire the patch file pushed by the server and the signature information of the second version image. The patch file is a patch file generated by the server based on the difference information between the first version image and the second version image. The first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image.

[0131] Calling unit 702 is used to call the saved verification information;

[0132] Verification unit 703 is used to verify the signature information of the second version image using verification information;

[0133] Upgrade unit 704 is used to upgrade the first version image to the second version image by means of a patch file when the verification is successful.

[0134] In this embodiment, the terminal can ensure that version upgrades can only be performed if signature verification is successful, thereby avoiding risks caused by malicious tampering or insecure images. Using patch files for version upgrades effectively reduces the amount of data that needs to be transferred, improves upgrade efficiency, and ensures that the terminal does not experience inconsistent or insecure states during the upgrade process, thus guaranteeing the security, integrity, and efficiency of the upgrade process.

[0135] Optionally, the terminal may also include:

[0136] The cleanup unit is used to remove the signature information of the first version image.

[0137] Optionally, the terminal may also include:

[0138] The adding unit is used to add the signature information of the second version image to the second version image. In this implementation, the functions of each unit are the same as those described above. Figure 4 The steps in the illustrated embodiments are the same and will not be repeated here.

[0139] Please see Figure 8 Another embodiment of the electronic device in this application includes:

[0140] Processor 801, memory 802, input / output unit 803, and bus 804;

[0141] The processor 801 is connected to the memory 802, the input / output unit 803, and the bus 804;

[0142] The memory 802 stores a program, which the processor 801 calls to execute. Figure 4 The steps in the illustrated embodiment.

[0143] In this embodiment, the function of processor 801 is the same as described above. Figure 4 The steps in the illustrated embodiments are the same and will not be repeated here.

[0144] This application also provides a computer-readable storage medium on which a program is stored. When the program is executed on a computer, it causes the computer to perform the aforementioned actions. Figures 1 to 4 The method in any possible implementation.

[0145] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0146] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0147] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0148] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0149] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A version upgrade method, characterized in that, Applied to a server, the method includes: Obtain the first version image and the second version image. The first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image. Based on the differences between the first version image and the second version image, a patch file is generated; The patch file and the signature information of the second version image are pushed to the terminal, wherein the terminal stores verification information, which is used to verify the signature information of the second version image.

2. The method according to claim 1, characterized in that, The method further includes: The verification information is pushed to the terminal so that the terminal saves the verification information.

3. The method according to claim 1, characterized in that, The step of pushing the patch file and the signature information of the second version image to the terminal includes: Retrieve the private key from the preset public-private key pair; The signature information of the second version image is encrypted using the private key to obtain encrypted signature information; The patch file and the encrypted signature information are pushed to the terminal, wherein the terminal stores the public key of the preset public-private key pair.

4. The method according to claim 3, characterized in that, The method further includes: The public key of the preset public-private key pair is pushed to the terminal so that the terminal can save the public key of the preset public-private key pair.

5. A version upgrade method, characterized in that, Applied to a terminal, the method includes: Obtain the patch file pushed by the server and the signature information of the second version image. The patch file is a patch file generated by the server based on the difference information between the first version image and the second version image. The first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image. Retrieve saved verification information; The signature information of the second version image is verified using the verification information. If the verification is successful, the first version image is upgraded using the patch file to obtain the second version image.

6. The method according to claim 5, characterized in that, Before verifying the signature information of the second version image using the verification information, the method further includes: Remove the signature information from the first version image.

7. The method according to claim 5, characterized in that, After upgrading the first version image using the patch file to obtain the second version image, the method further includes: Add the signature information of the second version image to the second version image.

8. A server, characterized in that, include: The acquisition unit is used to acquire a first version image and a second version image, wherein the first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image; The generation unit is used to generate patch files based on the differences between the first version image and the second version image; The first push unit is used to push the patch file and the signature information of the second version image to the terminal, wherein the terminal stores verification information, which is used to verify the signature information of the second version image.

9. A terminal, characterized in that, include: The acquisition unit is used to acquire the patch file pushed by the server and the signature information of the second version image. The patch file is a patch file generated by the server based on the difference information between the acquired first version image and the second version image. The first version image is the current version image of the terminal, and the second version image is the upgraded version image of the first version image. The calling unit is used to retrieve the saved verification information; The verification unit is used to verify the signature information of the second version image using the verification information; The upgrade unit is used to upgrade the first version image to the second version image by means of the patch file when the verification is successful.

10. A computer-readable storage medium having a program stored thereon, which, when executed on a computer, causes the computer to perform the method as claimed in any one of claims 1 to 4 or any one of claims 5 to 7.