CN111343217B - Resource data downloading method and device, terminal equipment and computer storage medium - Google Patents

Resource data downloading method and device, terminal equipment and computer storage medium Download PDF

Info

Publication number
CN111343217B
CN111343217B CN201811550161.2A CN201811550161A CN111343217B CN 111343217 B CN111343217 B CN 111343217B CN 201811550161 A CN201811550161 A CN 201811550161A CN 111343217 B CN111343217 B CN 111343217B
Authority
CN
China
Prior art keywords
resource data
downloading
incremental
download
resource
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
CN201811550161.2A
Other languages
Chinese (zh)
Other versions
CN111343217A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811550161.2A priority Critical patent/CN111343217B/en
Publication of CN111343217A publication Critical patent/CN111343217A/en
Application granted granted Critical
Publication of CN111343217B publication Critical patent/CN111343217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a resource data downloading method, a device, terminal equipment and a computer storage medium, wherein the resource data downloading method comprises the following steps: receiving download information of resource data, wherein the download information comprises a first download address based on an unencrypted network request download protocol and a second download address based on an encrypted network request download protocol; according to the first download address, adopting an unencrypted network request download protocol to download resource data, and verifying the integrity of the downloaded resource; and if the resource integrity verification fails, adopting an encrypted network request download protocol to download the resource data according to the second download address.

Description

