CN106775835B - Method, server and terminal for acquiring upgrade file - Google Patents

Method, server and terminal for acquiring upgrade file Download PDF

Info

Publication number
CN106775835B
CN106775835B CN201611069989.7A CN201611069989A CN106775835B CN 106775835 B CN106775835 B CN 106775835B CN 201611069989 A CN201611069989 A CN 201611069989A CN 106775835 B CN106775835 B CN 106775835B
Authority
CN
China
Prior art keywords
sub
upgrade
file
upgrade file
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611069989.7A
Other languages
Chinese (zh)
Other versions
CN106775835A (en
Inventor
林尚波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201611069989.7A priority Critical patent/CN106775835B/en
Publication of CN106775835A publication Critical patent/CN106775835A/en
Application granted granted Critical
Publication of CN106775835B publication Critical patent/CN106775835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/108Resource delivery mechanisms characterised by resources being split in blocks or fragments

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention belongs to the technical field of communication, and provides a method for acquiring an upgrade file, a server and a terminal, wherein the method comprises the following steps: after first request information aiming at an application sent by a terminal is received, obtaining an upgrade file of the application, and splitting the upgrade file into a plurality of sub upgrade files; generating a digital abstract corresponding to each sub-upgrading file according to each sub-upgrading file; and sending each sub-upgrade file to the terminal, so that the terminal acquires the digital abstract corresponding to each sub-upgrade file generated in the server after receiving each sub-upgrade file, generates the digital abstract corresponding to each sub-upgrade file in the terminal, compares the digital abstract with the digital abstract corresponding to each sub-upgrade file generated in the server, saves the sub-upgrade files if the digital abstract is the same as the digital abstract, and splices all the sub-upgrade files into the upgrade files after saving all the sub-upgrade files. The invention can prevent the terminal from obtaining the upgrading file with errors.

Description

Method, server and terminal for acquiring upgrade file
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a method, a server and a terminal for acquiring an upgrade file.
Background
Currently, most terminals (e.g., mobile phones, tablet computers, etc.) are installed with a large number of Applications (APPs), such as WeChat, QQ, Taobao, etc. These applications can be upgraded in order to provide vendors of these applications with a way to continually improve the functionality and stability of the application and to meet consumer needs. The terminal obtains the upgrade file from a server storing the upgrade file, typically through network transmission. However, there are many risks in network transmission, for example, some bytes in the upgrade file may be erroneous during network transmission of the upgrade file, and if the upgrade file with the error is updated to the terminal, the terminal may be abnormal or even unable to operate after updating the application.
Therefore, a new technical solution is needed to solve the above technical problems.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, a server, and a terminal for acquiring an upgrade file, so as to prevent the terminal from acquiring an upgrade file with an error.
In a first aspect of the embodiments of the present invention, a method for obtaining an upgrade file is provided, where the method is applied to a server, and the method includes:
after first request information aiming at an application sent by a terminal is received, an upgrade file of the application is obtained, and the upgrade file is split into a plurality of sub upgrade files;
generating a digital abstract corresponding to each sub-upgrading file according to each sub-upgrading file in the plurality of sub-upgrading files;
and sending each sub-upgrade file to the terminal, so that the terminal acquires a digital abstract corresponding to each sub-upgrade file generated in the server after receiving each sub-upgrade file, generates a digital abstract corresponding to each sub-upgrade file in the terminal according to each sub-upgrade file, compares the digital abstract with the digital abstract corresponding to each sub-upgrade file generated in the server, stores the sub-upgrade files if the digital abstract is the same as the digital abstract, and splices all the sub-upgrade files into the upgrade file after storing all the sub-upgrade files.
In a second aspect of the embodiments of the present invention, a method for obtaining an upgrade file is provided, where the method is applied to a terminal, and the method includes:
sending first request information aiming at a certain application to a server, so that the server acquires an upgrade file of the application after receiving the first request information, splits the upgrade file into a plurality of sub-upgrade files, generates a digital abstract corresponding to each sub-upgrade file according to each sub-upgrade file in the plurality of sub-upgrade files, and sends each sub-upgrade file to the terminal;
after each sub-upgrade file sent by the server is received, acquiring a digital abstract corresponding to each sub-upgrade file generated in the server;
generating a digital abstract corresponding to each sub-upgrading file in the terminal according to each sub-upgrading file, and comparing the digital abstract with the digital abstract corresponding to each sub-upgrading file generated in the server;
if the sub-upgrade files are the same, the sub-upgrade files are saved, and after all the sub-upgrade files are saved, all the sub-upgrade files are spliced into the upgrade file.
In a third aspect of the embodiments of the present invention, a server is provided, where the server includes:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an upgrade file of an application after receiving first request information aiming at the application sent by a terminal and splitting the upgrade file into a plurality of sub-upgrade files;
the generating module is used for generating a digital abstract corresponding to each sub-upgrading file according to each sub-upgrading file in the plurality of sub-upgrading files;
a sending module, configured to send each sub-upgrade file to the terminal, so that the terminal obtains a digital digest, which is generated in the server and corresponds to each sub-upgrade file, after receiving each sub-upgrade file, generates a digital digest, which corresponds to each sub-upgrade file, in the terminal according to each sub-upgrade file, compares the digital digest with the digital digest, which is generated in the server and corresponds to each sub-upgrade file, if the digital digests are the same as each other, stores the sub-upgrade file, and after storing all sub-upgrade files, splices all sub-upgrade files into the upgrade file.
In a fourth aspect of the embodiments of the present invention, a terminal is provided, where the terminal includes:
the first sending module is used for sending first request information aiming at a certain application to a server, so that the server obtains an upgrade file of the application after receiving the first request information, divides the upgrade file into a plurality of sub upgrade files, generates a digital abstract corresponding to each sub upgrade file according to each sub upgrade file in the plurality of sub upgrade files, and sends each sub upgrade file to the terminal;
the acquisition module is used for acquiring the digital abstract which is generated in the server and corresponds to each sub-upgrading file after receiving each sub-upgrading file sent by the server;
a generating module, configured to generate, in the terminal, a digital digest corresponding to each sub-upgrade file according to each sub-upgrade file, and compare the digital digest with the digital digest corresponding to each sub-upgrade file generated in the server;
and the storage module is used for storing the sub-upgrade files if the sub-upgrade files are the same, and splicing all the sub-upgrade files into the upgrade file after all the sub-upgrade files are stored.
In a fifth aspect of the embodiments of the present invention, there is provided a server, including:
a processor, an input device, and an output device;
the processor is used for acquiring an upgrade file of an application through the input equipment after receiving first request information aiming at the application sent by a terminal, and splitting the upgrade file into a plurality of sub-upgrade files;
the processor is further configured to generate a digital summary corresponding to each of the plurality of sub-upgrade files according to each of the plurality of sub-upgrade files;
the processor is further configured to send each sub-upgrade file to the terminal through the output device, so that the terminal obtains a digital digest, which is generated in the server and corresponds to each sub-upgrade file, after receiving each sub-upgrade file, generates a digital digest, which corresponds to each sub-upgrade file, in the terminal according to each sub-upgrade file, compares the digital digest with the digital digest, which is generated in the server and corresponds to each sub-upgrade file, if the digital digests are the same as each other, stores the sub-upgrade file, and splices all the sub-upgrade files into the upgrade file after storing all the sub-upgrade files.
In a sixth aspect of the embodiments of the present invention, a terminal is provided, where the terminal includes:
a processor, an input device, an output device, and a memory;
the processor is configured to send first request information for a certain application to a server through the output device, so that the server obtains an upgrade file of the application after receiving the first request information, splits the upgrade file into a plurality of sub-upgrade files, generates a digital summary corresponding to each sub-upgrade file according to each sub-upgrade file in the plurality of sub-upgrade files, and sends each sub-upgrade file to the terminal;
the processor is further configured to, after receiving each sub-upgrade file sent by the server, obtain, through the input device, a digital digest that is generated in the server and corresponds to each sub-upgrade file;
the processor is further configured to generate a digital abstract corresponding to each sub-upgrade file in the terminal according to each sub-upgrade file, and compare the digital abstract with the digital abstract corresponding to each sub-upgrade file generated in the server;
and the processor is also used for storing the sub-upgrade files in the memory if the sub-upgrade files are the same, and splicing all the sub-upgrade files into the upgrade file after all the sub-upgrade files are stored.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: the embodiment of the invention sends first request information aiming at a certain application to a server through a terminal, the server acquires an upgrade file of the application after receiving the first request information, splits the upgrade file into a plurality of sub upgrade files, generates a digital abstract corresponding to each sub upgrade file according to each sub upgrade file in the plurality of sub upgrade files, sends each sub upgrade file to the terminal, the terminal acquires a digital abstract corresponding to each sub upgrade file generated in the server after receiving each sub upgrade file, generates a digital abstract corresponding to each sub upgrade file in the terminal according to each sub upgrade file, compares the digital abstract with the digital abstract corresponding to the sub upgrade file generated in the server, if the digital abstract is the same as the digital abstract, saves the sub upgrade file, and saves all the sub upgrade files, and splicing all the sub-upgrading files into upgrading files. The embodiment of the invention divides the upgrading file into a plurality of sub upgrading files in the server, independently generates a digital abstract for each sub upgrading file, the terminal receives each sub upgrading file, independently generates a digital abstract for each sub upgrading file, determines that the sub upgrading file corresponding to the digital abstract is a complete sub upgrading file (no error) when the digital abstract is the same as the digital abstract generated in the server, stores the sub upgrading file, splices all the sub upgrading files into the upgrading file after the terminal receives all the complete sub upgrading files, thereby ensuring that the terminal obtains a correct upgrading file, determines that the sub upgrading file corresponding to the digital abstract has errors when the digital abstract is different from the digital abstract generated in the server, only retransmits the sub upgrading file without retransmitting the whole upgrading file, the size of the retransmitted file is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a method for obtaining an upgrade file according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for obtaining an upgrade file according to a second embodiment of the present invention;
FIG. 3 is a schematic block diagram of a server provided by a third embodiment of the present invention;
fig. 4 is a schematic block diagram of a terminal according to a fourth embodiment of the present invention;
FIG. 5 is a schematic block diagram of a server provided by embodiment five of the present invention;
fig. 6 is a schematic block diagram of a terminal according to a sixth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In particular implementations, the terminals described in embodiments of the invention include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
In the discussion that follows, a mobile terminal that includes a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Various applications that may be executed on the terminal may use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Referring to fig. 1, which is a schematic flowchart of a method for obtaining an upgrade file according to an embodiment of the present invention, where the method is applied to a server, and as shown in the figure, the method may include the following steps:
step S101, after receiving a first request message for an application sent by a terminal, obtaining an upgrade file of the application, and splitting the upgrade file into a plurality of sub-upgrade files.
In the embodiment of the present invention, after receiving a first request message for an application sent by a terminal, the server may obtain an upgrade file for the application from a memory of the server, and split the upgrade file into a plurality of sub-upgrade files, where the sizes of the plurality of sub-upgrade files may be equal or unequal, and are not limited herein. The certain application may be any application installed in the terminal (for example, WeChat, QQ, Taobao, etc.), the first request information is information requesting the server to send an upgrade file, and the first request information may be generated by triggering a virtual button on the terminal screen, for example, clicking a virtual button on a mobile phone screen, where text information for WeChat is "update".
Optionally, the splitting the upgrade file into a plurality of sub-upgrade files includes:
acquiring network transmission parameters when the server sends a preset file to the terminal;
and splitting the upgrading file into a plurality of sub upgrading files according to the network transmission parameters.
Specifically, before sending the sub-upgrade file to the terminal, the server may send a predetermined file (the predetermined file is a preset file for network transmission test) to the terminal, so as to execute the network transmission test between the server and the terminal, obtain network transmission parameters such as a network transmission speed and a packet loss rate when the server sends the predetermined file to the terminal, and split the upgrade file according to the obtained network transmission parameters. For example, when the network transmission speed is relatively fast (e.g., 200mbps) and the packet loss rate is relatively low (e.g., 5%), the number of sub-upgrade files split from the upgrade file may be reduced (i.e., each sub-upgrade file is relatively large), and when the network transmission speed is relatively slow (e.g., 0.1mbps) and the packet loss rate is relatively high (e.g., 20%), the number of sub-upgrade files split from the upgrade file may be increased (i.e., each sub-upgrade file is relatively small). Optionally, the server may also split the upgrade file into a fixed number of sub upgrade files, for example, five sub upgrade files, which is not limited herein.
Optionally, in order to facilitate that the terminal knows the sequence of each sub-upgrade file in the plurality of sub-upgrade files after receiving the plurality of sub-upgrade files, after splitting the upgrade file into a plurality of sub-upgrade files, the embodiment of the present invention further includes:
and adding a corresponding file serial number identifier at a preset position of each sub-upgrading file in the plurality of sub-upgrading files so as to determine the sequence of each sub-upgrading file in the plurality of sub-upgrading files.
Wherein the predetermined location includes, but is not limited to, the beginning or end of a child upgrade file.
Step S102, according to each sub-upgrading file in the plurality of sub-upgrading files, generating a digital abstract corresponding to each sub-upgrading file.
In this embodiment of the present invention, the server may apply a specific algorithm (e.g., a hash algorithm) to each sub-upgrade file to generate a digital digest corresponding to each sub-upgrade file, where each sub-upgrade file corresponds to its corresponding digital digest one to one.
Illustratively, the server divides the upgrade file a of the WeChat into five sub-upgrade files, which are respectively a1, a2, A3, a4 and a5, the server may generate a digital digest H1 corresponding to the sub-upgrade file a1 by using a hash algorithm, generate a digital digest H2 corresponding to the sub-upgrade file a2 by using a hash algorithm, generate a digital digest H3 corresponding to the sub-upgrade file A3 by using a hash algorithm, generate a digital digest H4 corresponding to the sub-upgrade file a4 by using a hash algorithm, and generate a digital digest H5 corresponding to the sub-upgrade file a5 by using a hash algorithm.
In this embodiment of the present invention, the server may store the digital digests in the sub-upgrade files corresponding to the digital digests (for example, at the beginning or the end of the sub-upgrade file), or store one digital digest separately as an independent file, or store the digital digests of all the sub-upgrade files in a merged manner as one file, which is not limited herein.
Step S103, sending each sub-upgrade file to the terminal, so that the terminal obtains a digital abstract corresponding to each sub-upgrade file generated in the server after receiving each sub-upgrade file, generates a digital abstract corresponding to each sub-upgrade file in the terminal according to each sub-upgrade file, compares the digital abstract with the digital abstract corresponding to each sub-upgrade file generated in the server, stores the sub-upgrade files if the digital abstract is the same as the digital abstract, and splices all the sub-upgrade files into the upgrade file after storing all the sub-upgrade files.
In this embodiment of the present invention, the server sends each of the plurality of sub-upgrade files to the terminal, so that after receiving each of the sub-upgrade files, the terminal generates a digital digest corresponding to each of the received sub-upgrade files by using a specific algorithm (for example, a hash algorithm) that is the same as that used when generating the digital digest corresponding to each of the sub-upgrade files in the server.
Illustratively, the server adopts a hash algorithm when generating the digital digest H1 corresponding to the sub-upgrade file a1, and after receiving the sub-upgrade file a1, the terminal also adopts the hash algorithm to generate the digital digest L1 corresponding to the sub-upgrade file a1, compares the digital digest L1 with the digital digest H1, and if the digital digest L1 is the same as the digital digest H1, determines that the sub-upgrade file a1 is complete (i.e., no error), and saves the sub-upgrade file a 1; if the sub-upgrade file A1 is not complete (for example, an error byte exists in the sub-upgrade file A1), the terminal sends retransmission request information for the sub-upgrade file A1 to the server, after receiving the retransmission request information, the server obtains the sub-upgrade file A1 from the server memory and resends the sub-upgrade file A1 to the terminal, so that the terminal is ensured to receive the complete sub-upgrade file A1.
The server may sequentially send the plurality of sub-upgrade files to the terminal, or may simultaneously send the plurality of sub-upgrade files in parallel, which is not limited herein.
In the embodiment of the invention, the upgrading file is split into a plurality of sub-upgrading files in the server, a digital abstract is independently generated for each sub-upgrading file, after the terminal receives each sub-upgrading file, and a digital abstract is also generated separately for each sub-upgrade file at the terminal, and when the digital abstract is the same as the digital abstract generated in the server, the sub-upgrade file corresponding to the digital abstract is determined to be a complete sub-upgrade file, and the sub-upgrade file is saved, after the terminal receives all the sub-upgrade files, all the sub-upgrade files are spliced into the upgrade file, thereby ensuring that the terminal can acquire the correct upgrade file, when the digital abstract is different from the digital abstract generated in the server, and the sub-upgrade file corresponding to the digital abstract is determined to have an error, only the sub-upgrade file needs to be retransmitted, so that the size of the retransmitted file is reduced.
Referring to fig. 2, which is a schematic flowchart of a method for acquiring an upgrade file according to a second embodiment of the present invention, where the method is applied to a terminal, and as shown in the figure, the method may include the following steps:
step S201, sending a first request message for an application to a server, so that the server obtains an upgrade file of the application after receiving the first request message, splits the upgrade file into a plurality of sub-upgrade files, generates a digital summary corresponding to each sub-upgrade file according to each sub-upgrade file in the plurality of sub-upgrade files, and sends each sub-upgrade file to the terminal.
In the embodiment of the present invention, the terminal sends a first request message for a certain application to a server, so that after receiving the first request message, the server can obtain an upgrade file for the application from a memory of the server, split the upgrade file into a plurality of sub-upgrade files, generate a digital digest corresponding to each sub-upgrade file by using a specific algorithm (for example, a hash algorithm) for each sub-upgrade file, and send each sub-upgrade file to the terminal, where each sub-upgrade file corresponds to its corresponding digital digest one to one. The certain application may be any application (e.g., WeChat, QQ, Taobao, etc.) installed in the terminal, the first request information is information for requesting a server to send an upgrade file, the first request information may be generated by triggering a virtual button on the terminal screen, for example, clicking a virtual button on a mobile phone screen, where text information for WeChat is "update", and the server may send the multiple sub-upgrade files to the terminal in sequence, or may send the multiple sub-upgrade files in parallel at the same time.
Illustratively, the server divides the upgrade file a of the WeChat into five sub-upgrade files, which are respectively a1, a2, A3, a4 and a5, the server may generate a digital digest H1 corresponding to the sub-upgrade file a1 by using a hash algorithm, generate a digital digest H2 corresponding to the sub-upgrade file a2 by using a hash algorithm, generate a digital digest H3 corresponding to the sub-upgrade file A3 by using a hash algorithm, generate a digital digest H4 corresponding to the sub-upgrade file a4 by using a hash algorithm, and generate a digital digest H5 corresponding to the sub-upgrade file a5 by using a hash algorithm.
In this embodiment of the present invention, the server may store the digital digests in the sub-upgrade files corresponding to the digital digests (for example, at the beginning or the end of the sub-upgrade file), or store one digital digest separately as an independent file, or store the digital digests of all the sub-upgrade files in a merged manner as one file, which is not limited herein.
Optionally, in order to facilitate that the terminal knows the sequence of each sub-upgrade file in the plurality of sub-upgrade files after receiving the plurality of sub-upgrade files, the server may first add a file sequence number identifier to each sub-upgrade file, and then send the sub-upgrade file to which the file sequence number identifier has been added to the terminal.
It should be noted that, if the server adds a file serial number identifier to each sub-upgrade file, when generating a corresponding digital digest for each sub-upgrade file, the sub-upgrade file to which the file serial number identifier has been added is generated into a digital digest corresponding to the sub-upgrade file by using a specific algorithm.
Step S202, after receiving each sub-upgrade file sent by the server, acquiring a digital abstract generated in the server and corresponding to each sub-upgrade file.
For example, after receiving the sub-upgrade file a1 sent by the server, the terminal sends request information for the digital digest of the sub-upgrade file a1 to the server, and after receiving the request information, the server obtains the digital digest H1 corresponding to the sub-upgrade file a1 from the server memory and sends the digital digest H1 to the terminal.
Step S203, according to each sub-upgrading file, generating a digital abstract corresponding to each sub-upgrading file in the terminal, and comparing the digital abstract with the digital abstract corresponding to each sub-upgrading file generated in the server.
In this embodiment of the present invention, after receiving each sub-upgrade file, the terminal generates a digital digest corresponding to each received sub-upgrade file by using a specific algorithm (for example, a hash algorithm) that is the same as that used when generating the digital digest corresponding to each sub-upgrade file in the server. For example, the server generates the digital digest H1 corresponding to the sub-upgrade file a1 by using a hash algorithm, and the terminal also generates the digital digest L1 corresponding to the sub-upgrade file a1 by using the hash algorithm after receiving the sub-upgrade file a 1.
And step S204, if the sub-upgrade files are the same, saving the sub-upgrade files, and splicing all the sub-upgrade files into the upgrade file after saving all the sub-upgrade files.
In this embodiment of the present invention, the splicing the all sub-upgrade files into the upgrade file may specifically be: and splicing all the sub-upgrading files into the upgrading file according to the file serial number identifications in all the sub-upgrading files and the sequence of each sub-upgrading file in all the sub-upgrading files.
It should be noted that, in the process of splicing all the sub-upgrade files into the upgrade file, the file serial number identifier in each sub-upgrade file needs to be removed first, and then the sub-upgrade files with the file serial number identifiers removed are spliced.
Optionally, the embodiment of the present invention further includes:
if the digital abstract corresponding to a certain sub-upgrade file generated in the terminal is different from the digital abstract corresponding to the sub-upgrade file generated in the server, transmitting retransmission request information aiming at the sub-upgrade file to the server, so that the server acquires the sub-upgrade file after receiving the retransmission request information and retransmits the sub-upgrade file to the terminal.
Illustratively, after receiving the sub-upgrade file a1, the terminal generates a digital digest L1 corresponding to the sub-upgrade file a1 by using a hash algorithm, compares the digital digest L1 with the digital digest H1, and if the digital digest L1 and the digital digest H1 are the same, determines that the sub-upgrade file a1 is complete (i.e., no error), and saves the sub-upgrade file a 1; if the sub-upgrade file A1 is not complete (for example, an error byte exists in the sub-upgrade file A1), the terminal sends retransmission request information for the sub-upgrade file A1 to the server, after receiving the retransmission request information, the server obtains the sub-upgrade file A1 from the server memory, and resends the sub-upgrade file A1 to the terminal, so that the terminal is guaranteed to receive the complete sub-upgrade file A1.
The method and the device have the advantages that after the terminal receives each sub-upgrade file in the plurality of sub-upgrade files, a digital abstract is independently generated for each sub-upgrade file at the terminal, the sub-upgrade file corresponding to the digital abstract is determined to be a complete sub-upgrade file when the digital abstract is the same as the digital abstract generated in the server, the sub-upgrade file is stored, all the sub-upgrade files are spliced into the upgrade file after the terminal receives all the sub-upgrade files, so that the terminal can acquire the correct upgrade file, when the digital abstract is different from the digital abstract generated in the server, the sub-upgrade file corresponding to the digital abstract is determined to be wrong, only the sub-upgrade file needs to be retransmitted, the whole upgrade file does not need to be retransmitted, and the size of the retransmitted file is reduced.
It should be understood that, in the above embodiments, the order of execution of the steps is not meant to imply any order, and the order of execution of the steps should be determined by their function and inherent logic, and should not limit the implementation process of the embodiments of the present invention.
Referring to fig. 3, it is a schematic block diagram of a server provided in the third embodiment of the present invention, and for convenience of description, only the parts related to the third embodiment of the present invention are shown.
The server includes:
the obtaining module 31 is configured to obtain an upgrade file of an application after receiving first request information, which is sent by a terminal and is for the application, and split the upgrade file into a plurality of sub-upgrade files;
a generating module 32, configured to generate a digital summary corresponding to each of the plurality of sub-upgrade files according to each of the sub-upgrade files;
a sending module 33, configured to send each sub-upgrade file to the terminal, so that the terminal obtains, after receiving each sub-upgrade file, a digital digest that is generated in the server and corresponds to each sub-upgrade file, generates, according to each sub-upgrade file, a digital digest that corresponds to each sub-upgrade file in the terminal, compares the digital digest with the digital digest that is generated in the server and corresponds to each sub-upgrade file, if the digital digests are the same as the digital digests, stores the sub-upgrade file, and after storing all sub-upgrade files, splices all sub-upgrade files into the upgrade file.
Optionally, the obtaining module 31 includes:
an obtaining unit 311, configured to obtain a network transmission parameter when the server sends a predetermined file to the terminal;
a splitting unit 312, configured to split the upgrade file into multiple sub-upgrade files according to the network transmission parameter.
Optionally, the server further includes:
an adding module 34, configured to add a corresponding file serial number identifier to a predetermined location of each of the multiple sub-upgrade files after splitting the upgrade file into multiple sub-upgrade files, so as to determine an order of each sub-upgrade file in the multiple sub-upgrade files.
Referring to fig. 4, a schematic block diagram of a terminal according to a fourth embodiment of the present invention is shown, and for convenience of description, only the parts related to the embodiment of the present invention are shown.
The terminal includes:
a first sending module 41, configured to send first request information for a certain application to a server, so that after receiving the first request information, the server obtains an upgrade file for the application, splits the upgrade file into multiple sub-upgrade files, generates a digital summary corresponding to each sub-upgrade file according to each sub-upgrade file in the multiple sub-upgrade files, and sends each sub-upgrade file to the terminal;
an obtaining module 42, configured to obtain, after receiving each sub-upgrade file sent by the server, a digital digest that is generated in the server and corresponds to each sub-upgrade file;
a generating module 43, configured to generate, in the terminal, a digital digest corresponding to each sub-upgrade file according to each sub-upgrade file, and compare the digital digest with the digital digest corresponding to each sub-upgrade file generated in the server;
and the storage module 44 is configured to store the sub-upgrade files if the sub-upgrade files are the same, and splice all the sub-upgrade files into the upgrade file after all the sub-upgrade files are stored.
Optionally, the terminal further includes:
a second sending module 45, configured to send retransmission request information for a certain sub-upgrade file to the server if the digital digest generated in the terminal and corresponding to the sub-upgrade file is different from the digital digest generated in the server and corresponding to the sub-upgrade file, so that the server obtains the sub-upgrade file after receiving the retransmission request information, and resends the sub-upgrade file to the terminal.
It will be apparent to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely illustrated, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structures of the server and the terminal are divided into different functional units or modules to perform all or part of the above described functions. Each functional module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional modules are only used for distinguishing one functional module from another, and are not used for limiting the protection scope of the application. For the specific working processes of the modules in the server and the terminal, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
Fig. 5 is a schematic block diagram of a server according to a fifth embodiment of the present invention. The server as shown may include: one or more processors 501 (only one shown); one or more input devices 502 (only one shown), one or more output devices 503 (only one shown), and a memory 504. The processor 501, the input device 502, the output device 503, and the memory 504 are connected by a bus 505. The memory 504 is used for storing instructions and the processor 501 is used for executing the instructions stored by the memory 504. Wherein:
the processor 501 is configured to, after receiving first request information, which is sent by a terminal and is directed to a certain application, obtain an upgrade file of the application through the input device 502, and split the upgrade file into a plurality of sub-upgrade files; generating a digital abstract corresponding to each sub-upgrading file according to each sub-upgrading file in the plurality of sub-upgrading files; sending each sub-upgrade file to the terminal through the output device 503, so that the terminal obtains a digital abstract corresponding to each sub-upgrade file generated in the server after receiving each sub-upgrade file, generates a digital abstract corresponding to each sub-upgrade file in the terminal according to each sub-upgrade file, compares the digital abstract with the digital abstract corresponding to each sub-upgrade file generated in the server, if the digital abstract is the same as the digital abstract, saves the sub-upgrade file, and splices all sub-upgrade files into the upgrade file after saving all sub-upgrade files.
Optionally, the processor 501 is specifically configured to obtain, through the input device 502, a network transmission parameter when the server sends a predetermined file to the terminal; and splitting the upgrading file into a plurality of sub upgrading files according to the network transmission parameters.
Optionally, after splitting the upgrade file into a plurality of sub upgrade files, the processor 501 is further configured to add a corresponding file serial number identifier to a predetermined position of each sub upgrade file in the plurality of sub upgrade files, so as to determine an order of each sub upgrade file in the plurality of sub upgrade files.
The output device 503 is configured to feed back execution result information to the terminal.
The memory 504 is used for storing software programs and modules. The processor 501 executes various functional applications and data processing by executing software programs and modules stored in the memory 504 to acquire an upgrade file.
It should be understood that, in the embodiment of the present invention, the Processor 501 may be a Central Processing Unit (CPU), and the Processor may also be other general processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 502 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, a data receiving interface, and the like. The output device 503 may include a display (LCD, etc.), a speaker, a data transmission interface, and the like.
The memory 504 may include a read-only memory and a random access memory, and provides instructions and data to the processor 501. A portion of the memory 504 may also include non-volatile random access memory. For example, the memory 504 may also store device type information.
In a specific implementation, the processor 501, the input device 502, the output device 503, and the memory 504 described in this embodiment of the present invention may execute the implementation described in the embodiment of the method for obtaining an upgrade file provided in this embodiment of the present invention, or may execute the implementation described in the server described in the third embodiment of the present invention, which is not described herein again.
Fig. 6 is a schematic block diagram of a terminal according to a sixth embodiment of the present invention. The terminal as shown in the figure may include: one or more processors 601 (only one shown); one or more input devices 602 (only one shown), one or more output devices 603 (only one shown), and memory 604. The processor 601, the input device 602, the output device 603, and the memory 604 are connected by a bus 605. The memory 604 is used for storing instructions and the processor 601 is used for executing instructions stored by the memory 604. Wherein:
the processor 601 is configured to send first request information for a certain application to a server through the output device 603, so that the server obtains an upgrade file of the application after receiving the first request information, splits the upgrade file into a plurality of sub-upgrade files, generates a digital summary corresponding to each sub-upgrade file according to each sub-upgrade file in the plurality of sub-upgrade files, and sends each sub-upgrade file to the terminal; after each sub-upgrade file sent by the server is received, acquiring, through the input device 602, a digital digest generated in the server and corresponding to each sub-upgrade file; generating a digital abstract corresponding to each sub-upgrading file in the terminal according to each sub-upgrading file, and comparing the digital abstract with the digital abstract corresponding to each sub-upgrading file generated in the server; if the sub-upgrade files are the same, the sub-upgrade file is saved in the memory 604, and after all the sub-upgrade files are saved, all the sub-upgrade files are spliced into the upgrade file.
Optionally, the processor 601 is further configured to send retransmission request information for a certain sub-upgrade file to the server through the output device 603 if the digital digest generated in the terminal and corresponding to the sub-upgrade file is different from the digital digest generated in the server and corresponding to the sub-upgrade file, so that the server obtains the sub-upgrade file after receiving the retransmission request information and resends the sub-upgrade file to the terminal.
The output device 603 is configured to feed back execution result information to the server.
The memory 604 is used for storing software programs and modules. The processor 601 executes various functional applications and data processing by executing software programs and modules stored in the memory 604 to acquire an upgrade file.
It should be understood that, in the embodiment of the present invention, the Processor 601 may be a Central Processing Unit (CPU), and the Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 602 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, a data receiving interface, and the like. The output device 603 may include a display (LCD, etc.), speakers, a data transmission interface, and the like.
The memory 604 may include both read-only memory and random access memory, and provides instructions and data to the processor 601. A portion of the memory 604 may also include non-volatile random access memory. For example, the memory 604 may also store device type information.
In a specific implementation, the processor 601, the input device 602, the output device 603, and the memory 604 described in this embodiment of the present invention may execute the implementation described in the embodiment of the method for acquiring an upgrade file provided in this embodiment of the present invention, or may execute the implementation described in the terminal described in the fourth embodiment of the present invention, which is not described herein again.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed server, terminal and method may be implemented in other ways. For example, the above-described terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical function division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be implemented in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (12)

1. A method for obtaining an upgrade file is applied to a server, and is characterized in that the method comprises the following steps:
after first request information aiming at a certain application sent by a terminal is received, obtaining an upgrade file of the application, and splitting the upgrade file into a plurality of sub upgrade files, wherein the certain application is any application installed on the terminal, and the first request information is information for requesting a server to send the upgrade file;
generating a digital abstract corresponding to each sub-upgrading file by adopting a specific algorithm for each sub-upgrading file in the plurality of sub-upgrading files;
and sending each sub-upgrade file to the terminal, so that the terminal acquires a digital abstract corresponding to each sub-upgrade file generated in the server after receiving each sub-upgrade file, generating a digital abstract corresponding to each sub-upgrade file in the terminal by using the specific algorithm for each sub-upgrade file, comparing the digital abstract with the digital abstract corresponding to each sub-upgrade file generated in the server, if the digital abstract is the same as the digital abstract, determining that the sub-upgrade file is complete, storing the sub-upgrade file, and splicing all sub-upgrade files into the upgrade file after storing all sub-upgrade files.
2. The method of claim 1, wherein splitting the upgrade file into a plurality of sub-upgrade files comprises:
acquiring network transmission parameters when the server sends a preset file to the terminal;
and splitting the upgrading file into a plurality of sub upgrading files according to the network transmission parameters.
3. The method of claim 1 or 2, after splitting the upgrade file into a plurality of sub-upgrade files, further comprising:
and adding a corresponding file serial number identifier at a preset position of each sub-upgrading file in the plurality of sub-upgrading files so as to determine the sequence of each sub-upgrading file in the plurality of sub-upgrading files.
4. A method for obtaining an upgrade file is applied to a terminal, and is characterized in that the method comprises the following steps:
sending first request information aiming at a certain application to a server, so that the server acquires an upgrade file of the application after receiving the first request information, splits the upgrade file into a plurality of sub upgrade files, generates a digital abstract corresponding to each sub upgrade file by adopting a specific algorithm for each sub upgrade file in the plurality of sub upgrade files, and sends each sub upgrade file to the terminal, wherein the certain application is any application installed on the terminal, and the first request information is information for requesting the server to send the upgrade file;
after each sub-upgrade file sent by the server is received, acquiring a digital abstract corresponding to each sub-upgrade file generated in the server;
generating a digital abstract corresponding to each sub-upgrading file in the terminal by adopting the specific algorithm for each sub-upgrading file, and comparing the digital abstract with the digital abstract corresponding to each sub-upgrading file generated in the server;
if the sub-upgrade files are the same, determining that the sub-upgrade files are complete, storing the sub-upgrade files, and splicing all the sub-upgrade files into the upgrade file after storing all the sub-upgrade files.
5. The method of claim 4, further comprising:
if the digital abstract corresponding to a certain sub-upgrade file generated in the terminal is different from the digital abstract corresponding to the sub-upgrade file generated in the server, transmitting retransmission request information aiming at the sub-upgrade file to the server, so that the server acquires the sub-upgrade file after receiving the retransmission request information and retransmits the sub-upgrade file to the terminal.
6. A server, characterized in that the server comprises:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an upgrade file of an application after receiving first request information aiming at the application sent by a terminal, and splitting the upgrade file into a plurality of sub upgrade files, wherein the application is any application installed on the terminal, and the first request information is information for requesting a server to send the upgrade file;
the generating module is used for generating a digital abstract corresponding to each sub-upgrading file by adopting a specific algorithm for each sub-upgrading file in the plurality of sub-upgrading files;
a sending module, configured to send each sub-upgrade file to the terminal, so that after receiving each sub-upgrade file, the terminal obtains a digital digest, which is generated in the server and corresponds to each sub-upgrade file, uses the specific algorithm for each sub-upgrade file, generates a digital digest, which corresponds to each sub-upgrade file, in the terminal, and compares the digital digest with the digital digest, which is generated in the server and corresponds to each sub-upgrade file, if the digital digests are the same as each other, it is determined that the sub-upgrade file is complete, stores the sub-upgrade file, and after storing all sub-upgrade files, splices all sub-upgrade files into the upgrade file.
7. The server according to claim 6, wherein the obtaining module comprises:
the acquisition unit is used for acquiring network transmission parameters when the server sends a preset file to the terminal;
and the splitting unit is used for splitting the upgrading file into a plurality of sub upgrading files according to the network transmission parameters.
8. The server according to claim 6 or 7, wherein the server further comprises:
and the adding module is used for adding a corresponding file serial number identifier at a preset position of each sub-upgrading file in the plurality of sub-upgrading files after the upgrading file is split into the plurality of sub-upgrading files so as to determine the sequence of each sub-upgrading file in the plurality of sub-upgrading files.
9. A terminal, characterized in that the terminal comprises:
the first sending module is used for sending first request information aiming at a certain application to a server, so that the server obtains an upgrade file of the application after receiving the first request information, divides the upgrade file into a plurality of sub upgrade files, generates a digital summary corresponding to each sub upgrade file by adopting a specific algorithm for each sub upgrade file in the plurality of sub upgrade files, and sends each sub upgrade file to the terminal, wherein the certain application is any application installed on the terminal, and the first request information is information for requesting the server to send the upgrade file;
the acquisition module is used for acquiring the digital abstract which is generated in the server and corresponds to each sub-upgrading file after receiving each sub-upgrading file sent by the server;
the generating module is used for generating a digital abstract corresponding to each sub-upgrading file in the terminal by adopting the specific algorithm for each sub-upgrading file, and comparing the digital abstract with the digital abstract corresponding to each sub-upgrading file generated in the server;
and the storage module is used for determining that the sub-upgrade files are complete if the sub-upgrade files are the same, storing the sub-upgrade files, and splicing all the sub-upgrade files into the upgrade file after all the sub-upgrade files are stored.
10. The terminal of claim 9, wherein the terminal further comprises:
and the second sending module is used for sending retransmission request information aiming at a certain sub-upgrade file to the server if the digital abstract corresponding to the sub-upgrade file generated in the terminal is different from the digital abstract corresponding to the sub-upgrade file generated in the server, so that the server acquires the sub-upgrade file after receiving the retransmission request information and resends the sub-upgrade file to the terminal.
11. A server, characterized in that the server comprises:
a processor, an input device, and an output device;
the processor is configured to, after receiving first request information, sent by a terminal, for a certain application, acquire an upgrade file of the application through the input device, and split the upgrade file into a plurality of sub-upgrade files, where the certain application is any application installed on the terminal, and the first request information is information requesting the server to send the upgrade file;
the processor is further configured to generate a digital summary corresponding to each sub-upgrade file by using a specific algorithm for each sub-upgrade file in the plurality of sub-upgrade files;
the processor is further configured to send each sub-upgrade file to the terminal through the output device, so that the terminal obtains a digital digest, which is generated in the server and corresponds to each sub-upgrade file, after receiving each sub-upgrade file, generates a digital digest, which corresponds to each sub-upgrade file, in the terminal by using the specific algorithm, compares the digital digest with the digital digest, which is generated in the server and corresponds to each sub-upgrade file, if the digital digests are the same as the digital digests, it is determined that the sub-upgrade files are complete, stores the sub-upgrade files, and splices all the sub-upgrade files into the upgrade file after storing all the sub-upgrade files.
12. A terminal, characterized in that the terminal comprises:
a processor, an input device, an output device, and a memory;
the processor is configured to send first request information for a certain application to a server through the output device, so that the server obtains an upgrade file of the application after receiving the first request information, splits the upgrade file into a plurality of sub-upgrade files, generates a digital digest corresponding to each sub-upgrade file by using a specific algorithm for each sub-upgrade file in the plurality of sub-upgrade files, and sends each sub-upgrade file to the terminal, where the certain application is any application installed in the terminal, and the first request information is information that requests the server to send an upgrade file;
the processor is further configured to, after receiving each sub-upgrade file sent by the server, obtain, through the input device, a digital digest that is generated in the server and corresponds to each sub-upgrade file;
the processor is further configured to generate a digital abstract corresponding to each sub-upgrade file in the terminal by using the specific algorithm for each sub-upgrade file, and compare the digital abstract with the digital abstract corresponding to each sub-upgrade file generated in the server;
and the processor is further configured to determine that the sub-upgrade files are complete if the sub-upgrade files are the same, store the sub-upgrade files in the memory, and splice all the sub-upgrade files into the upgrade file after all the sub-upgrade files are stored.
CN201611069989.7A 2016-11-28 2016-11-28 Method, server and terminal for acquiring upgrade file Active CN106775835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611069989.7A CN106775835B (en) 2016-11-28 2016-11-28 Method, server and terminal for acquiring upgrade file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611069989.7A CN106775835B (en) 2016-11-28 2016-11-28 Method, server and terminal for acquiring upgrade file

Publications (2)

Publication Number Publication Date
CN106775835A CN106775835A (en) 2017-05-31
CN106775835B true CN106775835B (en) 2020-01-10

Family

ID=58905173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611069989.7A Active CN106775835B (en) 2016-11-28 2016-11-28 Method, server and terminal for acquiring upgrade file

Country Status (1)

Country Link
CN (1) CN106775835B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329741B (en) * 2017-06-12 2020-12-25 北京北信源软件股份有限公司 Software distributed upgrading method and device based on fingerprint identification
CN107977222A (en) * 2017-12-21 2018-05-01 北京京存技术有限公司 Suitable for the conversion of the upgrade file of eMMC, generation method and device
CN109408085A (en) * 2018-09-27 2019-03-01 上海和数软件有限公司 Upgrade method, device, system and the storage medium of hardware wallet

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764117A (en) * 2005-10-12 2006-04-26 杭州华为三康技术有限公司 Method for sending upgrade software to optical network unit in Ethernet passive optical network
CN103051674A (en) * 2012-11-23 2013-04-17 深圳市航天泰瑞捷电子有限公司 Method and device for remotely upgrading wireless communication module as well as handheld unit (HHU)
CN105573785A (en) * 2015-12-11 2016-05-11 青岛海信电器股份有限公司 Differential package manufacturing method and device
CN105898490A (en) * 2016-06-22 2016-08-24 青岛海信电器股份有限公司 Upgrading method for remote controller, television and remote controller

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764117A (en) * 2005-10-12 2006-04-26 杭州华为三康技术有限公司 Method for sending upgrade software to optical network unit in Ethernet passive optical network
CN103051674A (en) * 2012-11-23 2013-04-17 深圳市航天泰瑞捷电子有限公司 Method and device for remotely upgrading wireless communication module as well as handheld unit (HHU)
CN105573785A (en) * 2015-12-11 2016-05-11 青岛海信电器股份有限公司 Differential package manufacturing method and device
CN105898490A (en) * 2016-06-22 2016-08-24 青岛海信电器股份有限公司 Upgrading method for remote controller, television and remote controller

Also Published As

Publication number Publication date
CN106775835A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
WO2021114918A1 (en) Integrity checking method and apparatus, terminal device and verification server
US10742694B2 (en) Method for migrating data and terminal
CN110225104B (en) Data acquisition method and device and terminal equipment
US20150154224A1 (en) Method, device, processing center and system for desktop synchronization
CN109471626B (en) Page logic structure, page generation method, page data processing method and device
CN110059273B (en) Method for displaying rich media on mobile terminal and mobile terminal
US20130326500A1 (en) Mobile terminal and application providing method for the same
CN110244963B (en) Data updating method and device and terminal equipment
JP6266588B2 (en) Synchronizing local and remote data
CN106775835B (en) Method, server and terminal for acquiring upgrade file
CN107368735B (en) Application installation method, mobile terminal and computer readable storage medium
WO2020233045A1 (en) Plug-in update method and device, server and computer readable storage medium
US9268782B2 (en) Re-use of binaries for multiple user accounts
WO2023050989A1 (en) Article display method and apparatus
CN110489158B (en) Method, device, medium and electronic equipment for optimizing code hosting platform
CN112069071B (en) Method and device for determining program suitability
CN109271266B (en) File transmission method and device and terminal equipment
CN109104481B (en) File integrity detection method, file integrity detection device and terminal equipment
CN110874729B (en) Switching method and switching device for electronic red packet identification strategy and mobile terminal
CN109298956B (en) File transmission method and device and terminal equipment
CN112015459A (en) Method and device for upgrading image file, terminal and readable storage medium
CN106354569A (en) Information processing method and terminal
CN106507413B (en) Method for sending message, mobile terminal and playing device
US20180329767A1 (en) Scalable Automated Detection Of Functional Behavior
CN114185804A (en) Interface testing method and device and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523841 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant