CN111698281B - Resource downloading method and device, electronic equipment and storage medium - Google Patents

Resource downloading method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111698281B
CN111698281B CN202010340185.6A CN202010340185A CN111698281B CN 111698281 B CN111698281 B CN 111698281B CN 202010340185 A CN202010340185 A CN 202010340185A CN 111698281 B CN111698281 B CN 111698281B
Authority
CN
China
Prior art keywords
download
resource
downloaded
current
target preset
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
CN202010340185.6A
Other languages
Chinese (zh)
Other versions
CN111698281A (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010340185.6A priority Critical patent/CN111698281B/en
Publication of CN111698281A publication Critical patent/CN111698281A/en
Application granted granted Critical
Publication of CN111698281B publication Critical patent/CN111698281B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD

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 disclosure relates to a resource downloading method, a resource downloading device, an electronic device and a storage medium, wherein the method comprises the following steps: and receiving current pre-download stage configuration information of the application sent by the server, wherein the current pre-download stage configuration information comprises a current pre-download list corresponding to each target preset resource type, and downloading at least part of current candidate pre-download resources of each target preset resource type based on the current pre-download list corresponding to each target preset resource type. In each pre-downloading stage, the pre-downloading resources of a plurality of target preset resource types are downloaded by using a current pre-downloading list corresponding to each target preset resource type in the configuration information of the current pre-downloading stage of the application, so that the process of downloading the pre-downloading resources by the application is effectively controlled under the condition that the pre-downloading resources are required to be downloaded in the plurality of pre-downloading stages and the pre-downloading resources of a plurality of types are required to be downloaded in each pre-downloading stage by the application.

Description

Resource downloading method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of internet, and in particular to a resource downloading method and device, an electronic device and a storage medium.
Background
During the running of applications, such as APP, it is often necessary to use different types of resources. In consideration of bandwidth, most resources are downloaded from a server to the local when an application needs to be used, and when operations such as red packet resource acquisition with high requirements on timeliness are performed, resources such as pictures of red packet resources, which need to be used by the application, need to be downloaded to the local in advance before the time when the application needs to use the resources, so that the application can be directly and quickly used without downloading when the application needs to use the resources, and user experience is improved. The resource that is downloaded to the local in advance before the time when the application needs to use the resource is called a pre-download resource, and can also be called a pre-heating resource.
Whether the process of downloading the pre-downloaded resources by the application can be effectively controlled to determine whether the application can use the required resources in time or not, and the operation with high requirement on timeliness is executed, so that the method is of great importance to the experience of the user. An application often needs to download pre-downloaded resources in multiple pre-download stages, with the application downloading the pre-downloaded resources that the application needs to use in each pre-download stage. Meanwhile, the application needs to download a plurality of types of pre-download resources in each pre-download stage. For example, in a large online activity, a large number of users need to download pre-downloaded resources in multiple pre-download stages by using an application when participating in the online activity, and the application needs to download multiple types of pre-downloaded resources such as pictures, videos, compressed packets, and the like in each pre-download stage.
How to effectively control the process of downloading the pre-download resources by the application becomes an urgent problem under the condition that the application downloads the pre-download resources in a plurality of pre-download stages and the application needs to download a plurality of types of pre-download resources in each pre-download stage.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure issues a resource downloading method, apparatus, electronic device, and storage medium.
According to a first aspect of an embodiment of the present disclosure, a method for issuing a resource download includes:
receiving current pre-download stage configuration information of an application sent by a server, wherein the current pre-download stage configuration information comprises: a current pre-download list corresponding to each target preset resource type in all preset resource types, where the current pre-download list corresponding to the target preset resource type includes: pre-download information of each current candidate pre-download resource of the target preset resource type, where the pre-download information of the current candidate pre-download resource includes: resource address, priority, download control information indicating that downloading has already begun before receiving the current pre-download stage configuration information and that downloading the current candidate pre-download resource is currently underway, continuing or stopping downloading the current candidate pre-download resource;
and for each target preset resource type, downloading at least part of current candidate pre-download resources of the target preset resource type based on a current pre-download list corresponding to the target preset resource type.
In some embodiments, the current pre-download stage configuration information further includes indication information indicating whether all downloaded pre-download resources are deleted;
before downloading, for each target preset resource type, at least a part of current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type, the method further includes:
in a case where the indication information indicates deletion of all downloaded pre-downloaded resources, all downloaded pre-downloaded resources stored in a memory of the electronic device on which the application is running after being downloaded are deleted.
In some embodiments, the method further comprises:
for each target preset resource type, under the condition that priority adjustment information corresponding to the target preset resource type sent by a server is received, the priority of the current candidate pre-download resource related to the priority adjustment information in all current candidate pre-download resources of the target preset resource type is adjusted.
In some embodiments, before downloading, for each of the target pre-set resource types, at least a part of the current candidate pre-download resources of the target pre-set resource type based on the current pre-download list corresponding to the target pre-set resource type, the method further includes:
for each target preset resource type, in the presence of at least one first-due-deletion-pre-download resource of the target preset resource type, deleting each first-due-deletion-pre-download resource of the target preset resource type, which is stored in a memory of the electronic device in which the application runs after being downloaded, wherein the first-due-deletion-pre-download resource of the target preset resource type is a pre-download resource that has been downloaded and is not a current candidate pre-download resource of the target preset resource type.
In some embodiments, before downloading, for each of the target pre-set resource types, at least a part of the current candidate pre-download resources of the target pre-set resource type based on the current pre-download list corresponding to the target pre-set resource type, the method further includes:
for each target preset resource type, in the case that there is at least one second deletion-eligible pre-download resource of the target preset resource type, stopping downloading the second deletion-eligible pre-download resource of each target preset resource type and deleting the downloaded part of the second deletion-eligible pre-download resource of each target preset resource type stored in the memory of the electronic device where the application runs, wherein the second deletion-eligible pre-download resource of the target preset resource type is a pre-download resource that is currently being downloaded and is not a current candidate pre-download resource of the target preset resource type.
In some embodiments, for each of the target pre-set resource types, downloading at least a part of the current candidate pre-download resources of the target pre-set resource type based on the current pre-download list corresponding to the target pre-set resource type includes:
determining each current candidate pre-download resource of the target preset resource type to be currently downloaded based on the download control information of each current candidate pre-download resource of the target preset resource type;
sequentially downloading each current pre-download resource to be downloaded according to the sequence of the final priority of each current pre-download resource to be downloaded from high to low, wherein the final priority is one of the following: the priority of the current pre-download resource to be downloaded in the current pre-download list and the adjusted priority of the current pre-download resource to be downloaded comprise:
selecting a preset number of resource addresses from all resource addresses of the currently to-be-downloaded resources;
and downloading the current pre-download resource to be downloaded by using at least part of the selected resource addresses of the current pre-download resource to be downloaded.
In some embodiments, downloading the currently pre-downloaded resource to be downloaded by using at least part of all the selected resource addresses of the currently pre-downloaded resource to be downloaded comprises:
downloading the pre-downloaded resource to be downloaded currently by using the selected resource address each time until the downloading is successful or the downloading by using all the selected resource addresses fails;
under the condition of successful downloading, carrying out integrity verification on the currently to-be-downloaded pre-downloaded resource;
and deleting the current pre-download resource to be downloaded, which is stored in a memory of the electronic equipment running the application after being downloaded, under the condition that the verification result indicates that the current pre-download resource to be downloaded is incomplete.
According to a second aspect of the embodiments of the present disclosure, a resource downloading apparatus is issued, including:
a receiving module configured to receive current pre-download stage configuration information of an application sent by a server, where the current pre-download stage configuration information includes: a current pre-download list corresponding to each target preset resource type in all preset resource types, where the current pre-download list corresponding to the target preset resource type includes: the pre-download information of each current candidate pre-download resource of the target preset resource type comprises the following pre-download information: resource address, priority, download control information indicating that downloading has already begun before receiving the current pre-download stage configuration information and that downloading the current candidate pre-download resource is currently underway, continuing or stopping downloading the current candidate pre-download resource;
and the pre-downloading module is configured to, for each target preset resource type, download at least part of the current candidate pre-downloading resources of the target preset resource type based on the current pre-downloading list corresponding to the target preset resource type.
In some embodiments, the current pre-download stage configuration information further includes indication information indicating whether all downloaded pre-download resources are deleted; the device further comprises:
a first cleaning module, configured to delete all downloaded pre-download resources stored in a memory of an electronic device on which the application runs after being downloaded, in a case that the indication information indicates deletion of all downloaded pre-download resources, before downloading at least a part of current candidate pre-download resources of the target preset resource type based on a current pre-download list corresponding to the target preset resource type for each target preset resource type.
In some embodiments, the apparatus further comprises:
and the priority adjusting module is configured to, for each target preset resource type, adjust the priority of a current candidate pre-download resource related to the priority adjusting information in all current candidate pre-download resources of the target preset resource type under the condition that the priority adjusting information corresponding to the target preset resource type is received, wherein the priority adjusting information is sent by a server.
In some embodiments, the apparatus further comprises:
a second cleaning module configured to: before downloading at least part of the current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type for each target preset resource type, deleting, for each target preset resource type, a first pre-deletion pre-download resource of each target preset resource type stored in a memory of the electronic device where the application runs after being downloaded, in a case where there is at least one first pre-deletion pre-download resource of the target preset resource type, where the first pre-deletion pre-download resource of the target preset resource type is a pre-download resource that has been downloaded and is not a current candidate pre-download resource of the target preset resource type.
In some embodiments, the apparatus further comprises:
a third cleaning module configured to: before downloading at least part of the current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type for each target preset resource type, under the condition that at least one second pre-download resource to be deleted of the target preset resource type exists, stopping downloading the second pre-download resource to be deleted of each target preset resource type and deleting the downloaded part of the second pre-download resource to be deleted of each target preset resource type stored in a memory of the electronic device where the application runs, wherein the second pre-download resource to be deleted of the target preset resource type is a pre-download resource which is currently being downloaded and is not the current candidate pre-download resource of the target preset resource type.
In some embodiments, the pre-download module comprises:
a select download submodule configured to:
determining that each of all current candidate pre-download resources of the target preset resource type should be downloaded currently based on the download control information of each current candidate pre-download resource of the target preset resource type;
sequentially downloading each current pre-download resource to be downloaded according to the sequence of the final priority of each current pre-download resource to be downloaded from high to low, wherein the final priority is one of the following: the priority of the current pre-download resource to be downloaded in the current pre-download list and the adjusted priority of the current pre-download resource to be downloaded include:
selecting a preset number of resource addresses from all resource addresses of the currently to-be-downloaded resources;
and downloading the resources to be downloaded currently by using at least part of the selected resource addresses of the resources to be downloaded currently.
In some embodiments, the select download sub-module is further configured to:
downloading the pre-downloaded resource to be downloaded currently by using the selected resource address each time until the downloading is successful or the downloading by using all the selected resource addresses fails;
under the condition of successful downloading, carrying out integrity verification on the resources to be downloaded currently;
and deleting the current pre-download resource to be downloaded, which is stored in a memory of the electronic equipment running the application after being downloaded, in the case that the verification result indicates that the current pre-download resource to be downloaded is not complete.
The technical scheme issued by the embodiment of the disclosure can have the following beneficial effects:
in each pre-downloading stage, the configuration information of the current pre-downloading stage of the application sent by the server can be received, and the pre-downloading resources of a plurality of target preset resource types are downloaded by using the current pre-downloading list corresponding to each target preset resource type in the configuration information of the current pre-downloading stage of the application, so that the process of downloading the pre-downloading resources by the application is effectively controlled under the condition that the pre-downloading resources are downloaded in the plurality of pre-downloading stages and the pre-downloading resources of the plurality of types need to be downloaded in each pre-downloading stage.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating one embodiment of a resource download method in accordance with an exemplary embodiment;
FIG. 2 is a block diagram illustrating the structure of a resource downloading device according to an exemplary embodiment;
fig. 3 is a block diagram illustrating a structure of an electronic device according to an example embodiment.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 is a flow chart illustrating one embodiment of a method in accordance with an exemplary embodiment. The method comprises the following steps:
step 101, receiving current pre-download stage configuration information of an application sent by a server.
In the present disclosure, steps 101-102 may be performed by an application.
The pre-downloaded resource is a resource which needs to be downloaded to the electronic device locally, i.e. where the application runs, in advance of the time when the application needs to use the resource.
It will be appreciated that for each application, steps 101-102 may be performed by the application to download the pre-downloaded resource in a respective pre-download phase. The operations described in steps 101-102 are operations performed by an application during the current pre-download phase to download the pre-downloaded resource.
In the present disclosure, an application downloads, in each pre-download phase, the pre-download resources that the application needs to use in that pre-download phase.
For example, each user participating in a large online activity uses an APP, such as a short video APP, to participate in the large online activity. In each activity stage of the large online activity, the APP needs to download pre-download resources of a plurality of preset resource types, and each activity stage of the large online activity is used as a pre-download stage.
In each pre-downloading stage, after the application downloads the pre-downloaded resource each time, the application stores the downloaded pre-downloaded resource in a memory, such as a memory, of the electronic device where the application runs, and when the pre-downloaded resource is needed, the pre-downloaded resource is read from the memory, such as the memory, of the electronic device where the application runs.
In this disclosure, the pre-download configuration information received by the application at the current pre-download stage is referred to as the current pre-download stage configuration information.
The application may receive, at each pre-download stage, corresponding current pre-download stage configuration information sent by the server.
In the present disclosure, the current pre-download phase configuration information of the application includes: and the current pre-download list corresponding to each target preset resource type in all the preset resource types.
All preset asset types may include picture type, video type, compression pack type, etc.
For each preset resource type in all the preset resource types, if the pre-download resource of the preset resource type needs to be downloaded in the current downloading stage, the preset resource type is the target preset resource type.
In this disclosure, in each pre-download stage, each of all the pre-set resource types may set, on the server side, whether to prohibit downloading the pre-download resource of the pre-set resource, for example, an operation and maintenance engineer performs, through an operation configuration interface, a configuration operation on whether to prohibit downloading the pre-download resource of the pre-set resource.
And in the current downloading stage, the preset resource type which is not prohibited to be downloaded is taken as the target preset resource type.
In the present disclosure, each of all the default resource types may be used as a target default resource type.
In the present disclosure, the pre-download resources that are likely to be downloaded in the current pre-download stage are referred to as current candidate pre-download resources.
For each target preset resource type, the current pre-download list corresponding to the target preset resource type includes: pre-download information for each current candidate pre-download resource of the target pre-set resource type.
For each current candidate pre-download resource of the target preset resource type, the pre-download information of the current candidate pre-download resource includes: the resource address of the current candidate pre-download resource, the priority of the current candidate pre-download resource, and the download control information of the current candidate pre-download resource.
And the resource address of the current candidate pre-download resource is the url of the current candidate pre-download resource.
For each current candidate pre-download resource of the target preset resource type, the priority of the current candidate pre-download resource indicates that the current candidate pre-download resource is a few pre-download resources when all current candidate pre-download resources of the target preset resource type are downloaded in the current pre-download stage.
For each current candidate pre-download resource of the target preset resource type, the download control information of the current candidate pre-download resource indicates that the current candidate pre-download resource is started to be downloaded before the current pre-download stage configuration information of the application sent by the server is received and the current candidate pre-download resource is currently being downloaded, and the current candidate pre-download resource is continuously or stopped to be downloaded in the current pre-download stage.
For each current candidate pre-download resource of the target preset resource type, if there is a situation that the current candidate pre-download resource has already been downloaded and is currently downloading the current candidate pre-download resource before receiving the current pre-download stage configuration information of the application sent by the server, the downloading of the current candidate pre-download resource is started in a pre-download stage before the current pre-download stage, for example, a previous pre-download stage of the current pre-download stage, until the current pre-download stage is not completed, and therefore, a situation that the current candidate pre-download resource has already been downloaded and is currently downloading the current candidate pre-download resource before receiving the current pre-download stage configuration information of the application sent by the server occurs.
The following illustrates each item included in the current pre-download phase configuration information of the application and the role of each item.
For example, in the current pre-download stage, pre-download resources of preset resource types such as a picture type, a video type, a compression packet type, and the like need to be pre-downloaded.
The picture type, the video type and the compression packet type are all target preset resource types.
The current pre-download phase configuration information of the application comprises: a current pre-download list corresponding to the picture type, a current pre-download list corresponding to the video type, a current pre-download list corresponding to the character type, and a current pre-download list corresponding to the compression package type.
The current pre-download list corresponding to the picture type comprises: pre-download information for each current candidate pre-download picture.
For each current candidate pre-downloaded picture, the pre-download information of the current candidate pre-downloaded picture comprises: the resource address of the current candidate pre-downloaded picture, the priority of the current candidate pre-downloaded picture, and the download control information of the current candidate pre-downloaded picture.
For each current candidate pre-downloaded picture, the priority of the current candidate pre-downloaded picture indicates that the current candidate pre-downloaded picture is the current candidate pre-downloaded picture downloaded from the next several times when all current candidate pre-downloaded pictures are downloaded in the current pre-downloading stage.
For each current candidate pre-downloaded picture, the download control information of the current candidate pre-downloaded picture indicates that the current candidate pre-downloaded picture is continuously or stopped being downloaded under the condition that the current candidate pre-downloaded picture is started to be downloaded before the current pre-download stage configuration information of the application sent by the server is received and the current candidate pre-downloaded resource is currently being downloaded.
The current pre-download list corresponding to the video type comprises: pre-download information for each current candidate pre-downloaded video.
For each current candidate pre-downloaded video, the pre-download information of the current candidate pre-downloaded video comprises: the resource address of the current candidate pre-downloaded video, the priority of the current candidate pre-downloaded video, and the download control information of the current candidate pre-downloaded video.
For each current candidate pre-downloaded video, the priority of the current candidate pre-downloaded video indicates that the current candidate pre-downloaded video is the current candidate pre-downloaded video which is downloaded in the number of times when all current candidate pre-downloaded videos are downloaded in the current pre-downloading stage.
For each current candidate pre-downloaded video, the download control information of the current candidate pre-downloaded video indicates that the current candidate pre-downloaded video is started to be downloaded before the current pre-download stage configuration information of the application sent by the server is received, and the current candidate pre-downloaded video is continuously or stopped to be downloaded under the condition that the current candidate pre-downloaded video is currently being downloaded.
The current pre-download list corresponding to the compressed packet type comprises: pre-download information for each current candidate pre-download compressed package.
For each current candidate pre-download compressed packet, the pre-download information of the current candidate pre-download compressed packet includes: the resource address of the current candidate pre-download compressed packet, the priority of the current candidate pre-download compressed packet, and the download control information of the current candidate pre-download compressed packet.
For each current candidate pre-download compressed packet, the priority of the current candidate pre-download compressed packet indicates that when all current candidate pre-download compressed packets are downloaded in the current pre-download stage, the current candidate pre-download compressed packet is the current candidate pre-download compressed packet downloaded in the next several.
For each current candidate pre-download compressed packet, the download control information of the current candidate pre-download compressed packet indicates that the current candidate pre-download compressed packet starts to be downloaded before the current pre-download stage configuration information of the application sent by the server is received and the current candidate pre-download compressed packet is currently being downloaded, and the current candidate pre-download compressed packet continues or stops being downloaded.
And 102, for each target preset resource type, downloading at least part of current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type.
The following description is provided for a process of downloading at least a part of current candidate pre-download resources of one target pre-set resource type and at least a part of current candidate pre-download resources of other target pre-set resource types based on a current pre-download list corresponding to the one target pre-set resource type, where the process may be referred to for a process of downloading part of current candidate pre-download resources of other target pre-set resource types:
the current pre-download list corresponding to the target preset resource type comprises: pre-download information for each current candidate pre-download resource of the target pre-set resource type.
For each current candidate pre-download resource of the target preset resource type, the pre-download information of the current candidate pre-download resource includes: the resource address of the current candidate pre-download resource, the priority of the current candidate pre-download resource, and the download control information of the current candidate pre-download resource.
If the download control information of each current candidate pre-download resource of the target preset resource type indicates that the download is started before the configuration information of the current pre-download stage of the application is received and the current candidate pre-download resource is currently being downloaded, the current candidate pre-download resource is continuously downloaded, and then, in the current pre-download stage, all current candidate pre-download resources of the target preset resource type are downloaded based on a current pre-download list corresponding to the target preset resource type. Each current candidate pre-download resource of the target preset resource type is a pre-download resource which is currently to be downloaded of the target preset resource type.
If the download control information of at least one current candidate pre-download resource of the target preset resource type indicates that downloading is started before configuration information of a current pre-download stage of the application is received and the current candidate pre-download resource is currently being downloaded, the downloading of the current candidate pre-download resource is stopped, for each current candidate pre-download resource of the at least one current candidate pre-download resource, whether the current candidate pre-download resource is currently being downloaded at the current pre-download stage is determined, if yes, the downloading of the current candidate pre-download resource is stopped at the current pre-download stage, and the current candidate pre-download resource is not used as a pre-download resource which should be currently downloaded at the current stage of the target preset resource type, and if not, the current candidate pre-download resource is used as a pre-download resource which should be currently downloaded at the current stage of the target preset resource type.
The pre-download resource which is not taken as the current pre-download resource to be downloaded of the target preset resource type in all the current candidate pre-download resources of the target preset resource type meets the following conditions: currently downloading, i.e. downloading in a current pre-download phase, the download control information indicating that downloading has started before receiving the current pre-download phase configuration information of the application and that downloading of a current candidate pre-download resource is stopped if the current candidate pre-download resource is currently being downloaded.
According to the priority of each pre-downloaded resource which should be currently downloaded in the target preset resource type, sequentially downloading each pre-downloaded resource which should be currently downloaded in the target preset resource type by sequentially using the resource address of each pre-downloaded resource which should be currently downloaded in the target preset resource type from high to low in priority.
In some embodiments, the current pre-download stage configuration information of the application further comprises indication information indicating whether all downloaded pre-downloaded resources are deleted; before downloading at least a part of the current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type for each target preset resource type, the method further includes: in a case where the indication information indicating whether to delete all the downloaded pre-downloaded resources indicates that all the downloaded pre-downloaded resources are deleted, all the downloaded pre-downloaded resources stored in the memory of the electronic device on which the application is running after being downloaded are deleted.
All downloaded pre-downloaded resources are stored in a memory, e.g. a memory, of the electronic device on which the application is running after being downloaded in a pre-download phase preceding the current pre-download phase, e.g. a previous pre-download phase of the current pre-download phase.
The indication information indicating whether all downloaded pre-downloaded resources are deleted in the current pre-download phase configuration information of the application may be referred to as clearresource wait. clear resource wait indication information indicating deletion of all downloaded pre-downloaded resources or indication not to delete all downloaded pre-downloaded resources.
In the current pre-download stage, in a case that the clearresource wait status indicates to delete all the downloaded pre-download resources, before downloading at least part of the current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type for each target preset resource type, all the downloaded pre-download resources stored in the memory, e.g., the memory, of the electronic device where the application operates after being downloaded are deleted, so that the storage space, e.g., the memory space, of the memory of the electronic device where the application operates is saved.
In some embodiments, further comprising: for each target preset resource type, under the condition that priority adjustment information corresponding to the target preset resource type is received, wherein the priority adjustment information is sent by a server, the priority of a current candidate pre-download resource, which is related to the priority adjustment information corresponding to the target preset resource type, in all current candidate pre-download resources of the target preset resource type is adjusted.
In the present disclosure, in the current pre-download stage, for each target preset resource type, in the process of downloading the current candidate pre-download resource of the target preset resource type and to be downloaded, the priority of the current candidate pre-download resource of the target preset resource type and to be downloaded may be dynamically adjusted through the priority adjustment information corresponding to the target preset resource type.
For each target preset resource type, the priority adjustment information corresponding to the target preset resource type includes: the identifiers of at least two current candidate pre-download resources of the target preset resource type, the priorities of which need to be dynamically adjusted, and the adjusted priorities of at least two current candidate pre-download resources of the target preset resource type, the priorities of which need to be dynamically adjusted.
For each target preset resource type, the current candidate pre-download resource related to the priority adjustment information corresponding to the target preset resource type is the current candidate pre-download resource to which each identifier included in the priority adjustment information corresponding to the target preset resource type belongs.
For each current candidate pre-download resource in at least two current candidate pre-download resources of the target preset resource type, which need to dynamically adjust the priority, when receiving the priority adjustment information corresponding to the target preset resource type sent by the server, the current candidate pre-download resource may be being downloaded or not yet started to be downloaded.
When priority adjustment information corresponding to the target preset resource type sent by the server is received, only one current candidate pre-download resource in at least two current candidate pre-download resources of the target preset resource type, of which the priority needs to be dynamically adjusted, may be being downloaded.
For each target preset resource type, if a current candidate pre-download resource requiring the dynamic priority adjustment is being downloaded and the original priority of the current candidate pre-download resource requiring the dynamic priority adjustment is received when priority adjustment information corresponding to the target preset resource type sent by a server is received, that is, the priority of the current pre-download resource to be downloaded in the current pre-download list corresponding to the target preset resource type is higher than the adjusted priority of the current candidate pre-download resource requiring the dynamic priority adjustment, the downloading of the current candidate pre-download resource requiring the dynamic priority adjustment may be stopped.
In some embodiments, further comprising: for each target pre-set resource type, in the presence of at least one first-to-delete pre-download resource of the target pre-set resource type, deleting each first-to-delete pre-download resource of the target pre-set resource type, which is stored in a memory of the electronic device in which the application is running after being downloaded, wherein the first-to-delete pre-download resource of the target pre-set resource type is a pre-download resource that has been downloaded and is not a current candidate pre-download resource of the target pre-set resource type.
For each target pre-set resource type, the first pre-deletion pre-download resource of each target pre-set resource type is downloaded in the previous pre-download stage of the current pre-download stage and is stored in the storage, e.g., the memory, of the electronic device in which the application is running after being downloaded.
Taking the picture type as the target preset resource type as an example, the current candidate pre-download resource of the target preset resource type is the current candidate pre-download picture.
The first pre-download deleting resource of the picture type is a first pre-download deleting picture, and the first pre-download deleting picture is a pre-download picture which is downloaded and is not a current candidate pre-download picture.
The first application deletion pre-downloaded picture is downloaded in a previous pre-download stage of the current pre-download stage and stored in a memory, e.g. an internal memory, of the electronic device in which the application is running after being downloaded.
In the case where there is at least one first-application-deletion pre-downloaded picture, deleting the first-application-deletion pre-downloaded picture stored in a memory of the electronic device on which the application is running after being downloaded.
In some embodiments, further comprising: for each target preset resource type, in the case that there is at least one second deletion-eligible pre-download resource of the target preset resource type, stopping downloading the second deletion-eligible pre-download resource of each target preset resource type and deleting the downloaded part of the second deletion-eligible pre-download resource of each target preset resource type stored in the memory of the electronic device where the application runs, wherein the second deletion-eligible pre-download resource of the target preset resource type is a pre-download resource that is currently being downloaded and is not a current candidate pre-download resource of the target preset resource type.
For each target preset resource type, the second deletion-allowable pre-download resource of each target preset resource type starts to be downloaded in the previous pre-download stage of the current pre-download stage and is not yet downloaded in the current pre-download stage, and is being downloaded.
Taking the video type as the target preset resource type as an example, the current candidate pre-download resource of the target preset resource type is the current candidate pre-download video.
And the second pre-download resource to be deleted of the video type is a second pre-download video to be deleted.
The second pre-downloaded video should be deleted as a pre-downloaded video that is currently being downloaded and is not a current candidate pre-downloaded video.
And secondly, the pre-downloaded video to be deleted is downloaded at the previous pre-downloading stage of the current pre-downloading stage and is downloaded when the pre-downloading stage is not completed.
In the case where there is at least one second deletable pre-downloaded video, stopping downloading each second deletable pre-downloaded video and deleting the downloaded portion of the second deletable pre-downloaded video stored in the memory of the electronic device on which the application is running.
In some embodiments, for each target pre-defined resource type, downloading at least a portion of the current candidate pre-download resources of the target pre-defined resource type based on the current pre-download list corresponding to the target pre-defined resource type includes: determining each current candidate pre-download resource of the target preset resource type to be downloaded currently based on the download control information of each current candidate pre-download resource of the target preset resource type; sequentially downloading each current pre-download resource to be downloaded according to the sequence of the final priority of each current pre-download resource to be downloaded from high to low, wherein the final priority of the current pre-download resource to be downloaded is one of the following: the priority of the pre-download resource to be downloaded currently and the adjusted priority of the pre-download resource to be downloaded currently in the current pre-download list comprise: selecting a preset number of resource addresses from all resource addresses of the current to-be-downloaded resource; and downloading the resources to be downloaded currently by using at least part of the selected resource addresses of the resources to be downloaded currently.
The following describes a process of downloading at least a part of current candidate pre-download resources of a target pre-set resource type based on a current pre-download list corresponding to the target pre-set resource type, and a process of downloading at least a part of current candidate pre-download resources of other target pre-set resource types based on a current pre-download list corresponding to other target pre-set resource types, where the process refers to the process:
assuming the picture of the target preset resource type, the current candidate pre-download resource of the target preset resource type is the current candidate pre-download picture.
The current pre-download list corresponding to the picture type comprises the following steps: pre-download information for each current candidate pre-download picture.
For each current candidate pre-downloaded picture, the pre-download information of the current candidate pre-downloaded picture comprises: the resource address of the current candidate pre-downloaded picture, the priority of the current candidate pre-downloaded picture, and the download control information of the current candidate pre-downloaded picture.
For each current candidate pre-downloaded picture, the priority of the current candidate pre-downloaded picture indicates that when all current candidate pre-downloaded pictures are downloaded in the current pre-downloading stage, the current candidate pre-downloaded picture is the current candidate pre-downloaded picture which is downloaded in the next number.
For each current candidate pre-downloaded picture, the download control information of the current candidate pre-downloaded picture indicates that the current candidate pre-downloaded picture is downloaded continuously or stopped when the current candidate pre-downloaded picture is started to be downloaded before the current pre-download stage configuration information of the application is received and the candidate pre-downloaded picture is currently being downloaded.
When at least part of the current candidate pre-downloaded pictures are downloaded based on the current pre-download list corresponding to the picture type, firstly, each current candidate pre-downloaded picture in all the current candidate pre-downloaded pictures is determined to be currently downloaded based on the download control information of each current candidate pre-downloaded picture.
When it is determined that each of all current candidate pre-downloaded pictures should be currently downloaded, it may be determined whether all current candidate pre-downloaded pictures include a current candidate pre-downloaded picture that satisfies the following condition based on the download control information of each current candidate pre-downloaded picture: currently downloading, i.e., downloading during a current pre-download phase, the download control information indicating that downloading has begun prior to receiving current pre-download phase configuration information for the application and that downloading of the current candidate pre-downloaded picture is stopped if the current candidate pre-downloaded picture is currently being downloaded.
And if all the current candidate pre-downloaded pictures do not comprise the current candidate pre-downloaded pictures meeting the conditions, taking each current candidate pre-downloaded picture as the current pre-downloaded picture to be downloaded.
If all the current candidate pre-downloaded pictures comprise the current candidate pre-downloaded pictures meeting the conditions, for each current candidate pre-downloaded picture meeting the conditions, the current candidate pre-downloaded picture is stopped to be downloaded in the current pre-downloading stage. Meanwhile, each current candidate pre-downloaded picture except the current candidate pre-downloaded picture meeting the condition in all the current candidate pre-downloaded pictures is taken as the current pre-downloaded picture to be downloaded.
And then, sequentially downloading each current picture to be downloaded according to the sequence of the final priority of each current picture to be downloaded from high to low.
For each current picture to be downloaded, the final priority of the current picture to be downloaded is one of the following: the priority of the current picture to be downloaded in the current pre-download list corresponding to the picture type and the adjusted priority of the current picture to be downloaded.
When each current picture to be downloaded is downloaded in turn according to the sequence of the final priority of each current picture to be downloaded from high to low, the resource address of each current picture to be downloaded can be used in turn according to the sequence of the priority from high to low to download each current picture to be downloaded in turn.
For each current picture to be downloaded, when the current picture to be downloaded is downloaded, a preset number of resource addresses can be selected from all resource addresses of the current picture to be downloaded, and a preset number of resource addresses can be selected from all resource addresses of the current picture to be downloaded in a random manner.
For each current picture to be downloaded, the selected resource address can be used to download the current picture to be downloaded each time. When the selected resource address is used for successfully downloading the picture to be downloaded currently, the picture to be downloaded currently is not downloaded by using other unused resource addresses in all the selected resource addresses.
For each current picture to be downloaded, under the condition that the picture to be downloaded currently fails to be downloaded by using all selected resource addresses of the current picture to be downloaded currently, all the resource addresses of the current picture to be downloaded currently have problems, and indication information indicating that all the resource addresses of the current picture to be downloaded currently have problems can be sent to the server so as to correct the resource addresses of the current picture to be downloaded currently at the server.
In some embodiments, for each currently downloadable pre-download resource of a target pre-defined resource type, downloading the currently downloadable pre-download resource using at least a part of all selected resource addresses of the currently downloadable pre-download resource comprises: downloading the pre-downloaded resource to be downloaded currently by using the selected resource address each time until the downloading is successful or the downloading by using all the selected resource addresses fails; under the condition of successful downloading, carrying out integrity check on the current pre-downloading resource to be downloaded; and deleting the current pre-download resource to be downloaded stored in the memory of the electronic equipment running the application after being downloaded under the condition that the verification result indicates that the current pre-download resource to be downloaded is incomplete.
The following description will be given by taking the target preset resource type picture type as an example, to describe a process of downloading a currently pre-downloaded picture by using all selected resource addresses, and a reference to the process of downloading any one of other target preset resource types, where the pre-downloaded picture is currently to be downloaded, is:
firstly, a preset number, for example, 3 resource addresses are selected from all resource addresses of the current picture to be downloaded in a random manner or all resource addresses of the current picture to be downloaded are arranged in a random manner, and the preset number, for example, 3 resource addresses are selected.
Then, the pre-downloaded picture which is currently required to be downloaded is downloaded by using one selected resource address each time until the downloading is successful or the downloading by using all the selected resource addresses fails.
Suppose that 3 resource addresses are selected for which the pre-downloaded picture should be currently downloaded.
And downloading the current picture to be downloaded by using the 1 st resource address of the current picture to be downloaded in all the selected resource addresses, and if the current picture to be downloaded is successfully downloaded by using the 1 st resource address of the selected current picture to be downloaded, not downloading the current picture to be downloaded by using the 2 nd and 3 rd resource addresses in all the selected resource addresses.
If the downloading of the picture to be downloaded currently fails by using the 1 st downloading of the selected picture to be downloaded currently, downloading the picture to be downloaded currently by using the 2 nd resource address of all the selected resource addresses.
And if the 2 nd selected picture to be downloaded is successfully downloaded, the 3 rd resource address in all the selected resource addresses is not used for downloading the picture to be downloaded.
If the 2 nd picture to be downloaded currently fails to be downloaded by using the selected picture to be downloaded currently, downloading the picture to be downloaded currently by using the 3 rd resource address in all the selected resource addresses.
If the 3 rd picture which is selected to be downloaded currently fails to download the picture which is downloaded currently, the picture which is downloaded currently and is to be downloaded currently fails to be downloaded by using all the selected resource addresses.
And under the condition that the downloading of the current picture to be downloaded is successful, storing the current picture to be downloaded in a memory, such as an internal memory, of the electronic equipment in which the application runs.
When the integrity of the current pre-download resource to be downloaded is checked, the md5 value of the downloaded current pre-download picture to be downloaded can be calculated, meanwhile, the actual md5 value of the downloaded current pre-download picture to be downloaded is obtained from the server, and whether the calculated md5 value of the current pre-download picture to be downloaded is consistent with the actual md5 value of the current pre-download picture to be downloaded is determined. If the calculated md5 value of the current picture to be downloaded is consistent with the actual md5 value of the current picture to be downloaded, generating a check result indicating that the current picture to be downloaded is complete, and if the calculated md5 value of the current picture to be downloaded is inconsistent with the actual md5 value of the current picture to be downloaded, generating a check result indicating that the current picture to be downloaded is incomplete. And deleting the current pre-download picture to be downloaded, which is stored in a memory of the electronic equipment running the application after being downloaded, in the case that the verification result indicates that the current pre-download resource to be downloaded is not complete.
Fig. 2 is a block diagram illustrating a configuration of a resource downloading apparatus according to an exemplary embodiment. Referring to fig. 2, the apparatus includes: a receiving module 201 and a pre-downloading module 202.
A receiving module configured to receive current pre-download stage configuration information of an application sent by a server, where the current pre-download stage configuration information includes: a current pre-download list corresponding to each target preset resource type in all preset resource types, where the current pre-download list corresponding to the target preset resource type includes: pre-download information of each current candidate pre-download resource of the target preset resource type, where the pre-download information of the current candidate pre-download resource includes: resource address, priority, download control information indicating that downloading has already begun before receiving the current pre-download stage configuration information and that downloading the current candidate pre-download resource is currently underway, continuing or stopping downloading the current candidate pre-download resource;
and the pre-downloading module is configured to, for each target preset resource type, download at least part of the current candidate pre-downloading resources of the target preset resource type based on the current pre-downloading list corresponding to the target preset resource type.
In some embodiments, the current pre-download stage configuration information further includes indication information indicating whether all downloaded pre-download resources are deleted; the device further comprises:
a first cleaning module, configured to delete all downloaded pre-downloaded resources stored in a memory of an electronic device on which the application runs after being downloaded in a case that the indication information indicates to delete all downloaded pre-downloaded resources before, for each target preset resource type, downloading at least a part of current candidate pre-downloaded resources of the target preset resource type based on a current pre-download list corresponding to the target preset resource type.
In some embodiments, the apparatus further comprises:
and the priority adjusting module is configured to adjust the priority of the current candidate pre-download resource related to the priority adjusting information in all current candidate pre-download resources of the target preset resource type under the condition that the priority adjusting information corresponding to the target preset resource type is received, wherein the priority adjusting information is sent by the server, for each target preset resource type.
In some embodiments, the apparatus further comprises:
a second cleaning module configured to: before downloading at least part of the current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type for each target preset resource type, deleting, for each target preset resource type, a first pre-deletion pre-download resource of each target preset resource type stored in a memory of the electronic device where the application runs after being downloaded, in a case where there is at least one first pre-deletion pre-download resource of the target preset resource type, where the first pre-deletion pre-download resource of the target preset resource type is a pre-download resource that has been downloaded and is not a current candidate pre-download resource of the target preset resource type.
In some embodiments, the apparatus further comprises:
a third cleaning module configured to: before downloading at least part of the current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type for each target preset resource type, under the condition that at least one second pre-download resource to be deleted of the target preset resource type exists, stopping downloading the second pre-download resource to be deleted of each target preset resource type and deleting the downloaded part of the second pre-download resource to be deleted of each target preset resource type stored in a memory of the electronic device where the application runs, wherein the second pre-download resource to be deleted of the target preset resource type is a pre-download resource which is currently being downloaded and is not the current candidate pre-download resource of the target preset resource type.
In some embodiments, the pre-download module comprises:
a select download sub-module configured to:
determining each current candidate pre-download resource of the target preset resource type to be currently downloaded based on the download control information of each current candidate pre-download resource of the target preset resource type;
sequentially downloading each current pre-download resource to be downloaded according to the sequence of the final priority of each current pre-download resource to be downloaded from high to low, wherein the final priority is one of the following: the priority of the current pre-download resource to be downloaded in the current pre-download list and the adjusted priority of the current pre-download resource to be downloaded comprise:
selecting a preset number of resource addresses from all resource addresses of the current resources to be downloaded;
and downloading the current pre-download resource to be downloaded by using at least part of the selected resource addresses of the current pre-download resource to be downloaded.
In some embodiments, the select download sub-module is further configured to:
downloading the pre-downloaded resource to be downloaded currently by using the selected resource address each time until the downloading is successful or the downloading by using all the selected resource addresses fails;
under the condition of successful downloading, carrying out integrity verification on the currently to-be-downloaded pre-downloaded resource;
and deleting the current pre-download resource to be downloaded, which is stored in a memory of the electronic equipment running the application after being downloaded, under the condition that the verification result indicates that the current pre-download resource to be downloaded is incomplete.
FIG. 3 is a block diagram illustrating the structure of an electronic device in accordance with an exemplary embodiment. Referring to FIG. 3, electronic device 300 includes a processing component 322 that further includes one or more processors and memory resources, represented by memory 332, for storing instructions, such as application programs, that are executable by processing component 322. The application programs stored in memory 332 may include one or more modules that each correspond to a set of instructions. Further, the processing component 322 is configured to execute instructions to perform the above-described methods.
The electronic device 300 may also include a power component 326 configured to perform power management of the electronic device 300, a wired or wireless network interface 350 configured to connect the electronic device 300 to a network, and an input/output (I/O) interface 358. The electronic device 300 may operate based on an operating system, such as Windows Server, macOSXTM, unixTM, linuxTM, freeBSDTM, or the like, that is stored in the memory 332 after being downloaded.
In an exemplary embodiment, a storage medium comprising instructions, such as a memory comprising instructions, executable by an electronic device to perform the above method is also disclosed. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The present application also discloses a computer program comprising the operational steps as shown in fig. 1.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (16)

1. A method for resource downloading, the method comprising:
receiving current pre-download stage configuration information of an application sent by a server, wherein the current pre-download stage configuration information comprises: a current pre-download list corresponding to each target preset resource type in all preset resource types, where the current pre-download list corresponding to the target preset resource type includes: pre-download information of each current candidate pre-download resource of the target preset resource type, where the pre-download information of the current candidate pre-download resource includes: resource address, priority, download control information indicating that downloading has already begun before receiving the current pre-download stage configuration information and that downloading the current candidate pre-download resource is currently underway, continuing or stopping downloading the current candidate pre-download resource; the preset resource type comprises a compression packet type;
and for each target preset resource type, downloading at least part of current candidate pre-download resources of the target preset resource type based on a current pre-download list corresponding to the target preset resource type.
2. The method of claim 1, wherein the current pre-download phase configuration information further comprises: indicating information indicating whether all downloaded pre-downloaded resources are deleted;
before downloading, for each target preset resource type, at least a part of current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type, the method further includes:
in a case where the indication information indicates deletion of all downloaded pre-downloaded resources, all downloaded pre-downloaded resources stored in a memory of the electronic device on which the application is running after being downloaded are deleted.
3. The method of claim 1, further comprising:
and for each target preset resource type, under the condition of receiving priority adjustment information corresponding to the target preset resource type sent by a server, adjusting the priority of the current candidate pre-download resource related to the priority adjustment information in all current candidate pre-download resources of the target preset resource type.
4. The method according to claim 1, wherein before downloading at least a part of the current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type for each of the target preset resource types, the method further comprises:
for each target preset resource type, in the presence of at least one first-due deletion pre-download resource of the target preset resource type, deleting the first-due deletion pre-download resource of each target preset resource type, which is stored in a memory of the electronic device in which the application operates after being downloaded, wherein the first-due deletion pre-download resource of the target preset resource type is a pre-download resource that has been downloaded and is not a current candidate pre-download resource of the target preset resource type.
5. The method of claim 1, wherein before downloading at least a portion of the current candidate pre-download resources of the target pre-set resource type for each of the target pre-set resource types based on the current pre-download list corresponding to the target pre-set resource type, the method further comprises:
for each target preset resource type, in the case that there is at least one second deletion-eligible pre-download resource of the target preset resource type, stopping downloading the second deletion-eligible pre-download resource of each target preset resource type and deleting the downloaded part of the second deletion-eligible pre-download resource of each target preset resource type stored in the memory of the electronic device where the application runs, wherein the second deletion-eligible pre-download resource of the target preset resource type is a pre-download resource that is currently being downloaded and is not a current candidate pre-download resource of the target preset resource type.
6. The method according to any of claims 1 to 5, wherein said downloading at least a part of the current candidate pre-download resources of the target pre-set resource type based on the current pre-download list corresponding to the target pre-set resource type for each target pre-set resource type comprises:
determining that each of all current candidate pre-download resources of the target preset resource type should be downloaded currently based on the download control information of each current candidate pre-download resource of the target preset resource type;
sequentially downloading each current resource to be downloaded according to the sequence of the final priority of each current resource to be downloaded from high to low, wherein the final priority is one of the following: the priority of the current pre-download resource to be downloaded in the current pre-download list and the adjusted priority of the current pre-download resource to be downloaded comprise:
selecting a preset number of resource addresses from all resource addresses of the current resources to be downloaded;
and downloading the resources to be downloaded currently by using at least part of the selected resource addresses of the resources to be downloaded currently.
7. The method of claim 6, wherein downloading the currently pre-downloaded resource using at least some of all the selected resource addresses of the currently pre-downloaded resource to be downloaded comprises:
downloading the pre-downloaded resource to be downloaded currently by using the selected resource address each time until the downloading is successful or the downloading by using all the selected resource addresses fails;
under the condition of successful downloading, carrying out integrity verification on the currently to-be-downloaded pre-downloaded resource;
and deleting the current pre-download resource to be downloaded, which is stored in a memory of the electronic equipment running the application after being downloaded, in the case that the verification result indicates that the current pre-download resource to be downloaded is not complete.
8. An apparatus for resource download, the apparatus comprising:
a receiving module configured to receive current pre-download stage configuration information of an application sent by a server, where the current pre-download stage configuration information includes: a current pre-download list corresponding to each target preset resource type in all preset resource types, where the current pre-download list corresponding to the target preset resource type includes: pre-download information of each current candidate pre-download resource of the target preset resource type, where the pre-download information of the current candidate pre-download resource includes: resource address, priority, download control information indicating that the downloading has already begun before receiving the current pre-download stage configuration information and is downloading the said current candidate pre-download resource under the situation, continue or stop downloading the said current candidate pre-download resource; the preset resource type comprises a compression packet type;
and the pre-downloading module is configured to, for each target preset resource type, download at least part of the current candidate pre-downloading resources of the target preset resource type based on the current pre-downloading list corresponding to the target preset resource type.
9. The apparatus of claim 8, wherein the current pre-download stage configuration information further comprises: indicating information indicating whether all downloaded pre-downloaded resources are deleted; the device further comprises:
a first cleaning module, configured to delete all downloaded pre-downloaded resources stored in a memory of an electronic device on which the application runs after being downloaded in a case that the indication information indicates to delete all downloaded pre-downloaded resources before, for each target preset resource type, downloading at least a part of current candidate pre-downloaded resources of the target preset resource type based on a current pre-download list corresponding to the target preset resource type.
10. The apparatus of claim 8, further comprising:
and the priority adjusting module is configured to, for each target preset resource type, adjust the priority of a current candidate pre-download resource related to the priority adjusting information in all current candidate pre-download resources of the target preset resource type under the condition that the priority adjusting information corresponding to the target preset resource type is received, wherein the priority adjusting information is sent by a server.
11. The apparatus of claim 8, further comprising:
a second cleaning module configured to: before downloading at least part of the current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type for each target preset resource type, in the presence of at least one first pre-delete pre-download resource of the target preset resource type for each target preset resource type, deleting each first pre-delete pre-download resource of the target preset resource type, which is stored in a memory of the electronic device in which the application runs after being downloaded, wherein the first pre-delete pre-download resource of the target preset resource type is a pre-download resource that has been downloaded and is not a current candidate pre-download resource of the target preset resource type.
12. The apparatus of claim 8, further comprising:
a third cleaning module configured to: before downloading at least part of the current candidate pre-download resources of the target preset resource type based on the current pre-download list corresponding to the target preset resource type for each target preset resource type, under the condition that at least one second pre-download resource to be deleted of the target preset resource type exists, stopping downloading the second pre-download resource to be deleted of each target preset resource type and deleting the downloaded part of the second pre-download resource to be deleted of each target preset resource type stored in a memory of the electronic device where the application runs, wherein the second pre-download resource to be deleted of the target preset resource type is a pre-download resource which is currently being downloaded and is not the current candidate pre-download resource of the target preset resource type.
13. The apparatus according to one of claims 8-12, wherein the pre-download module comprises:
a select download sub-module configured to: determining that each of all current candidate pre-download resources of the target preset resource type should be downloaded currently based on the download control information of each current candidate pre-download resource of the target preset resource type; sequentially downloading each current pre-download resource to be downloaded according to the sequence of the final priority of each current pre-download resource to be downloaded from high to low, wherein the final priority is one of the following: the priority of the current pre-download resource to be downloaded in the current pre-download list and the adjusted priority of the current pre-download resource to be downloaded comprise: selecting a preset number of resource addresses from all resource addresses of the current resources to be downloaded; and downloading the current pre-download resource to be downloaded by using at least part of the selected resource addresses of the current pre-download resource to be downloaded.
14. The apparatus of claim 13, wherein the select download sub-module is further configured to: downloading the pre-downloaded resource to be downloaded currently by using the selected resource address each time until the downloading is successful or the downloading by using all the selected resource addresses fails; under the condition of successful downloading, carrying out integrity verification on the resources to be downloaded currently; and deleting the current pre-download resource to be downloaded, which is stored in a memory of the electronic equipment running the application after being downloaded, under the condition that the verification result indicates that the current pre-download resource to be downloaded is incomplete.
15. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 7.
16. A storage medium having instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of claims 1-7.
CN202010340185.6A 2020-04-26 2020-04-26 Resource downloading method and device, electronic equipment and storage medium Active CN111698281B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010340185.6A CN111698281B (en) 2020-04-26 2020-04-26 Resource downloading method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010340185.6A CN111698281B (en) 2020-04-26 2020-04-26 Resource downloading method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111698281A CN111698281A (en) 2020-09-22
CN111698281B true CN111698281B (en) 2022-10-04

Family

ID=72476675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010340185.6A Active CN111698281B (en) 2020-04-26 2020-04-26 Resource downloading method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111698281B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112203111B (en) * 2020-09-29 2023-03-14 北京达佳互联信息技术有限公司 Multimedia resource preloading method and device, electronic equipment and storage medium
CN112954409B (en) * 2021-03-31 2023-05-12 百果园技术(新加坡)有限公司 Video downloading method, device, server and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090113496A1 (en) * 2007-10-31 2009-04-30 Echostar Technologies Corporation Processes and systems for pre-downloading of video event data
CN105094861A (en) * 2014-05-06 2015-11-25 腾讯科技(深圳)有限公司 Webpage application program loading method, device and system
CN106878246A (en) * 2016-07-27 2017-06-20 阿里巴巴集团控股有限公司 A kind of method for managing resource and device
CN108549673A (en) * 2018-03-29 2018-09-18 优视科技有限公司 Pre-add support method, client, server and the network system of web page resources
CN110300189A (en) * 2019-07-25 2019-10-01 北京达佳互联信息技术有限公司 A kind of resource downloading method, device and electronic equipment
CN110807128B (en) * 2019-10-25 2022-09-09 北京达佳互联信息技术有限公司 Video preloading method, device, equipment and storage medium
CN110868626B (en) * 2019-11-06 2021-06-11 北京达佳互联信息技术有限公司 Method and device for preloading content data

Also Published As

Publication number Publication date
CN111698281A (en) 2020-09-22

Similar Documents

Publication Publication Date Title
CN111309279B (en) Multi-screen interactive display method and device
US9432672B2 (en) Image compression method and system with image compression time information
CN110557284B (en) Data aggregation method and device based on client gateway
CN111629240B (en) Multi-screen interactive display method and device
CN111698281B (en) Resource downloading method and device, electronic equipment and storage medium
CN109788029A (en) Gray scale call method, device, terminal and the readable storage medium storing program for executing of micro services
CN113687858A (en) Configuration file checking method and device, electronic equipment and storage medium
CN111176706A (en) Terminal upgrading method and device, electronic equipment and storage medium
CN111147585B (en) Equipment upgrading method, device, storage medium and system
CN104104701A (en) Online service configuration updating method and system
CN115129574A (en) Code testing method and device
CN113127335A (en) System testing method and device
CN111294377A (en) Network request sending method of dependency relationship, terminal device and storage medium
CN112738153B (en) Gateway selection method, system, device, server and medium in service system
CN110609707A (en) Online data processing system generation method, device and equipment
CN115766439A (en) KVM device batch upgrading method and device and electronic device
US8374593B2 (en) Method of providing mobile application
CN113746851A (en) Agent system and method for supporting real-time analysis of GRPC request
CN112256295A (en) Application program updating method, device, equipment and storage medium
CN111158654A (en) Algorithm calling method, device, server and storage medium
CN113852919B (en) Method and device for generating early warning message, storage medium and electronic device
CN110874238A (en) Online service updating method and device
CN115914343A (en) PAAS platform-based unified management automatic adaptation method, device, medium and equipment
CN112827180A (en) Game updating method, device, equipment and storage medium
CN108810043B (en) Method and device for storing comment information

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