Resource data downloading method and device, terminal equipment and computer storage medium
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a resource data downloading method, a resource data downloading device, terminal equipment and a computer storage medium.
Background
The application program usually packages and stores some resources (for example, pictures or scripts, etc.) locally on the terminal device, and the application program can provide corresponding services for the user according to these resources. In addition, the application program will update the provided service, and at this time, the corresponding resource data needs to be downloaded to update the locally stored resource of the application program.
In the process of downloading and updating resources, because the network environment of the internet is complex, the downloaded resource data is easily hijacked, and the like, so that the downloaded resource data is easily mistaken, and further, the resource downloading and updating are abnormal. In view of the above, how to provide a method for downloading resource data that can solve the above problems is an urgent need to solve the problems.
Disclosure of Invention
In view of this, embodiments of the present invention provide a resource data downloading method, apparatus, terminal device and computer storage medium to solve the above problems.
According to a first aspect of the embodiments of the present invention, there is provided a resource data downloading method, including:
receiving download information of resource data, wherein the download information comprises a first download address based on an unencrypted network request download protocol and a second download address based on an encrypted network request download protocol; according to the first downloading address, downloading resource data by adopting an unencrypted network request downloading protocol, and verifying the integrity of the downloaded resource; and if the resource integrity verification fails, adopting an encrypted network request download protocol to download the resource data according to the second download address.
According to a second aspect of the embodiments of the present invention, there is provided a resource data downloading apparatus, including: the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving downloading information of resource data, and the downloading information comprises a first downloading address based on an unencrypted network request downloading protocol and a second downloading address based on an encrypted network request downloading protocol; the first downloading module is used for requesting a downloading protocol to download the resource data by adopting an unencrypted network according to the first downloading address and verifying the integrity of the downloaded resource; and the second downloading module is used for downloading the resource data by adopting the encrypted network request downloading protocol according to the second downloading address if the verification of the integrity of the resource fails.
According to a third aspect of the embodiments of the present invention, there is provided a terminal device, including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface are communicated with each other through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the resource data downloading method.
According to a fourth aspect of embodiments of the present invention, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the resource data downloading method as described above.
According to the scheme provided by the embodiment of the invention, the downloading information of the resource data is received, wherein the downloading information comprises a first downloading address based on an unencrypted network request downloading protocol and a second downloading address based on an encrypted network request downloading protocol; according to the first download address, adopting an unencrypted network request download protocol to download resource data, and verifying the integrity of the downloaded resource; if the verification of the integrity of the resource fails, downloading the resource data by adopting the encrypted network request downloading protocol according to the second downloading address, and preferably adopting an unencrypted downloading protocol to download, thereby avoiding the problem of large resource consumption of the server caused by directly adopting the encrypted network request downloading protocol to download the resource data; and after the verification of the integrity of the resource fails, the downloading protocol is switched from the unencrypted network request downloading protocol to the encrypted network request downloading protocol, so that the success rate of downloading the resource data is ensured through the encrypted network request downloading protocol, and the problem of unsuccessful resource downloading caused by the fact that the downloaded resource data is easy to generate errors in the downloading mode in the prior art is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present invention, and it is also possible for a person skilled in the art to obtain other drawings based on the drawings.
Fig. 1 is a flowchart illustrating steps of a resource data downloading method according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of a resource data downloading method according to a second embodiment of the present invention;
fig. 3 is a block diagram of a resource data downloading device according to a third embodiment of the present invention;
fig. 4 is a block diagram of a resource data downloading method according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal device according to a fifth embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention shall fall within the scope of the protection of the embodiments of the present invention.
The following further describes concrete implementation of the embodiment of the invention by combining the drawings of the embodiment of the invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of a resource data downloading method according to a first embodiment of the present invention is shown.
The resource data downloading method of the embodiment comprises the following steps:
s102, receiving downloading information of the resource data.
The downloading information comprises a first downloading address based on the unencrypted network request downloading protocol and a second downloading address based on the encrypted network request downloading protocol.
The resource data downloading method provided by this embodiment may be applied to any suitable terminal device, including but not limited to a mobile phone, a tablet computer, a notebook computer, a PC, and the like. In this embodiment, the background server or the corresponding resource pushing platform may push the downloading information of the resource data to the application installed in the terminal device, so as to realize downloading of the resource data. When the terminal device receives the download information of the pushed resource data, the terminal device can be triggered to automatically start downloading the resource data.
It should be noted that the terminal device uses different system platforms, and the download address may be different. For example, the difference between the application developed for the Android platform and the application developed for the iOS platform is large, and if the resource package developed for the Android platform is updated on the iOS platform, an error may occur in the application or the effect may be deteriorated. In addition, even for the same platform, due to inconsistent version information of the platform (for example, android6.0 and android 8.1), the downloaded resource data cannot be normally used.
Therefore, when pushing the download information of the resource data, the background server or the corresponding resource pushing platform may first determine the system platform information thereof through the interface of the terminal device, and then determine the download information of the resource data suitable for the background server or the corresponding resource pushing platform.
In this embodiment, the download protocol of the unencrypted network request may be an HTTP protocol; the download protocol requested by the encryption network may be the HTTPS protocol. Compared with HTTPS, when the HTTP protocol is adopted to download the resource data, the downloading speed is higher, and the server resources consumed in the downloading process are less; however, compared with the HTTP protocol, when downloading the resource data using the HTTPs protocol, the downloaded content is not easily tampered, and the downloaded resource data has a higher possibility of passing the integrity check in the following steps.
In this embodiment, the download addresses of the two download protocols are provided at the same time, and the download protocol can be switched to the encrypted network request download protocol to download the resource data after the integrity verification of the resource data downloaded based on the unencrypted network request download protocol fails, thereby ensuring the possibility of successful download of the resource data.
And S104, downloading the resource data by adopting an unencrypted network request downloading protocol according to the first downloading address, and verifying the integrity of the downloaded resource.
In this embodiment, as described above, when the unencrypted network is used to request the download protocol to download the resource data, errors such as hijacking and tampering of the resource may occur during the downloading process, and at this time, after the downloading of the resource data is completed, the integrity of the resource may be verified, so that it is determined that no error occurs during the downloading process of the resource data. In particular, the integrity of the resource may be verified by verifying the digest information of the resource data, e.g., md5, etc.
And S106, if the verification of the integrity of the resource fails, downloading the resource data by adopting the encrypted network request downloading protocol according to the second downloading address.
In this embodiment, if the verification of the integrity of the resource fails, it may be determined that the downloaded resource data is in error, that is, the resource data may be tampered in the downloading process, and at this time, the downloading protocol may be switched, that is, the encrypted network is used to request the downloading protocol to download the resource data according to the second downloading address.
In a resource data downloading mode provided in the prior art, the resource downloading information only includes a first downloading address of an unencrypted network request downloading protocol or only includes a second downloading address of an encrypted network request downloading protocol, so that in the prior art, the resource data can be downloaded only by adopting one of the unencrypted network request downloading protocol or the encrypted network request downloading protocol, which easily causes a downloading error or causes a downloading process to consume a large amount of resources of a server; in the resource data downloading method provided by this embodiment, the downloading addresses corresponding to the two protocols are simultaneously packaged in the resource downloading information, so that, compared with the prior art, the scheme provided by this embodiment preferentially adopts the unencrypted downloading protocol for downloading, thereby avoiding the problem of large server resource consumption caused by directly adopting the encrypted network to request the downloading protocol to download the resource data; and after the verification of the integrity of the resource fails, the downloading protocol is switched from the unencrypted network request downloading protocol to the encrypted network request downloading protocol, so that the success rate of downloading the resource data is ensured through the encrypted network request downloading protocol, and the problem of unsuccessful resource downloading caused by the fact that the downloaded resource data is easy to generate errors in the downloading mode in the prior art is avoided.
The resource data downloading method of the present embodiment may be executed by any suitable terminal device with data processing capability, including but not limited to: mobile terminals (such as tablet computers, mobile phones and the like) and PCs.
Example two
Referring to fig. 2, a flowchart illustrating steps of a resource data downloading method according to a second embodiment of the present invention is shown.
The resource data downloading method of the embodiment comprises the following steps:
s202, the terminal equipment receives the resource updating data pushed by the resource pushing platform.
In this embodiment, the resource update data may be specifically used to update an application installed in the terminal device; the resource pushing platform may specifically be a resource pushing platform corresponding to an application market installed in the terminal device, a resource pushing platform corresponding to an application program installed in the terminal device, and the like, which is not limited in this embodiment.
In this embodiment, the pushed resource update data may include, but is not limited to, added or upgraded service information, version information, required new authority information, resource download information, and the like.
S204, the terminal equipment receives and analyzes the resource updating data to acquire downloading information of the resource data.
In this embodiment, the terminal device may parse the resource update data, and display a part of the parsed content to the user, for example, the parsed data may include: added or upgraded service information, version information, required new rights information, resource download information, etc., and the information presented to the user may include: version information, required new authority information, updated added or upgraded service information, and the like.
The resource downloading information may include a first downloading address based on the unencrypted network request downloading protocol and a second downloading address based on the encrypted network request downloading protocol.
Optionally, in this embodiment, the downloaded resource data may be incremental resource data, the first download address may include a first incremental resource data download address, and the second download address may include a second incremental resource data download address. So that the incremental resource data can be downloaded through the subsequent steps S206, S208.
S206, according to the first incremental resource data downloading address, adopting an unencrypted network request downloading protocol to download the incremental resource data, and verifying the integrity of the downloaded incremental resource data.
In the process of downloading the incremental resource data to the target object by using the unencrypted network request download protocol, an error may occur in the downloading of the incremental resource data, for example, the downloading of the incremental resource data fails, the incremental resource data is tampered in the downloading process, and therefore, the integrity of the incremental resource data needs to be verified. If the integrity of the incremental resource data passes the verification, directly executing step S210; if the integrity verification of the incremental resource data fails, the following step S208 is continuously performed.
Optionally, in this embodiment, the downloading information of the resource data may further include: and the standby address corresponds to the first incremental resource data downloading address. If the integrity verification of the incremental resource data in step S206 fails, the incremental resource data may be downloaded again by using the unencrypted network request download protocol according to the backup address, and the integrity verification of the downloaded incremental resource data may be performed. Similarly, if the integrity of the incremental resource data passes the verification, the step S210 is directly executed; if the integrity verification of the incremental resource data fails, the following step S208 is continuously performed.
In this embodiment, the integrity of the incremental resource data may be verified by verifying summary information (e.g., MD5 data) of the incremental resource data, or may be verified by verifying other check values, which is not limited in this embodiment.
And S208, downloading the incremental resource data by adopting an encrypted network request downloading protocol according to the second incremental resource data downloading address, and verifying the integrity of the incremental resource data.
In this step, an encrypted network request downloading protocol is used when downloading the incremental resource data, so that the incremental resource data is less likely to be tampered in the downloading process, and the incremental resource data downloaded in this step is more likely to pass integrity verification than the incremental resource data downloaded in step S206.
In this step, if the integrity verification passes, the following step S210 is executed; if the integrity check fails, which proves that the incremental resource data downloaded in step S208 is in error, step S212 is executed to download the complete resource data.
It should be further noted that, in this embodiment, after the incremental resource data is downloaded, on the basis of verifying the integrity of the incremental resource data, the validity of the incremental resource data may also be verified, and if the validity verification fails, it is determined that the downloaded incremental resource data is invalid. By verifying the effectiveness of the incremental resource data, the application program can be updated according to the effective incremental resource data, and the update failure or the application program crash caused when the application program is updated by using the invalid incremental resource data is avoided.
Specifically, verifying the validity of the incremental resource data comprises: the validity of the incremental resource data is verified according to the merging result of the incremental resource data and the existing resource data of the application program by merging the incremental resource data and the existing resource data of the application program in the following step S210. After the incremental resource data are downloaded, combining the incremental resource data with the existing resource data of the application program for many times until the combination is successful, or the number of times of combination failure is greater than a set threshold value; if the merging is successful, determining that the application program can be updated successfully; and if the number of times of merging failure is greater than a set threshold, determining that the resource validity verification fails. The set threshold may be set by a person skilled in the art as appropriate according to actual needs, and the embodiment of the present invention is not limited to this, and may be set to 3 times, for example, so that it may be determined that the reason for the merging error is not an accidental factor through multiple merging failures, but the downloaded incremental resource data is abnormal, for example, the downloaded incremental resource data has an error, and thus, the accuracy of the verification result is improved.
Specifically, another verification of the validity of the incremental resource data may include: and verifying the validity of the incremental resource data according to the generation time information of the incremental resource data. After the incremental resource data are downloaded, the generation time information of the incremental resource data can be verified locally or to a server, if the generation time is the latest time, the validity verification is passed, and if not, the validity verification is not passed. By verifying the generation time information of the incremental resource data, whether the incremental resource data is the latest resource for updating can be directly determined according to the generation time information, and the efficiency of verifying the validity is higher.
Specifically, another method for verifying the validity of the incremental resource data may include: and verifying the validity of the incremental resource data according to the version information of the incremental resource data. After the incremental resource data is downloaded, the version information of the incremental resource data can be verified locally or to a server, if the version information is the version information corresponding to the latest version of the target object, the validity verification is passed, and if the version information is not the version information corresponding to the latest version of the target object, the validity verification is not passed. By verifying the version information of the incremental resource data, whether the incremental resource data corresponds to the latest version can be directly determined according to the version information, and the efficiency of verifying the validity is higher.
Specifically, another method for verifying the validity of the incremental resource data may include: and verifying the validity of the incremental resource data according to the validation identifier of the incremental resource data. After the application program generates the latest version, the effectiveness identification can be added to the incremental resource data corresponding to the latest version, or other incremental resource data can be set as historical incremental resource data, and the ineffective identification is added; after the incremental resource data is downloaded, whether the identifier of the incremental resource data is a valid identifier or not can be verified to a server or a resource pushing platform, if yes, the validity verification is passed, and if not, the validity verification is not passed. The process of verifying the effective identification of the incremental resource data can be executed by the terminal equipment or the server, and the verification process is more convenient and faster as long as the effective identification is unified.
The above-mentioned multiple verification methods may be used alone or in combination, and this embodiment does not limit this.
It should be noted that the method for verifying the validity of the resource data in this step may also be applied to other steps for verifying the validity of the resource data, for example, applied to step S206. Of course, in actual use, the validity of the resource data may be verified only in the step S206, or only in the step S208, while other steps may verify the validity of the resource data in other suitable manners. The validity of the resource data may also be verified in the above-described manner in both step S206 and step S208.
And S210, carrying out data merging on the incremental resource data and the existing resource data stored locally.
If the merging fails, the complete resource data is downloaded through step S212.
For a specific method for combining incremental resource data and existing resource data, reference may be made to related technologies, and this embodiment is not described herein again.
S212, downloading the complete resource data.
Specifically, in this embodiment, the first download address further includes a first complete resource data download address, and the second download address further includes a second complete resource data download address. The step may specifically include: according to the first complete resource data downloading address, adopting an unencrypted network request downloading protocol to download complete resource data, and verifying the integrity of the complete resource data; and if the integrity verification of the complete resource data fails, downloading the complete resource data by adopting an encrypted network request downloading protocol according to the second complete resource data downloading address.
The same as the above steps, the download protocol of the non-encrypted network request in this embodiment may be an HTTP protocol; the download protocol based on the encrypted network request may be an HTTPS protocol. Similarly, compared with the HTTPS, the incremental resource data is downloaded through the first download address of the HTTP protocol, and the download speed is higher; however, compared with the HTTP protocol, when downloading is performed by the HTTPs-based protocol, the downloaded content is not easily tampered, so that the integrity of the downloaded resource is higher.
After the resource data downloading through the incremental resource data fails, the complete resource data is downloaded and used for downloading the resource data, so that the accuracy and efficiency of the resource data downloading can be effectively ensured.
According to the resource data downloading scheme provided by the embodiment, the unencrypted downloading protocol is preferentially adopted for downloading, so that the problem of high server resource consumption caused by directly adopting the encrypted network request downloading protocol to download the resource data is avoided; after the verification of the integrity of the resource fails, the downloading protocol is switched from the unencrypted network request downloading protocol to the encrypted network request downloading protocol, so that the success rate of downloading the resource data is ensured through the encrypted network request downloading protocol, and the problem of unsuccessful resource downloading caused by the fact that the downloaded resource data is easy to generate errors in the downloading mode in the prior art is avoided; according to the scheme provided by the embodiment, the first download address and the second download address can be directly added into the pushed resource download information by pushing the resource download information, an active request of an application program installed in the terminal equipment is not required, and the operation is convenient and rapid; in addition, in the scheme provided by this embodiment, on the basis of preferentially adopting the unencrypted network request download protocol for downloading, the incremental data is preferentially downloaded, so that the download speed is increased, and the resource data download mode with the highest security (i.e., complete resource data is downloaded through the encrypted network request download protocol) is arranged to the end, so that the possibility of resource data download failure is greatly reduced; of course, in actual use, various manners provided by the embodiment may be deleted appropriately, and the embodiment does not limit this.
The resource data downloading method of the present embodiment may be executed by any suitable terminal device with data processing capability, including but not limited to: mobile terminals (such as tablet computers, mobile phones and the like) and PCs.
EXAMPLE III
Referring to fig. 3, there is shown a block diagram of a data updating apparatus according to a third embodiment of the present invention.
The data update apparatus shown in fig. 3 includes: a receiving module 302, a first downloading module 304, and a second downloading module 306.
The receiving module 302 is configured to receive download information of the resource data.
The downloading information comprises a first downloading address based on the unencrypted network request downloading protocol and a second downloading address based on the encrypted network request downloading protocol.
The first downloading module 304 is configured to request a downloading protocol to download the resource data using the unencrypted network according to the first downloading address, and verify the integrity of the resource after the downloading is completed.
The second downloading module 306 is configured to, if the verification of the integrity of the resource fails, download the resource data by using the encrypted network request downloading protocol according to the second downloading address.
The data updating scheme provided by the embodiment of the invention can preferentially adopt the unencrypted downloading protocol for downloading, thereby avoiding the problem of large resource consumption of the server caused by directly adopting the encrypted network request downloading protocol to download the resource data; and after the verification of the integrity of the resource fails, the downloading protocol is switched from the unencrypted network request downloading protocol to the encrypted network request downloading protocol, so that the success rate of downloading the resource data is ensured through the encrypted network request downloading protocol, and the problem of unsuccessful resource downloading caused by the fact that the downloaded resource data is easy to generate errors in the downloading mode in the prior art is further avoided.
Example four
Referring to fig. 4, there is shown a block diagram of a data updating apparatus according to a fourth embodiment of the present invention.
As shown in fig. 4, the data updating apparatus includes a receiving module 402, a first incremental resource downloading module 404, and a second incremental resource downloading module 406.
The receiving module 402 is configured to receive download information of resource data.
The downloading information comprises a first downloading address based on an unencrypted network request downloading protocol and a second downloading address based on an encrypted network request downloading protocol, the first downloading address comprises a first incremental resource data downloading address used for downloading incremental resource data, and the second downloading address comprises a second incremental resource data downloading address used for downloading incremental resource data.
A first incremental resource downloading module 404, configured to download the incremental resource data according to the first incremental resource data downloading address by using an unencrypted network request downloading protocol, and verify the integrity of the incremental resource data after downloading.
And a second incremental resource downloading module 406, configured to, if the integrity verification of the incremental resource data fails, download the incremental resource data according to the second incremental resource data download address by using an encrypted network request download protocol, and verify the integrity of the incremental resource data.
In an alternative embodiment, the apparatus further comprises: a full resource download module 408; if the integrity of the incremental resource data is successfully verified, the incremental resource data and the existing resource data stored locally are subjected to data merging, and if the merging fails, the complete resource data is downloaded through the complete resource downloading module 408.
In an alternative embodiment, the apparatus further comprises: a full resource download module 408; if the integrity verification of the incremental resource data fails after the incremental resource data is downloaded according to the second incremental resource data download address, the complete resource data is downloaded through the complete resource download module 408.
In an optional embodiment, the first download address further includes a first complete resource data download address, and the second download address further includes a second complete resource data download address; the complete resource downloading module comprises: the first complete resource downloading module is used for downloading complete resource data by adopting an unencrypted network request downloading protocol according to the first complete resource data downloading address and verifying the integrity of the complete resource data;
and the second complete resource downloading module is used for downloading complete resource data by adopting an encrypted network request downloading protocol according to the second complete resource data downloading address if the integrity verification of the complete resource data fails.
According to the resource data downloading scheme provided by the embodiment, the unencrypted downloading protocol is preferentially adopted for downloading, so that the problem of high server resource consumption caused by directly adopting an encrypted network request downloading protocol to download the resource data is avoided; after the verification of the integrity of the resource fails, the downloading protocol is switched from the unencrypted network request downloading protocol to the encrypted network request downloading protocol, so that the success rate of downloading the resource data is ensured through the encrypted network request downloading protocol, and the problem of unsuccessful resource downloading caused by the fact that the downloaded resource data is easy to generate errors in the downloading mode in the prior art is avoided; according to the scheme provided by the embodiment, the first download address and the second download address can be directly added into the pushed resource download information by pushing the resource download information, an active request of an application program installed in the terminal equipment is not required, and the operation is convenient and rapid; in addition, in the scheme provided by this embodiment, on the basis of preferentially adopting the unencrypted network request download protocol for downloading, the incremental data is preferentially downloaded, so that the download speed is increased, and the resource data download mode with the highest security (i.e., complete resource data is downloaded through the encrypted network request download protocol) is arranged to the end, so that the possibility of resource data download failure is greatly reduced; of course, in actual use, various modes provided by this embodiment may be appropriately deleted, and this embodiment does not limit this.
EXAMPLE five
A terminal device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the corresponding operation of the data updating method.
Specifically, referring to fig. 5, a schematic structural diagram of a terminal device according to a fifth embodiment of the present invention is shown, and the specific embodiment of the present invention does not limit the specific implementation of the terminal device.
As shown in fig. 5, the terminal device may include: a processor (processor) 502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein:
the processor 502, communication interface 504, and memory 506 communicate with each other via a communication bus 508.
A communication interface 504 for communicating with other terminal devices or servers.
The processor 502 is configured to execute the program 510, and may specifically perform the relevant steps in the above-described data updating method embodiment.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit (AS IC), or one or more Integrated circuits configured to implement embodiments of the present invention. The terminal device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may specifically be used to cause the processor 502 to perform the following operations:
receiving download information of resource data, wherein the download information comprises a first download address based on an unencrypted network request download protocol and a second download address based on an encrypted network request download protocol; according to the first download address, adopting an unencrypted network request download protocol to download resource data, and verifying the integrity of the downloaded resource; and if the resource integrity verification fails, adopting an encrypted network request download protocol to download the resource data according to the second download address.
In an optional embodiment, the first download address includes a first incremental resource data download address for downloading incremental resource data, and the second download address includes a second incremental resource data download address for downloading incremental resource data; the downloading the resource data by adopting the unencrypted network request downloading protocol according to the first downloading address, and verifying the integrity of the downloaded resource comprises the following steps: according to the first incremental resource data downloading address, adopting an unencrypted network request downloading protocol to download the incremental resource data, and verifying the integrity of the downloaded incremental resource data; if the resource integrity verification fails, the downloading the resource data by using the encrypted network request downloading protocol according to the second downloading address comprises the following steps: and if the integrity verification of the incremental resource data fails, downloading the incremental resource data by adopting an encrypted network request downloading protocol according to the second incremental resource data downloading address, and verifying the integrity of the incremental resource data.
In an optional embodiment, the method further comprises: and if the integrity verification of the incremental resource data is successful, performing data merging on the incremental resource data and the existing resource data stored locally, and if the merging fails, downloading the complete resource data.
In an optional embodiment, the method further comprises: and if the integrity verification of the incremental resource data fails after the incremental resource data are downloaded according to the second incremental resource data download address, downloading the complete resource data.
In an optional embodiment, the first download address further includes a first complete resource data download address, and the second download address further includes a second complete resource data download address; the downloading of the complete resource data comprises: according to the first complete resource data downloading address, adopting an unencrypted network request downloading protocol to download complete resource data, and verifying the integrity of the complete resource data; and if the integrity verification of the complete resource data fails, downloading the complete resource data by adopting an encrypted network request downloading protocol according to the second complete resource data downloading address.
For specific implementation of each step in the program 510, reference may be made to corresponding steps and corresponding descriptions in units in the foregoing data updating method embodiments, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
The terminal equipment of the embodiment can preferentially adopt the unencrypted downloading protocol for downloading, thereby avoiding the problem of large resource consumption of the server caused by directly adopting the encrypted network to request the downloading protocol to download the resource data; and after the verification of the integrity of the resource fails, the downloading protocol is switched from the unencrypted network request downloading protocol to the encrypted network request downloading protocol, so that the success rate of downloading the resource data is ensured through the encrypted network request downloading protocol, and the problem of unsuccessful resource downloading caused by the fact that the downloaded resource data is easy to generate errors in the downloading mode in the prior art is avoided.
EXAMPLE six
An embodiment of the present application provides a computer storage medium, on which a computer program is stored, which when executed by a processor implements the data updating method as described above.
The computer storage medium of the embodiment can preferentially adopt the unencrypted downloading protocol for downloading, thereby avoiding the problem of large resource consumption of the server caused by directly adopting an encrypted network request downloading protocol to download the resource data; and after the verification of the integrity of the resource fails, the downloading protocol is switched from the unencrypted network request downloading protocol to the encrypted network request downloading protocol, so that the success rate of downloading the resource data is ensured through the encrypted network request downloading protocol, and the problem of unsuccessful resource downloading caused by the fact that the downloaded resource data is easy to generate errors in the downloading mode in the prior art is avoided.
It should be noted that, according to the implementation requirement, each component/step described in the embodiment of the present invention may be divided into more components/steps, and two or more components/steps or partial operations of the components/steps may also be combined into a new component/step to achieve the purpose of the embodiment of the present invention.
The above-described method according to an embodiment of the present invention may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware such as an ASIC or FPGA. It will be appreciated that the computer, processor, microprocessor controller or programmable hardware includes memory components (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the resource data download methods described herein. Further, when a general-purpose computer accesses code for implementing the resource data download methods illustrated herein, execution of the code transforms the general-purpose computer into a special-purpose computer for performing the resource data download methods illustrated herein.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. 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 embodiments of the present invention.
The above embodiments are only for illustrating the embodiments of the present invention and not for limiting the embodiments of the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention, so that all equivalent technical solutions also belong to the scope of the embodiments of the present invention, and the scope of patent protection of the embodiments of the present invention should be defined by the claims.

Claims (12)

1. A method for downloading resource data, comprising:
receiving download information of resource data, wherein the download information comprises a first download address based on an unencrypted network request download protocol and a second download address based on an encrypted network request download protocol;
according to the first downloading address, downloading resource data by adopting an unencrypted network request downloading protocol, and verifying the integrity of the downloaded resource;
if the verification of the integrity of the resource fails, adopting an encrypted network request download protocol to download the resource data according to the second download address;
wherein the resource data includes incremental resource data, and verifying the validity of the incremental resource data by at least one of the following steps after verifying the integrity of the downloaded resource:
verifying the validity of the incremental resource data according to the merging result of the incremental resource data and the existing resource data of the application program;
verifying the validity of the incremental resource data according to the generation time information of the incremental resource data;
verifying the validity of the incremental resource data according to the version information of the incremental resource data;
verifying the validity of the incremental resource data according to the validation identifier of the incremental resource data;
the receiving of the download information of the resource data includes:
receiving and analyzing resource updating data pushed by a resource pushing platform to acquire downloading information of the resource data;
displaying the analyzed part of content to a user, wherein the content displayed to the user comprises: version information, required new authority information, and updated added or upgraded service information.
2. The method of claim 1, wherein the first download address comprises a first incremental resource data download address for downloading incremental resource data, and wherein the second download address comprises a second incremental resource data download address for downloading incremental resource data;
the downloading the resource data by adopting the unencrypted network request downloading protocol according to the first downloading address, and verifying the integrity of the downloaded resource comprises the following steps: according to the first incremental resource data downloading address, downloading incremental resource data by adopting an unencrypted network request downloading protocol, and verifying the integrity of the downloaded incremental resource data;
if the resource integrity verification fails, the downloading the resource data by using the encrypted network request downloading protocol according to the second downloading address comprises the following steps: and if the integrity verification of the incremental resource data fails, downloading the incremental resource data by adopting an encrypted network request downloading protocol according to the second incremental resource data downloading address, and verifying the integrity of the incremental resource data.
3. The method of claim 2, further comprising:
if the integrity verification of the incremental resource data is successful, the incremental resource data and the existing resource data stored locally are subjected to data combination, and if the combination fails, the complete resource data is downloaded.
4. The method of claim 2, further comprising: and if the integrity verification of the incremental resource data fails after the incremental resource data are downloaded according to the second incremental resource data download address, downloading the complete resource data.
5. The method of claim 3 or 4, wherein the first download address further comprises a first full resource data download address and the second download address further comprises a second full resource data download address;
the downloading the complete resource data comprises:
according to the first complete resource data downloading address, adopting an unencrypted network request downloading protocol to download complete resource data, and verifying the integrity of the complete resource data;
and if the integrity verification of the complete resource data fails, downloading the complete resource data by adopting an encrypted network request downloading protocol according to the second complete resource data downloading address.
6. A resource data downloading apparatus, comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving downloading information of resource data, and the downloading information comprises a first downloading address based on an unencrypted network request downloading protocol and a second downloading address based on an encrypted network request downloading protocol;
the first downloading module is used for requesting a downloading protocol to download the resource data by adopting an unencrypted network according to the first downloading address and verifying the integrity of the downloaded resource;
the second downloading module is used for downloading the resource data by adopting the encrypted network request downloading protocol according to the second downloading address if the verification of the integrity of the resource fails;
the resource data comprises incremental resource data, and the first downloading module is further configured to verify the validity of the incremental resource data through at least one of the following after verifying the integrity of the resource after the downloading is completed:
verifying the validity of the incremental resource data according to the merging result of the incremental resource data and the existing resource data of the application program;
verifying the validity of the incremental resource data according to the generation time information of the incremental resource data;
verifying the validity of the incremental resource data according to the version information of the incremental resource data;
verifying the validity of the incremental resource data according to the validation identifier of the incremental resource data;
the receiving module is specifically configured to: receiving and analyzing resource updating data pushed by a resource pushing platform to acquire downloading information of the resource data; and displaying the analyzed partial content to a user, wherein the content displayed to the user comprises: version information, required new authority information, and updated added or upgraded service information.
7. The apparatus of claim 6, wherein the first download address comprises a first incremental resource data download address for downloading incremental resource data, and wherein the second download address comprises a second incremental resource data download address for downloading incremental resource data;
the first downloading module comprises a first incremental resource downloading module and is used for downloading incremental resource data by adopting an unencrypted network request downloading protocol according to the first incremental resource data downloading address and verifying the integrity of the downloaded incremental resource data;
the second downloading module comprises a second incremental resource downloading module used for downloading the incremental resource data by adopting the encrypted network request downloading protocol according to the second incremental resource data downloading address and verifying the integrity of the incremental resource data if the integrity verification of the incremental resource data fails.
8. The apparatus of claim 7, further comprising: a complete resource download module;
if the integrity verification of the incremental resource data is successful, the incremental resource data and the existing resource data stored locally are subjected to data merging, and if the merging fails, the complete resource data is downloaded through the complete resource downloading module.
9. The apparatus of claim 7, further comprising: a complete resource downloading module;
and if the integrity verification of the incremental resource data fails after the incremental resource data is downloaded according to the second incremental resource data download address, downloading the complete resource data through the complete resource download module.
10. The apparatus of claim 8 or 9, wherein the first download address further comprises a first full resource data download address, and wherein the second download address further comprises a second full resource data download address;
the complete resource download module comprises:
the first complete resource downloading module is used for downloading complete resource data by adopting an unencrypted network request downloading protocol according to the first complete resource data downloading address and verifying the integrity of the complete resource data;
and the second complete resource downloading module is used for downloading complete resource data by adopting an encrypted network request downloading protocol according to the second complete resource data downloading address if the integrity verification of the complete resource data fails.
11. A terminal device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the resource data downloading method according to any one of claims 1-5.
12. A computer storage medium having stored thereon a computer program which, when executed by a processor, implements the resource data download method according to any of claims 1-5.
CN201811550161.2A 2018-12-18 2018-12-18 Resource data downloading method and device, terminal equipment and computer storage medium Active CN111343217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811550161.2A CN111343217B (en) 2018-12-18 2018-12-18 Resource data downloading method and device, terminal equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811550161.2A CN111343217B (en) 2018-12-18 2018-12-18 Resource data downloading method and device, terminal equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN111343217A CN111343217A (en) 2020-06-26
CN111343217B true CN111343217B (en) 2023-04-07

Family

ID=71187875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811550161.2A Active CN111343217B (en) 2018-12-18 2018-12-18 Resource data downloading method and device, terminal equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN111343217B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580267A (en) * 2013-10-09 2015-04-29 北京奇虎科技有限公司 A resource downloading method, device, server and corresponding system
WO2016029639A1 (en) * 2014-08-27 2016-03-03 百度在线网络技术(北京)有限公司 Method and device for downloading and pushing online resource to mobile terminal
CN106897086A (en) * 2017-01-13 2017-06-27 北京光年无限科技有限公司 Method, apparatus and system for upgraded machine people's operating system
CN107733953A (en) * 2016-08-11 2018-02-23 平安科技(深圳)有限公司 Resource downloading method and device

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119226A (en) * 2006-07-31 2008-02-06 中兴通讯股份有限公司 Method and system for updating terminal equipment database configuration
CN103078881B (en) * 2011-10-26 2016-05-11 腾讯科技(深圳)有限公司 Internet resources Download Info share control system and method
CN103259672B (en) * 2012-02-17 2016-09-28 阿里巴巴集团控股有限公司 Method for upgrading software and system
CN103647816A (en) * 2013-12-03 2014-03-19 北京奇虎科技有限公司 Method and device for upgrading application software
US20160094653A1 (en) * 2014-09-30 2016-03-31 International Business Machines Corporation Optimizing resource downloads or streams using a collection of trusted network connected endpoints
CN105681383B (en) * 2014-11-21 2020-03-03 腾讯科技(成都)有限公司 Application upgrading data packet downloading method, device, terminal, server and system
CN106257879B (en) * 2015-06-16 2020-02-14 阿里巴巴集团控股有限公司 Method and device for downloading application
US20170171357A1 (en) * 2015-12-15 2017-06-15 Le Holdings (Beijing) Co., Ltd. Apparatus and method for assisting in downloading file successfully
CN106909427B (en) * 2017-03-23 2020-09-22 北京奇虎科技有限公司 Software updating method and device and software updating data publishing method and system
CN107257361A (en) * 2017-05-27 2017-10-17 广东艾檬电子科技有限公司 A kind of method and mobile terminal for downloading application program
CN108111331B (en) * 2017-11-06 2021-04-16 北京趣拿软件科技有限公司 Method, device, storage medium, processor and system for acquiring update data packet
CN108733400A (en) * 2018-04-27 2018-11-02 新光互联投资管理有限公司 A kind of hot update method of App increments and service system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580267A (en) * 2013-10-09 2015-04-29 北京奇虎科技有限公司 A resource downloading method, device, server and corresponding system
WO2016029639A1 (en) * 2014-08-27 2016-03-03 百度在线网络技术(北京)有限公司 Method and device for downloading and pushing online resource to mobile terminal
CN107733953A (en) * 2016-08-11 2018-02-23 平安科技(深圳)有限公司 Resource downloading method and device
CN106897086A (en) * 2017-01-13 2017-06-27 北京光年无限科技有限公司 Method, apparatus and system for upgraded machine people's operating system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
R. Rummler ; A.H. Aghvami.End-to-end IP multicast for software upgrades of reconfigurable user terminals within IMT-2000/UMTS networks.《2002 IEEE International Conference on Communications. Conference Proceedings. ICC 2002 (Cat. No.02CH37333)》.2002, *
分布式测试系统的软件增量更新设计;张莹莹;《计算机测量与控制》;20181115;162-166页 *

Also Published As

Publication number Publication date
CN111343217A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
CN108494771B (en) Electronic device, firewall opening verification method and storage medium
WO2020233308A1 (en) Self-checking method, apparatus and device based on local certificate, and storage medium
US11907700B2 (en) Upgrading method and system, server, and terminal device
CN108092775B (en) Calibration method and device, and electronic device
CN110784450A (en) Single sign-on method and device based on browser
CN110058867B (en) Application program mirror image packaging and installing method, computer device and storage medium
CN106257879B (en) Method and device for downloading application
CN110247897B (en) System login method, device, gateway and computer readable storage medium
WO2020010727A1 (en) Application update method and device, and computer readable storage medium
CN106709281B (en) Patch granting and acquisition methods, device
CN113259429B (en) Session maintenance management and control method, device, computer equipment and medium
CN111176685A (en) Upgrading method and device
CN113051539A (en) Method and device for calling digital certificate
CN114329358A (en) Application signature method and system, transaction terminal and service platform
CN111343217B (en) Resource data downloading method and device, terminal equipment and computer storage medium
CN116827551A (en) Method and device for preventing global override
WO2020233044A1 (en) Plug-in verification method and device, and server and computer-readable storage medium
CN112732676B (en) Block chain-based data migration method, device, equipment and storage medium
CN109284616B (en) Data access and data issuing method, device, equipment and storage medium
CN114143197A (en) OTA (over the air) upgrading method, device and equipment of Internet of things equipment and readable storage medium
CN112836190A (en) Resource data authority control method and device and intelligent terminal
CN108200060B (en) Single sign-on verification method based on web subsystem, server and storage medium
CN113015156A (en) Mobile phone number batch binding changing method, terminal and computer readable storage medium
CN112306527A (en) Server upgrading method and device, computer equipment and storage medium
CN112464225A (en) Request processing method, request processing device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant