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

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

Info

Publication number
CN116405540A
CN116405540A CN202310649552.4A CN202310649552A CN116405540A CN 116405540 A CN116405540 A CN 116405540A CN 202310649552 A CN202310649552 A CN 202310649552A CN 116405540 A CN116405540 A CN 116405540A
Authority
CN
China
Prior art keywords
file
application program
downloading
application
download
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.)
Granted
Application number
CN202310649552.4A
Other languages
Chinese (zh)
Other versions
CN116405540B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310649552.4A priority Critical patent/CN116405540B/en
Priority to CN202311246378.5A priority patent/CN117061594A/en
Publication of CN116405540A publication Critical patent/CN116405540A/en
Application granted granted Critical
Publication of CN116405540B publication Critical patent/CN116405540B/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/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/303Terminal profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

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

Abstract

The embodiment of the application provides a method and a device for pre-downloading resources, electronic equipment and a computer readable storage medium, and relates to the technical field of communication. The method comprises the following steps: determining that a second application program pauses downloading resources, determining a first file set and a downloading record of the second application program for each first file in the first file set, wherein the first files are files except the second file set in the resources, and the second files in the second file set are files downloaded by a resource loader for loading the resources; and for each first file, determining a downloading record of the first application program to the first file, and determining and executing a processing strategy of the first file according to the downloading records of the first application program and the second application program to the first file. The embodiment of the application saves time cost, reduces the downloading flow and reduces CDN bandwidth cost brought by downloading.

Description

Resource pre-downloading method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, an electronic device, a computer readable storage medium, and a computer program product for pre-downloading resources.
Background
Before the application program issues the new version, the relevant resources of the new version are downloaded to the terminal in advance, which is called pre-download. By pre-downloading, the resource downloaded in advance can be directly loaded at the time point when the resource is allowed to be loaded to update the version of the application program, and compared with the method that after the new version is released, the user starts the application program and then starts to download the related resource of the new version, the waiting time of the user for perceiving the updated version can be avoided.
In the related art, the resource of the pre-downloaded application program may be executed by the application program itself, or may be executed by an application program for application distribution, such as an application store, where the situation that the resource is re-downloaded due to the interruption of the pre-downloaded program often occurs, which affects the user experience.
Disclosure of Invention
Embodiments of the present application provide a method, an apparatus, an electronic device, a computer readable storage medium, and a computer program product for pre-downloading resources, which can solve the above-mentioned problems in the prior art. The technical scheme is as follows:
according to an aspect of the embodiments of the present application, there is provided a method for pre-downloading a resource, including:
determining that a second application program pauses downloading the resource, determining a first file set and a downloading record of the second application program for each first file in the first file set, wherein the first files are files except for a second file set in the resource, and the second files in the second file set are files downloaded by a resource loading program for loading the resource;
For each first file, determining a downloading record of the first application program to the first file, and determining and executing a processing strategy of the first file according to the downloading records of the first application program and the second application program to the first file respectively;
wherein when the first application is the resource loader, the second application is an application distribution program for application distribution; when the first application program is the application distribution program, the second application program is the resource loader.
According to another aspect of the embodiments of the present application, there is provided a device for pre-downloading a resource, applied to a first application program, where the resource includes at least one file, the device including:
the file determining module is used for determining that the second application program pauses downloading the resource, determining a first file set and a downloading record of the second application program for each first file in the first file set, wherein the first files are files except for a second file set in the resource, and the second files in the second file set are files downloaded by a resource loading program for loading the resource;
The policy execution module is used for determining a downloading record of the first application program to the first file for each first file, and determining and executing a processing policy of the first file according to the downloading record of the first application program and the second application program to the first file respectively;
wherein when the first application is the resource loader, the second application is an application distribution program for application distribution; when the first application program is the application distribution program, the second application program is the resource loader.
According to another aspect of the embodiments of the present application, there is provided an electronic device including: a memory, a processor and a computer program stored on the memory, the processor executing the computer program to carry out the steps of the above method.
According to a further aspect of embodiments of the present application, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above method.
According to an aspect of the embodiments of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the steps of the above method.
The beneficial effects that technical scheme that this application embodiment provided brought are:
the resource pre-downloading method is executed by the first application program, the first application program can be applied to the resource loading program and the application distribution program, the downloading main body can be switched at any time, the purposes of downloading record interaction between the first application program and the second application program are achieved by determining the second application program to pause the downloading resource and determining the downloading record of each first file in the first file set by the first file set and the second application program, and the processing strategy of the first file is determined based on the downloading record of each first file by the two application programs, so that the repeated downloading of files which are not downloaded or are being downloaded by different downloading main bodies can be avoided, the time cost is saved, the downloading flow is reduced, and the CDN bandwidth cost caused by downloading is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
FIG. 1 is a schematic system architecture diagram of a resource pre-download system according to an embodiment of the present disclosure;
Fig. 2a is a schematic flow chart of a method for pre-downloading resources according to an embodiment of the present application;
fig. 2b is an interaction schematic diagram of a resource pre-downloading method executed by a resource loader as a downloading body according to an embodiment of the present application;
fig. 2c is an interaction schematic diagram of a resource pre-downloading method performed by an application distribution program as a downloading main body according to an embodiment of the present application;
FIG. 3 is a schematic diagram of 3 merging modes according to an embodiment of the present disclosure;
fig. 4 is an interaction schematic diagram of a resource pre-downloading method executed by a resource loader as a downloading main body according to an embodiment of the present application;
fig. 5 is an interaction schematic diagram of a resource pre-downloading method executed by an application distribution program as a downloading main body according to an embodiment of the present application;
FIG. 6 is an interaction diagram in a pre-download scenario for game resources according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a device for pre-downloading resources according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the drawings in the present application. It should be understood that the embodiments described below with reference to the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and the technical solutions of the embodiments of the present application are not limited.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and "comprising," when used in this application, specify the presence of stated features, information, data, steps, operations, elements, and/or components, but do not preclude the presence or addition of other features, information, data, steps, operations, elements, components, and/or groups thereof, all of which may be included in the present application. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates that at least one of the items defined by the term, e.g., "a and/or B" may be implemented as "a", or as "B", or as "a and B".
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Several terms which are referred to in this application are first introduced and explained:
pre-download: before the application program issues the new version, the relevant resources of the new version are downloaded to the terminal in advance, which is called pre-download. By pre-downloading, the resource downloaded in advance can be directly loaded at the time point when the resource is allowed to be loaded to update the version of the application program, and compared with the method that after the new version is released, the user starts the application program and then starts to download the related resource of the new version, the waiting time of the user for perceiving the updated version can be avoided.
Channel pre-download: the manufacturer of the application program downloads the new version of the resource in advance before the new version of the application program is released through the application distribution program (i.e. the program for application distribution), such as an application store, and the downloaded file is stored in a private directory of the application distribution program, or may be an externally stored public directory.
In the game: refers to the running of a process of a game application, including the following: 1. the game application runs on a main interface of the terminal; 2. the game application interface is closed, but the game progress is not killed. In summary, the logical code running on a game process is referred to as an in-game scenario.
Breakpoint continuous transmission: when downloading or uploading, the downloading or uploading task (a file or a compressed packet) is divided into a plurality of parts, each part is uploaded or downloaded by adopting one thread, each thread can be executed in parallel or sequentially, if a network fault is encountered, the part which is already uploaded or downloaded can be continuously uploaded and the part which is not yet downloaded is not yet completely downloaded, and the part which is not yet completely downloaded is not necessarily uploaded from the beginning, so that the time is saved and the speed is increased.
File merging: referring to 2 or more files, basic file-based operations include: file splicing, file coverage, file cropping, etc., to form a new complete file. In the process of merging files, the files to be merged are mainly related to the position information of the complete files. In the embodiment of the present application, the merging between 2 files is mainly discussed, and the merging is illustrated by way of example:
for example, file 1, with a start position of 0 and an end position of 100, representing that file 1 is in the data position of 0 to 100 bytes of the complete file; file 2, with a start position of 101 and an end position of 200, represents file 2 in a data position of 101 to 200 bytes of the complete file. When the file merging is executed, the file 2 is spliced to the file 1 according to the position information of the 2 files, so that a complete file with a starting position of 0 and an ending position of 200 is formed.
ContentProvider shared data update notification mechanism: supporting storing and reading data in multiple applications. The mechanism is based on a uniform resource identifier (Uniform Resource Identifier, URI) by which the sender and receiver of notifications are associated, the notification registry of the mechanism is impersonated by the contentdervice service, and the class responsible for receiving data update notifications must inherit the contentdonserver class.
The resource pre-downloading method, device, electronic equipment, computer readable storage medium and computer program product provided by the application aim to solve the technical problems in the prior art, so that a resource loading program for loading the resource and an application distribution program for application distribution can both have opportunities to pre-download the resource, and a processing strategy for determining a first file based on the downloading state and the downloading progress of the first file by the two application programs respectively can avoid repeated downloading of files which are not downloaded or are being downloaded by different downloading bodies, save time cost, reduce the downloading flow, reduce CDN bandwidth cost caused by downloading, and only load the resource under the condition that all files are completely downloaded and all files pass verification, thereby avoiding the problem that the transaction is not passed and the files are re-files because the files downloaded by the application distribution program are incomplete when the user starts the resource loading program when the related technology application distribution program does not download the complete files.
The technical solutions of the embodiments of the present application and technical effects produced by the technical solutions of the present application are described below by describing several exemplary embodiments. It should be noted that the following embodiments may be referred to, or combined with each other, and the description will not be repeated for the same terms, similar features, similar implementation steps, and the like in different embodiments.
The following describes a resource pre-downloading system provided in the embodiment of the present application. Referring to fig. 1, fig. 1 is a schematic architecture diagram of a resource pre-download system provided in an embodiment of the present application, in order to support an exemplary application, a terminal (a terminal 400-1 and a terminal 400-2 are shown in an exemplary manner) are connected to a server 200 through a network 300, where the network 300 may be a wide area network or a local area network, or a combination of the two, and a wireless or wired link is used to implement data transmission.
The terminals (such as the terminal 400-1 and the terminal 400-2) are provided and operated with the client side of the application program, and are used for receiving the update notification issued by the server in the operation process of the application program, pre-downloading the resources corresponding to the application program from the server, and storing the resources in a local storage space (such as an SD card of the mobile terminal).
At least two application programs are provided in terminals (such as the terminal 400-1 and the terminal 400-2), one application program for loading the resource (the subsequent embodiment is simply referred to as a resource loading program), and the other application program for application distribution (the subsequent embodiment is simply referred to as an application distribution program), and the application distribution program of the embodiment of the present application can be colloquially understood as an application store, that is, a program for downloading and updating the application program.
The resource loading program and the application distribution program in the embodiment of the present application support pre-downloading the resource, where the downloading subject for pre-downloading is referred to as a first application program, and the other application program is referred to as a second application program, where the first application program determines that the second application program pauses downloading the resource, and further determines a first file set and a download record of the second application program for each first file in the first file set, where the first file is a file in the resource except for the second file set, and the second file in the second file set is a file downloaded by the resource loading program for loading the resource; and for each first file, determining a downloading record of the first application program to the first file, and determining and executing a processing strategy of the first file according to the downloading records of the first application program and the second application program to the first file.
The server 200 is configured to receive a resource of a resource loader uploaded by a development end during an application running process, and send an update notification to a terminal installed with the application to notify each terminal that the application has an update resource; and meanwhile, the method is also used for receiving a downloading request of the resource of the application program sent by the downloading main body and sending the resource to the terminals (such as the terminal 400-1 and the terminal 400-2) sending the downloading request.
In some embodiments, the server 200 may be a stand-alone physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution Network (CDN, contentDelivery Network), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 400 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiments of the present application.
The embodiment of the application can be realized by means of Cloud Technology (Cloud Technology), wherein the Cloud Technology refers to a hosting Technology for integrating serial resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
The cloud technology is a generic term of network technology, information technology, integration technology, management platform technology, application technology and the like based on cloud computing business model application, can form a resource pool, and is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical network systems require a large amount of computing and storage resources. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data of different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized through cloud computing.
The embodiment of the application provides a method for pre-downloading resources, which is applied to a first application program, wherein the first application program can be a resource loading program or an application distribution program. Taking a resource loader as an example of a game application program, the resource can be a game resource, and it can be understood that the type of the resource can also be different according to the application type of the resource loader.
As shown in fig. 2a, the method for pre-downloading the resource includes the following steps:
s2011, determining that the second application program pauses the downloading resource, and determining the first file set and the downloading records of the second application program to each first file in the first file set.
The first file in the embodiment of the present application refers to a file in a resource other than the second file, where the second file refers to a file that has been downloaded by a resource loader, that is, whether the execution subject of the present application is the resource loader or the application distributor, it is necessary to determine the second file that has been downloaded by the resource loader, and then use the file other than the second file of the resource as the first file. It is understood that the sum of the numbers of files in the first file set and the second file set in the embodiments of the present application is the sum of the numbers of all files of the resource.
The download record of the embodiment of the present application may include at least one of a download status and a download progress, where the download status may include three types of downloaded, not downloaded, and downloaded.
In some embodiments, the downloading progress is the progress of file downloading, the value of the downloading progress ranges from 0 to 100%, when the downloading progress is 0, it indicates that no downloading is performed, when the downloading progress is 100%, it indicates that downloading is performed, and when the downloading progress is any number between 0 and 100%, it indicates that downloading is performed. That is, the download record of one file in the embodiment of the present application may include only the download progress.
In other embodiments, the downloading progress may refer to the progress of downloading the file when the downloading status is in downloading, that is, the downloading progress may be only when a file starts to be downloaded, and when a file is not downloaded, the downloading progress is 0, which may be regarded as no downloading progress. When the download record of a file includes only the download progress, if a file has no download record or the download record is empty, it indicates that the file has not started to be downloaded.
It should be understood that downloaded in this embodiment of the present application refers to having downloaded the entire content of a file, for example, a file size of 3000 bytes, and only 3000 bytes are downloaded, which is referred to as having downloaded the file, and when downloading a file has been started, but not downloading the entire content of a file, which is referred to as downloading. When downloading a file is not started, the downloading state of the file is called as not downloaded, and the downloading state of one file at one moment in the application can be not downloaded, in downloading or already downloaded. That is, the first file in the present application refers to a file in a resource that is not downloaded or is being downloaded by the resource loader.
It should be understood that when the download subject is different, there is a difference in the storage location of the downloaded file, for example, when the download subject is a resource loader, the resource loader will download the file to its own private directory, and possibly a public directory (first public directory), and when the download subject is an application distributor, the application distributor will download the file to its own private directory, and possibly a public directory (first public directory), and in general, the private directories of different download subjects are different, and the designated public directories are also different.
Therefore, if the downloading body, that is, the first application program, of the application is a resource loader, the resource loader can determine the first file according to which files have been downloaded by itself and by combining the file information of all files that need to be downloaded by the resource.
If the download subject of the present application, i.e., the first application, is an application distribution program, the application distribution program also needs to request the resource loader to obtain the file information of the second file or the first file information. For example, in some embodiments, the resource loader may send file information of the second file to the application distribution program, where the application distribution program obtains file information of all files that the resource needs to download, and determines the first file by an exclusion method; in other embodiments, the resource loader may determine the first file and then inform the application distributor directly.
In the embodiment of the present application, the first file is determined because the final resource is stored in the preset storage location of the resource loading application and the resource loading program loads the resource, so whether the file needs to be downloaded is based on whether the resource loading application has downloaded the file. It should be noted that when a file is downloaded by the application distribution program, the file needs to be moved to a preset storage location of the resource loader, and after being moved to the preset storage location, the file is considered to be downloaded by the resource loader. That is, whether the download subject is the resource loader or the application distributor, the embodiment of the present application skips the processing of the file downloaded by the resource loader, thereby improving the overall downloading efficiency of the resource. For example, when the first application is an application distributor, determining the first set of files and processing the first files in the first set of files means that processing the second files is skipped.
When determining the first file set, the embodiment of the application also needs to determine that the second application program has stopped downloading resources so as to ensure that only one downloading main body exists at one moment, if the first application program determines that the second application program is still downloading resources before the first file set, the embodiment of the application also indicates the second application program to temporarily download resources, the downloading main body is indicated to be switched to the first application program at the moment, the first application program continues to download the files which are not yet downloaded by the resource application program, the waste of flow and terminal storage space caused by the simultaneous downloading of the files of the two application programs is avoided, and the second application program is determined to pause the downloading resources so as to be convenient for the first application program to accurately determine the downloading breakpoint to perform breakpoint continuous transmission.
In some embodiments, the first application may send a resource download status query request to the second application, where the resource download status query request is used to request whether the second application is downloading resources, and the second application returns a status code to the first application in response to the resource download status query request, where the first status code is used to indicate whether the second application is downloading resources, and the second status code is used to indicate that the second application is not downloading resources.
In some embodiments, the first application may send a resource download status query request to the second application via a ContenProvider mechanism.
In some embodiments, a first application may query, through a Service component, whether a second application is downloading resources. Service (Service) is one of the important components in the Android system. Services are mainly used for two purposes: background run and cross-process access. By starting a service, the designated task can be operated in the background on the premise of not displaying an interface, so that the terminal can be not influenced to execute other tasks.
Specifically, the first application program of the embodiment of the present application may query, through a Service (Service) component, whether the second application program is downloading resources, and may include the following steps:
creating a Service component by the second application program;
the second application program returns a communicable IBinder object in the onBind method of the Service component, wherein the IBinder object comprises information of whether the second application program is downloading resources or not;
after the first application program binds the Service component, the IBinder object is obtained in the onServiceConnected method, and the IBinder object is called to determine whether the second application program is downloading the resource.
S2012, for each first file, determining a downloading record of the first application program to the first file, and determining and executing a processing strategy of the first file according to the downloading records of the first application program and the second application program to the first file.
For each first file, since the first application program of the present application may be either a resource loader or an application distributor, when the first application program is a resource loader, it is obvious that the download status of the first application program for the first file may be only in download or not, and the download status of the second application program for the first file may be in download, in download or not.
For example, the application distribution program starts downloading resources at a first time of a day, and 3 files have been downloaded at a second time: file 1, file 2 and file 3, there are 2 files in download: file 4 and file 5, there are 1 file not downloaded: and the file 6 starts the resource loading program by the third moment and starts to execute the pre-downloading method of the application, at the moment, the resource loading program does not download any file yet, the resource loading program instructs the application distribution program to stop downloading the resource, then the downloading state of each file (because all files are the first files) is determined, and the downloading state of the first file is found to be downloaded, while the downloading state is found to be downloaded, and the downloading state is found to be not downloaded.
When the first application program is an application distribution program, the second application program is a resource loading program, obviously, the downloading state of the second application program to the first file may be in downloading or not downloading, and the downloading state of the first application program to the first file may be in downloading or not downloading, but not in downloading, because all files are summarized to the preset storage position of the resource loading program, and the application distribution program firstly determines which files the resource loading program has downloaded, so that the application distribution program is not necessarily downloaded as long as the resource loading program has not downloaded the file.
According to the method and the device for determining the processing strategy of the first file, for each first file, according to the downloading records of the first file (namely, the first application program) and the second application program, the problem that the first file is repeatedly downloaded due to the fact that interaction is absent between the two application programs can be avoided. It should be understood that repeated downloads of the present application include both the case of downloading a first file that has been downloaded by a second application, and the case of downloading a portion of the first file that has been downloaded by the second application while the second application is downloading a portion of the first file.
The embodiment of the application can obtain the download address of each file in the resource in advance, so that when the processing strategy is to download the file, the file is downloaded based on the download address of the file.
The download subject of the embodiments of the present application supports single-threaded or multi-threaded downloads, whether it is a resource loader or an application distributor. In the multithread downloading mode, random reading and writing are needed to be carried out on the file, and when a plurality of threads write data to the file at the same time, the range of writing byte data to the file by each thread is determined after the file length is equally divided according to a certain rule.
In some embodiments, during each thread downloading the file, it is also necessary to record the downloading progress of the file to disk. The main content of the download progress includes:
the beginning item: the starting byte position written by the current thread;
the end term is expected: the current thread downloads the completed byte position;
actual end item: the end position of the byte actually downloaded by the current thread.
It will be appreciated that the actual end of download progress is updated in real time as the download step proceeds.
It should be noted that, the pre-download method of the embodiment of the present application may be applied to both the resource loader and the application distributor, which means that there are some special cases where a certain file is downloaded by the resource loader first, and after a part of the file is downloaded by the application distributor, and after a part of the file is downloaded, the file is switched to the resource loader to download, and so on, so that the operation of switching the download main body is similar, but no matter which application the download main body is at one moment, the pre-download method of the embodiment of the present application is applicable, and the present application can realize the effect of switching the download main body at any moment and not repeating the downloading of the file.
When executing the processing strategy of the first file, the embodiment of the application needs to update the download record of the first file in real time, so that when switching the download main body, a new download main body can determine a new processing strategy according to the download record of the first file from the previous download main body.
Referring to fig. 2b, an interaction diagram of a pre-download method when a first application program is a resource loader according to an embodiment of the present application is shown, where the interaction diagram includes:
s2021, determining file information of all files of the resource and file information of a second file set;
s2022, determining file information of the first file set according to file information of all files of the resource and file information of the second file set;
s2023, according to the file information of the first file set, indicating the second application program, namely the application distribution program, to pause downloading resources and returning the downloading records of the application distribution program to each first file in the first file set;
s2024, determining a download record of the resource loader to each first file in the first file set;
s2025, for each first file, determining a downloading record of the first application program to the first file, and determining and executing a processing strategy of the first file according to the downloading records of the first application program and the second application program to the first file respectively.
It should be noted that, the download main body in this embodiment of the present application is a resource loader, first, file information of a first file set is determined by determining file information of all files of a resource and file information of downloaded files (a second file set), and a second application program is instructed to suspend downloading the resource and return download records of each first file in the first file set, and then, in combination with its own download record of each first file, a processing policy of the first file is determined and executed. The sequence of steps S2021 to S2023 in the embodiment of the present application is not specifically limited.
It should be noted that, step S2023 may further include a step of the first application program querying whether the second application program is downloading the resource, if the second application program is downloading the resource, step S2031 is executed, and if the second application program does not download the loading resource, the second application program only needs to be instructed to return the download record of each first file in the first file set.
Referring to fig. 2c, an interaction diagram of a pre-download method when a first application program is an application distribution program according to an embodiment of the present application is shown, where the interaction diagram includes:
S2031, indicating a second application program, namely a resource loader, to pause downloading resources and returning to the downloading records of all the first files in the first file set;
s2032, determining a download record of the application distribution program itself to each first file;
s2033, determining a downloading record of the first application program to the first file for each first file, and determining and executing a processing strategy of the first file according to the downloading records of the first application program and the second application program to the first file respectively.
The sequence of steps S2031 to S2033 in the embodiment of the application is not particularly limited.
It should be noted that, before the step S2031, the step S2031 may further include a step of the first application program querying whether the second application program is downloading the resource, if the second application program is downloading the resource, the step S2031 is executed, and if the second application program does not download the loading resource, the step S2031 is executed only by indicating that the second application program returns the download record of each first file in the first file set.
Step S2031 may also be:
instructing the resource loader to pause downloading the resource and returning file information of the second file set;
determining file information of all files of the resource;
Determining the file information of the first file set according to the file information of all the files and the file information of the second file set;
and indicating the resource loader to return the download records of the first files in the first file set.
It should be noted that in the embodiments corresponding to fig. 2b and 2c, the download subject may also include the file identifier and the download address of the file before executing the processing policy of the first file, for example, in some embodiments, the file information. So that the download subject knows the download address of the file when obtaining the file information.
Based on the foregoing embodiments, as an alternative embodiment, the download record includes a download status, and as can be known from the foregoing embodiments, the download status in the embodiments of the present application includes three cases of downloaded, not downloaded and downloaded, and specific definitions may refer to the foregoing embodiments, for example, descriptions in steps S2011 and S2012, etc., which are not repeated herein.
Determining a processing strategy of the first file according to the download records of the first application program and the second application program on the first file, wherein the processing strategy comprises the following steps:
and determining the processing strategy of the first file as downloading the first file according to the fact that the downloading states of the first application program and the second application program to the first file are not downloaded.
For a first file that neither application program starts downloading, the processing strategy of the first application program for the first file is to download the first file. When executing the processing strategy, the first application program records the download state in the download record of the first file as the download state, and updates the download progress of the first file in real time.
It should be noted that, whether the download subject, i.e., the first application program, is a resource loader or an application distributor, if it is determined that neither program downloads a certain first file, the first file is directly downloaded, and the download record of the first file is updated, so that when the download subject is subsequently switched, the download status and the download progress of the first file can be determined through the download record, so as to determine the processing policy.
When the first application program downloads the first file, the downloaded first file is stored in a preset storage position of the first application program in real time, wherein the preset storage position can be a private directory or a preset public directory of the first application program.
It should be noted that, when the first application program downloads the first file, the downloading progress of the first file is updated in real time, and when the downloading progress reaches 100%, that is, it is determined that the entire content of the first file has been downloaded, then the downloading state of the first file needs to be updated from downloading to downloading.
On the basis of the above embodiments, as an alternative embodiment, the download record includes at least one of a download status and a download progress. As can be seen from the above embodiments, the download status of the embodiments of the present application includes three situations of downloaded, not downloaded and downloaded, and specific definitions can refer to the above embodiments, for example, the descriptions of steps S2011 and S2012 are omitted herein.
Determining a processing strategy of the first file according to the download records of the first application program and the second application program on the first file, wherein the processing strategy comprises the following steps:
and determining a processing strategy of the first file to continuously download the first file according to the downloading progress of the first application program on the first file according to the downloading state of the first application program on the first file in downloading and the downloading state of the second application program on the first file in not downloading.
That is, whether the first application program is a resource loader or an application distributor, when determining that the download status of the first application program itself is in the process of downloading, but the second application program does not start downloading the first file, the first file is continuously downloaded according to the download progress of the first application program itself.
For example, the total byte number of a first file is 100, the downloading progress of the first application program for downloading the first file is 0-40%, i.e. the 1 st-40 th byte is downloaded, and the second application program does not download the first file, then the first application program continues to download the first file from the 41 st byte.
It should be noted that, when the first application program continues to download the first file, the downloading progress of the first file is updated in real time, and when the downloading progress reaches 100%, that is, it is determined that the entire content of the first file has been downloaded, the downloading status of the first file needs to be updated from downloading to downloading.
Based on the foregoing embodiments, as an optional embodiment, the determining that the second application program pauses the downloading resource, determining the first file set and the downloading record of the second application program to each first file in the first file set, further includes:
and obtaining configuration information of the resource, wherein the configuration information comprises file identifiers of all files in the resource.
When the first application program is a resource loader, configuration information of the resource can be obtained through a server corresponding to the resource loader.
When the first application program is an application distribution program, configuration information of resources can be obtained by a server corresponding to the application distribution program.
It should be understood that after the resource is created by the developer of the resource, the resource is uploaded to the server corresponding to the resource loader and the server corresponding to the application distributor.
In some embodiments, the configuration information includes a file identification and download address for each file in the resource.
In some embodiments, the file identification may include a file name, an information digest of the file, and the like.
In some embodiments, the information summary of the file may be determined by an MD5 information summary Algorithm (MD 5 Message-Digest Algorithm).
The embodiment of the application determines a download record of the second application program to each first file in the first file set, including:
and determining the download record of the second application program to the first file with the corresponding identifier to the second application program according to the file identifier of each first file by using a ContentProvider mechanism.
It should be noted that, since the communication between the first application program and the second application program is in different processes, the communication belongs to the inter-process communication range, and the communication adopts a ContentProvider mechanism, which may be initiated by the resource loader to distribute information to the application to obtain a file record, or may be initiated by the application distribution information to obtain a file record from the resource loader.
In particular, the second application may provide a download record of some first files, the first application needs to obtain the download record of these first files,
Firstly, an SQLite database is created, and the download record of the first file is stored in the database.
Thereafter, a Provider class is created that inherits the ContentProvider.
The embodiment of the application can realize six abstract methods of ContentProvider. In the onCreate method, a ContentProvider is created, where the database is initialized, while in the getType method, the MIME type corresponding to the Uri request is returned, and then the corresponding CRUD operation, that is, the data adding, deleting and checking function is performed in the remaining four methods.
Further, the above ContentProvider needs to be registered in android management, and the registration process involves creating three attributes of ContentProvider:
authentications-this attribute is the unique identification of the ContentProvider by which external applications can access the ContentProvider, i.e., authentications are unique. And this authenticates are also authenticates within the URI;
export, set to true, indicates that the current ContentProvider can be used by other applications. Any application may use Provider to obtain it through a URI, or may use Provider through the corresponding rights. When set to false, indicates that the current ContentProvider cannot be used by other applications;
permission set permissions for ContentProvider to avoid any application having access to ContentProvider.
And setting the authority of the second application program, wherein the application program is started only by creating a blank Activity, and no operation is needed in the Activity.
The process of the first application program obtaining the data in the ContentProvider is as follows:
creating an entity class associated with the first file;
methods for editing data based on ContentProvider may be used in the Activity.
On the basis of the above embodiments, as an alternative embodiment, the download subject, that is, the first application, is a resource loader;
the download record comprises at least one of a download status and a download progress;
determining a processing strategy of the first file according to the download records of the first application program and the second application program on the first file, wherein the processing strategy comprises the following steps:
determining a processing strategy of the first file as follows according to the download states of the first application program and the second application program to the first file in the process of downloading:
combining the downloaded parts of the first file by the first application program and the second application program according to the downloading progress of the first file by the first application program and the second application program, and obtaining and storing a combined result of the downloaded parts of the first file;
And continuing to download the part except the merging result of the download part in the first file.
It should be noted that, when the download states of the first application program and the second application program for a first file are both in downloading, the download progress of the first file by the two application programs needs to be considered, and based on the download progress of the first file by the two application programs, the download parts of the first file by the two application programs are respectively combined, so as to obtain the combination result of the download parts of the first file.
In some embodiments, when the first application program merges the downloaded portion of the first file, the downloaded portion of the second application program is first moved to the preset storage location of the first application program, so that the preset storage location of the second application program does not have the downloaded portion of the first file, and then the first application program merges the downloaded portion of the first application program and the downloaded portion of the moved second application program, where the specific manners of merging include stitching, overlaying and clipping, please refer to fig. 3, which schematically illustrates a schematic diagram of 3 merging manners provided in the embodiments of the present application, and as shown in the following:
the splicing is the most easily understood merging mode, that is, the next field of the end field of the downloaded part of an application program is the initial field of the downloaded part of another application program, for example, the total byte number of a certain first file is 100, the downloading progress of the first application program for downloading the first file is 0-30%, that is, the downloading progress of the first application program for downloading the first file is 1-30 bytes in the figure, the downloading progress of the second application program for downloading the first file is 30-60%, that is, the downloading progress of the second application program for downloading the first file is 31-60 bytes, that is, the two downloaded parts are merged, that is, the merging result is 0-60% of the first file, that is, 1-60 bytes of the first file, that is, the first application program for downloading from 61 th byte is continued.
Covering, that is, the downloaded part of one application program includes the downloaded part of another application program, the downloaded part of one application program is covered with the downloaded part of another application program, for example, the total byte number of a certain first file is 100, the downloading progress of the first file downloaded by the first application program is 0-60%, that is, the downloading progress of the first file downloaded by the first application program is 1-60 bytes, such as file 4 in the figure, the downloading progress of the first file downloaded by the second application program is 0-30%, that is, the downloading progress of the first file is 1-30 bytes, such as file 5 in the figure, the downloaded part of the first application program is: bytes 1-60 cover the part of the second application download: since the progress of the file 5 in fig. 3 is completely covered by the file 4, the filling diagonal line is added to the whole area of the file 5, and the obtained merging result is 0-60% of the first file, i.e. 1-60 bytes of the first file, such as the file 6 in the figure, and the first application program continues to download from the 61 st byte.
When there is a partial overlap between the downloaded portion of one application program and the downloaded portion of another application program, it is necessary to determine that the two application programs are not overlapped, and then splice with the overlapped portions in byte order, for example, the total byte number of a certain first file is 100, the downloading progress of the first application program downloading the first file is 0-40%, i.e. 1-40 bytes are downloaded, for example, file 7 in the figure, the downloading progress of the second application program downloading the first file is 30-60%, i.e. 30-60 bytes are downloaded, for example, file 8 in the figure, it is determined that the partially overlapped contents are 30-40 bytes, the non-overlapped portions are 1-29 bytes and 41-60 bytes, the overlapped contents of file 7 and file 8 are added with filling oblique lines in the file 8 in the byte order, the 30-40 bytes in the file 8 are deleted, and then the remaining contents of file 7 and file 8 are deleted in the byte order: the 41 st to 60 th bytes are spliced to obtain 1 st to 60 th bytes, namely the file 9 in the figure, and the first application program continues to download from the 61 st byte.
It should be noted that, when the first application program continues to download the first file, the downloading progress of the first file is updated in real time, and when the downloading progress reaches 100%, that is, it is determined that the entire content of the first file has been downloaded, then the downloading status of the first file needs to be updated from downloading to downloading.
On the basis of the above embodiments, as an alternative embodiment, for the purpose of facilitating understanding, the embodiment of the present application refers to a portion of the first application program downloaded to the first file simply as a first portion, and refers to a portion of the second application program downloaded to the first file simply as a second portion.
According to the downloading progress of the first application program and the second application program to the first file, merging the downloaded parts of the first file by the first application program and the second application program to obtain and save the merged parts of the first file, including:
a) If the first part and the second part do not have the coincident content, splicing the first part and the second part according to the downloading progress of the first application program and the second application program on the first file respectively, and obtaining and storing a merging result of the downloading part of the first file;
B) If the first part and the second part have overlapped contents, deleting the overlapped contents of one part of the first part and the second part to obtain the residual contents of one part;
and splicing the residual content of one part with the other part according to the downloading progress of the first application program and the second application program to the first file, so as to obtain and store the merging result of the downloading part of the first file.
It should be understood that the above-mentioned mode a is a splicing mode, and the mode B is a covering or cutting mode.
On the basis of the above embodiments, as an alternative embodiment, the first application program is a resource loader;
the download record includes a download status;
determining a processing strategy of the first file according to the download records of the first application program and the second application program on the first file, wherein the processing strategy comprises the following steps:
according to the fact that the first application program downloads the first file in a non-downloaded state, the second application program downloads the first file in a downloaded state, and the processing strategy of the first file is determined to be:
and moving the first file downloaded by the first file to a preset storage position of the first application program.
When the downloading main body, namely the first application program is the resource loading program, if one first file resource loading program is not downloaded and the application distribution program is downloaded, the resource loading program does not need to download the first file again, but moves the first file downloaded by the application distribution program to a preset storage position of the first application program.
On the basis of the above embodiments, as an alternative embodiment, the first application program is a resource loader;
the download record comprises a download state and a download progress;
determining a processing strategy of the first file according to the download records of the first application program and the second application program on the first file, wherein the processing strategy comprises the following steps:
according to the condition that the first application program downloads the first file as not downloaded, the second application program determines the processing strategy of the first file as in the process that the second application program downloads the first file as downloaded:
moving the part of the first file downloaded by the second application program to a preset storage position of the first application program;
and continuing to download the first file according to the downloading progress of the second application program to the first file.
When the download subject, i.e. the first application program, is the resource loader, if a first file resource loader is not downloaded and the application distribution program has downloaded a part, the resource loader does not need to download the first file in a re-header manner, but moves the part of the application distribution program for downloading the first file to a preset storage position of the first application program, and then continues to download the first file based on the downloading progress of the application distribution program for the first file. The embodiment of the application avoids repeated downloading of the file and improves the efficiency of the resource loader to obtain the file of the resource.
It should be understood that, when the resource loader continues to download the first file, the downloaded content will be downloaded in the preset storage location, specifically, the resource loader will determine the storage interval of the preset storage location according to the size of the storage space occupied by the first file, for example, the storage interval of the first file is 10000-12000 bytes, and when the part downloaded by the application distributor occupies 10000-11000 bytes after storing the part downloaded by the application distributor in the storage interval, the content of the first file that is continuously downloaded will be stored from 11001 bytes until the content is stored to 12000 bytes.
On the basis of the foregoing embodiments, as an alternative embodiment, determining at least one first file includes:
determining a second file set according to the download records of the files;
and determining the first file set from the configuration information according to the file identification of each second file in the second file set.
In some embodiments, when the first application program is a resource loader, the resource loader determines that the first file set does not need to interact with the application distribution program, only needs to determine the file identifier of each downloaded second file from the preset storage position used for storing the second file set by itself according to the download record of each file, and then uses the files except the second file as the first file from the configuration information by an exclusion method.
In other embodiments, the resource loader in the embodiments of the present application updates the download record of the file when downloading the file, where the download record includes a download status, and the resource loader may directly determine the second file set according to the download status of each file.
On the basis of the foregoing embodiments, as an alternative embodiment, when the first application is a resource loader, determining and executing a processing policy of the first file further includes:
carrying out integrity and accuracy check on the downloaded first file;
if the verification is passed, the first file is reserved;
if the verification is not passed, deleting the first file and re-downloading the first file.
After each first file is downloaded, the resource loading program can carry out integrity and accuracy check on the first file, wherein the integrity check is to check whether the first file downloads complete content or not, and the accuracy check is to check whether data of the first file is standard or not and carry out corresponding logic processing on wrong information, such as non-empty judgment, whether values are in an enumeration/data dictionary range, whether the data meet related regular expression rules or not, and the like.
If the first file passes the integrity and accuracy check, the first file is reserved, the downloading state of the first file is updated to be downloaded, and after all files of the resource are downloaded, the resource is loaded. If the first file does not pass any one of the integrity and accuracy checks, deleting the first file and re-downloading the first file, and updating the downloading state of the first file into downloading and updating the downloading progress when the first file is re-downloaded.
In the related art, when an application distribution program downloads a resource, if a user starts a resource loading program when the resource is not downloaded, verification is not passed because the resource downloaded by the application distribution program is incomplete, and then the application distribution program downloads files again, so that flow waste is caused.
On the basis of the above embodiments, as an alternative embodiment, when the download subject is a resource loader, the method is specifically executed by a target SDK in the resource loader.
It should be noted that, the target SDK in the embodiment of the present application is an SDK built in the resource loader. When the resource loader is started, the resource loader initializes the target SDK, and the target SDK pulls configuration information of the resource to a server of the resource loader.
In some embodiments, the target SDK determines to instruct the second application to pause downloading resources only if any of the following conditions are met, determines the first set of files, and determines a download record for each first file in the first set of files by the second application. The conditions of the embodiments of the present application include:
condition 1: the first application program calls a target SDK;
condition 2: the second application program calls the target SDK;
condition 3: the target SDK senses that the first application program is in an operating state in which the load of the terminal is smaller than a preset threshold value.
From the above three conditions, when the target SDK is called by the first application program or the second application program, the second application program is instructed to pause the downloading resource, the first file set and the downloading records of the second application program to each first file in the first file set are determined, in addition, the target SDK can sense the load of the terminal when the resource loader operates, the second application program is instructed to pause the downloading resource according to the load, and the first file set and the downloading records of the second application program to each first file in the first file set are determined.
In some embodiments, the time when the resource loader calls the target SDK in the embodiments of the present application may be that the main process of the resource loader detects that the current running scene is a non-core scene or a scene with low requirements on terminal performance and bandwidth flow, and takes the resource loader as an example of a game application program, and when the current running scene of the resource loader is a scene with many static virtual objects such as a game hall, a game store, etc., the resource loader determines that the current running scene is a non-core scene, and is also a scene with low requirements on terminal performance and bandwidth flow.
In some embodiments, the resource loader has a service interface built therein for binding communication by other processes, and when the resource loader is not running in the terminal or the load of the terminal is small, other processes, such as the second application, can call the target SDK through the binding service interface.
It should be noted that, in some embodiments, the target SDK may sense a current running scenario of the first application or sense a load of the terminal, and determine that the second application pauses the downloading resource when sensing that the first application is in a running state where the load of the terminal is less than a preset threshold, and determine the first file set and a downloading record of the second application for each first file in the first file set.
In some embodiments, when the target SDK senses that the first application is in an operating state in which the terminal load is less than the preset threshold, the target SDK starts downloading the resources, and when the target SDK senses that the first application is no longer in an operating state in which the terminal load is less than the preset threshold, the target SDK automatically pauses downloading the resources, thereby reducing the peak value of the terminal load.
Referring to fig. 4, an interaction diagram of the first application program in the embodiment of the present application when the first application program is a resource loader is shown, and as shown in the figure, the interaction flow includes:
s401, a user clicks an icon of a resource loader on the terminal, the resource loader is opened, and the resource loader initializes a target SDK in an initialization stage. In the initialization process, the target SDK pulls configuration information of the resource from a server of the resource loader, wherein the configuration information comprises identifiers and download addresses of all files of the resource;
s402, a server of the resource loader returns configuration information of resources to a target SDK;
s403, the target SDK starts pre-downloading, and the target SDK filters files (namely second files) which are already downloaded and exist in the private directory of the resource loader, and only downloads files (namely first files) which are not started to be downloaded or are partially downloaded.
S404, obtaining a download record of the first file from the application distribution program through a ContentProvider mechanism, wherein for each first file, the download record of the first file is divided into the following cases according to the application distribution program and the resource loader:
case one: the application distribution program does not download the first file: the target SDK directly starts the downloading process of the first file, or if the target SDK has downloaded a part of the first file, starting breakpoint continuous transmission at the moment, and continuing to download subsequent contents according to the downloading progress of the first file.
And a second case: the application distribution program has downloaded the first file, and the target SDK moves the file to the private directory of the resource loader through a ContentProvider mechanism and remains after verification passes.
And a third case: the target SDK moves the part of the first file downloaded by the application distribution program to the private directory of the resource loading program through a ContentProvider mechanism, and meanwhile, the downloading progress of the application distribution program to the first file is also known. At this time, the target SDK may be discussed in terms of whether the resource loader begins to pre-download the first file, as follows:
Case one, the resource loader has already begun to pre-download the first file: and merging the files according to the downloading progress of the first file by the resource loading program and the application distribution program, and continuing downloading at the latest breakpoint of the new file after merging.
In case two, the resource loader has not yet started pre-downloading the file: and directly carrying out breakpoint continuous transmission on the basis of the downloading progress of the application distribution program, continuously downloading the byte data after the breakpoint, and writing the byte data into the file.
On the basis of the above embodiments, when the download subject, that is, the first application program is an application distribution program, determining, according to the download records of the first application program and the second application program on the first file, a processing policy of the first file includes:
determining a processing strategy of the first file as follows according to the download state of the second application program to the first file in the process of downloading:
if the downloading progress of the first application program to the first file is not greater than the downloading progress of the second application program to the first file, deleting the part of the first application program to download the first file, and continuing to download the first file according to the downloading progress of the second application program to the first file;
If the downloading progress of the first application program to the first file is larger than the downloading progress of the second application program to the first file, continuing to download the first file according to the downloading progress of the first application program to the first file.
When the download subject is an application distribution program, if for a first file, both applications download portions of the first file, the processing policy of the first file is determined by comparing the sizes of the download progress of the first file by the two applications.
For example, if the total byte data size of a certain first file is 200 bytes and the downloading progress of the resource loader is 1 st to 140 th bytes, if the downloading progress of the application distribution program is less than 140 th bytes, for example, 1 st to 100 th bytes, the application distribution program deletes the part of the first file downloaded by itself, and then continues to download from 141 th bytes; if the progress of the application distribution program download is greater than 140 bytes, such as 1 st to 150 th bytes, the application distribution program deletes the portion of the first file downloaded by itself and then continues the download starting from 151 th byte.
It should be noted that, when the first application program downloads the first file, the downloading progress of the first file is updated in real time, and when the downloading progress reaches 100%, that is, it is determined that the entire content of the first file has been downloaded, then the downloading state of the first file needs to be updated from downloading to downloading.
On the basis of the above embodiments, when the download subject, that is, the first application program is an application distribution program, determining the first file set and the download record of the second application program for each first file in the first file set includes:
transmitting a query request to the second application program by utilizing a ContentProvider mechanism, wherein the query request comprises a file identifier of at least one file of the resource, and the query request is used for requesting a download record of the file of the corresponding file identifier;
and determining the first file set and the download records of the second application program on each first file in the first file set according to the download records of the files of the corresponding file identifications returned by the second application program.
The application distribution program of the embodiment of the application, because the configuration information of the resource is obtained in advance, sends a query request to the second application program, namely the resource loading program by utilizing a ContentProvider mechanism, wherein the query request comprises the file identification of at least one file of the resource, the query request is used for requesting the resource loading program to return the downloading record of the file with the corresponding file identification, and because the downloading record comprises the downloading state of the resource loading program to each file, the downloading record of the file with the corresponding file identification returned by the resource loading program can know which files are downloaded by the resource loading program and which are downloaded by the resource loading program or not, thereby determining the downloading records of the first file set and the second application program to each first file in the first file set.
Referring to fig. 5, an interaction diagram of a first application program according to an embodiment of the present application when the first application program is an application distribution program is shown, where the interaction flow includes:
s501, uploading configuration information of resources to a server of an application distribution program by a resource developer;
s502, when the application distribution program senses that the terminal load is smaller than a preset threshold value, the application distribution program acquires configuration information from a server of the application distribution program;
s503, traversing configuration information by the application distribution program, inquiring a download record of each file from a target SDK of the resource loader, and assuming that the file traversed currently is a file A (other files in a file list are also similar to the description processing A of the file A). The following 3 cases can be discussed according to different download states of the file a returned by the target SDK:
a. file a has been downloaded in the resource loader: the application distribution program directly skips the pre-download of the file;
b. file a does not open a download in the resource loader: the application distribution program directly starts downloading the file A, and the downloading at this time can be the breakpoint continuous transmission of the application distribution program to the file A, namely, the file A which is not downloaded last time by the application distribution program is continuously downloaded.
c. File a is downloaded to a portion in the resource loader: the application distribution program starts breakpoint continuous transmission according to the returned file downloading record, and downloads file contents after the breakpoint, and the application distribution program further comprises two conditions:
c1. if the downloading progress of the first application program to the first file is not greater than the downloading progress of the second application program to the first file, deleting the part of the first application program to download the first file, and continuing to download the first file according to the downloading progress of the second application program to the first file;
c2. if the downloading progress of the first application program to the first file is larger than the downloading progress of the second application program to the first file, continuing to download the first file according to the downloading progress of the first application program to the first file.
It should be noted that, the application distribution program in the embodiment of the present application may sense the operation load of the terminal, so as to start the pre-download method as the execution resource of the first application program when the operation load of the terminal is sensed to be less than the preset threshold.
In some embodiments, considering that the resources are finally used (i.e. loaded) by the resource loader, when the application distribution program senses that the first application program is downloading the resources, even if the operation load of the terminal is sensed to be smaller than the preset threshold value, the first application program is not instructed to pause downloading the resources, but the first application program waits for the first application program to pause downloading the resources autonomously, and then a sufficient pre-downloading flow is started.
Referring to fig. 6, an architecture diagram of a pre-download scenario applied to a game resource in the present application is shown schematically, that is, the resource in the embodiment of the present application is a game resource, and the resource loader is a game application, and in some embodiments, the resource loader may also have a non-game application with a game function, for example, a chat application, an audio/video playing application, a news information application, a browser application, and so on.
The system architecture of the embodiments of the present application relates to a game performance improvement (Game Performance Amelioration, GPA) platform 601, the GPA platform 601 focuses on the performance optimization work for the game, and by cooperating with each terminal manufacturer, a unified performance optimization scheme is established. GPA realizes unified game performance solution by deeply analyzing game scenes, wherein the upper layer is in unified butt joint with each game, and the bottom layer is in butt joint with different manufacturers.
In the embodiment of the application, the GPA platform 601 can update the game resources periodically or aperiodically according to the higher requirements of the player on the image quality and the frame rate, so as to meet the requirements of the player on the performance experience. After developing new resources for the game, GPA platform 601 issues the resources to game server 603 and store server 604, respectively. The game server 603 is a server for providing services to the game program 6021, and specific services may include game version update, network access, game data loading, and the like. Store server 604 allows end users to download and update applications that include resources of an update application (e.g., game program 6021), and in some embodiments, updating the resources of the game via store server 604 may also provide personalized rewards to players.
The terminal 602 used by the player loads at least the client of the game program 6021 and the application distribution program 6022, which is the client of the application store. In the embodiment of the present application, for convenience of description, the resource includes 2 files by way of example: file 1 and file 2, the first download subject is a game program, and the overall pre-download process may include:
the game program 6021 obtains configuration information of the resource from the game server 603, the configuration information including file identifications of the file 1 and the file 2 and download addresses at the resource database 604;
the game program 6021 determines that the file 1 and the file 2 are first files, determines that the application distribution program 6022 pauses downloading resources and determines that the application distribution program 6022 downloads records of the first files in the first file set, and obviously, the application distribution program does not download the two files at the moment;
the game program 6021 starts to download the file 1 and the file 2 simultaneously, creates download records of the file 1 and the file 2, and updates download progress of the file 1 and the file 2 in real time as the file 1 and the file 2 are downloaded;
the game program 6021 stops downloading the file 1 and the file 2 due to being closed by the user, the download progress at the time of stopping downloading the file 1 is 50%, and the download progress of the file 2 is 30%;
After a period of time has elapsed, the application distribution program 6022 starts a pre-download flow, and the application distribution program 6022 obtains configuration information of the resource from the store server 604, the configuration information including file identifiers of the file 1 and the file 2 and a download address;
the application distribution program 6022 instructs the game program 6021 to pause the download resource and determines that the game program 6021 has not completed any one of the files yet, and the application distribution program 6022 continues the download from 50% of the download progress for the file 1 and from 30% of the download progress for the file 1;
the application distribution program 6022 stops downloading the file 1 and the file 2 for some reason, the download progress at the time of stopping downloading the file 1 is 70%, and the download progress of the file 2 is 100%;
after a period of time, the game program 6021 starts a pre-downloading flow, the game program 6021 instructs the application distribution program 6022 to pause downloading resources for the file 1, firstly, the part of the application distribution program 6022 downloaded for the file 1 is moved to a preset storage position, then the part of the application distribution program 6022 downloaded for the file 1 is combined with the part of the application distribution program 6022 downloaded for the file 1, the file with 70% of downloading progress is obtained, then the downloading is continued from 70% of downloading progress, and the game program 6021 directly moves the file 2 to the preset storage position for the file 2;
After a period of time has elapsed, the application distribution program 6022 switches again to the download subject, instructing the game program 6021 to pause downloading of the resource for the file 1, at which time the progress of downloading of the file 1 by the game program 6021 is 90%, and the application distribution program continues to download from 90% to completion;
after a period of time, the game program 6021 switches to the download subject again, and the application distribution program downloads the portion of the first file: the progress is moved to a preset storage position by 90% -100% of data content, then the parts of the first file downloaded last time are combined to obtain a complete first file, the game program checks the first file and the second file, and after the check is passed, game resources are loaded, so that players can experience new versions of games in time.
When a player plays a new version of game, the game program 6021 collects running data of the terminal in real time, such as a frame rate, a CPU occupation rate, a game duration and the like, and when the player is idle, the running data is fed back to the GPA platform 601, so that an operator of the GPA platform 601 can further optimize the game program 6021 according to load information.
The embodiment of the application provides a device for pre-downloading a resource, which is applied to a first application program, wherein the resource comprises at least one file, and as shown in fig. 7, the device for pre-downloading the resource can comprise: a file determination module 701, and a policy enforcement module 702, wherein,
The file determining module 701 is configured to determine that the second application program pauses downloading the resource, determine a first file set and a download record of the second application program for each first file in the first file set, where the first file is a file in the resource except for the second file set, and the second file in the second file set is a file downloaded by a resource loader for loading the resource;
the policy execution module 702 is configured to determine, for each first file, a record of downloading the first file by the first application program, and determine and execute a processing policy of the first file according to the record of downloading the first file by the first application program and the second application program;
when the first application program is a resource loader, the second application program is an application distribution program for application distribution; when the first application is an application distribution program, the second application is a resource loader.
The apparatus of the embodiments of the present application may perform the method provided by the embodiments of the present application, and implementation principles of the method are similar, and actions performed by each module in the apparatus of each embodiment of the present application correspond to steps in the method of each embodiment of the present application, and detailed functional descriptions of each module of the apparatus may be referred to in the corresponding method shown in the foregoing, which is not repeated herein.
Compared with the related art, the method for pre-downloading the resources is executed by the first application program, the first application program can be applied to the resource loading program and the application distribution program, the switching of the downloading main body can be performed at any time, the purposes of downloading record interaction between the first application program and the second application program are achieved by determining the second application program to temporarily stop downloading the resources and determining the downloading record of each first file in the first file set by the first file set and the second application program, and the processing strategy of the first file is determined based on the downloading record of each first file by the two application programs.
In an alternative embodiment, there is provided an electronic device, as shown in fig. 8, the electronic device 4000 shown in fig. 8 includes: a processor 4001 and a memory 4003. Wherein the processor 4001 is coupled to the memory 4003, such as via a bus 4002. Optionally, the electronic device 4000 may further comprise a transceiver 4004, the transceiver 4004 may be used for data interaction between the electronic device and other electronic devices, such as transmission of data and/or reception of data, etc. It should be noted that, in practical applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 is not limited to the embodiment of the present application.
The processor 4001 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. The processor 4001 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 4002 may include a path to transfer information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 4002 can be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 8, but not only one bus or one type of bus.
Memory 4003 may be, but is not limited to, ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, EEPROM (Electrically Erasable Programmable Read Only Memory ), CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store a computer program and that can be Read by a computer.
The memory 4003 is used for storing a computer program that executes an embodiment of the present application, and is controlled to be executed by the processor 4001. The processor 4001 is configured to execute a computer program stored in the memory 4003 to realize the steps shown in the foregoing method embodiment.
Embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, may implement the steps and corresponding content of the foregoing method embodiments.
The embodiments of the present application also provide a computer program product, which includes a computer program, where the computer program can implement the steps of the foregoing method embodiments and corresponding content when executed by a processor.
The terms "first," "second," "third," "fourth," "1," "2," and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the present application described herein may be implemented in other sequences than those illustrated or otherwise described.
It should be understood that, although the flowcharts of the embodiments of the present application indicate the respective operation steps by arrows, the order of implementation of these steps is not limited to the order indicated by the arrows. In some implementations of embodiments of the present application, the implementation steps in the flowcharts may be performed in other orders as desired, unless explicitly stated herein. Furthermore, some or all of the steps in the flowcharts may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or phases may be performed at the same time, or each of these sub-steps or phases may be performed at different times, respectively. In the case of different execution time, the execution sequence of the sub-steps or stages may be flexibly configured according to the requirement, which is not limited in the embodiment of the present application.
The foregoing is merely an optional implementation manner of some implementation scenarios of the present application, and it should be noted that, for those skilled in the art, other similar implementation manners based on the technical ideas of the present application are adopted without departing from the technical ideas of the solution of the present application, which also belongs to the protection scope of the embodiments of the present application.

Claims (17)

1. A method of pre-downloading a resource, the resource comprising at least one file, for application to a first application, the method comprising:
determining that a second application program pauses downloading the resource, determining a first file set and a downloading record of the second application program for each first file in the first file set, wherein the first files are files except for a second file set in the resource, and the second files in the second file set are files downloaded by a resource loading program for loading the resource;
for each first file, determining a downloading record of the first application program to the first file, and determining and executing a processing strategy of the first file according to the downloading records of the first application program and the second application program to the first file respectively;
Wherein when the first application is the resource loader, the second application is an application distribution program for application distribution; when the first application program is the application distribution program, the second application program is the resource loader.
2. The method of claim 1, wherein the download record includes a download status;
determining a processing strategy of the first file according to the download records of the first application program and the second application program on the first file, wherein the processing strategy comprises the following steps:
and determining the processing strategy of the first file to download the first file according to the fact that the downloading states of the first application program and the second application program to the first file are not downloaded.
3. The method of claim 1, wherein the download record includes at least one of a download status and a download progress;
the determining the processing strategy of the first file according to the download records of the first application program and the second application program on the first file respectively comprises the following steps:
and determining a processing strategy of the first file to continuously download the first file according to the downloading progress of the first application program on the first file according to the downloading state of the first application program on the first file in downloading and the downloading state of the second application program on the first file in not downloading.
4. A method according to any one of claims 1-3, wherein said determining that the second application program is suspending downloading the resource, determining a first set of files and a record of the download of each first file in the first set of files by the second application program, further comprises:
obtaining configuration information of the resource, wherein the configuration information comprises file identifiers of all files in the resource;
the determining the download record of the second application program to each first file in the first file set includes:
and determining the download record of the second application program to the first files with corresponding identifiers to the second application program according to the file identifiers of the first files by using a ContentProvider mechanism.
5. The method of claim 4, wherein the first application is the resource loader;
the download record comprises at least one of a download state and a download progress;
determining a processing strategy of the first file according to the download records of the first application program and the second application program on the first file, wherein the processing strategy comprises the following steps:
determining a processing strategy of the first file according to the downloading state of the first application program and the second application program to the first file in downloading, wherein the processing strategy is as follows:
Combining the downloaded parts of the first file by the first application program and the second application program according to the downloading progress of the first file by the first application program and the second application program, and obtaining and storing a combined result of the downloaded parts of the first file;
and continuing to download the part except the merging result of the download part in the first file.
6. The method according to claim 5, wherein the merging the downloaded portions of the first file by the first application program and the second application program according to the download progress of the first file by the first application program and the second application program, respectively, to obtain and save the merged portion of the first file, comprises:
if the first part and the second part do not have the coincident content, splicing the first part and the second part according to the downloading progress of the first application program and the second application program on the first file respectively, and obtaining and storing a merging result of the downloading part of the first file;
deleting the overlapped content of one part of the first part and the second part if the overlapped content exists in the first part and the second part, and obtaining the residual content of the one part;
Splicing the residual content of one part with the other part according to the downloading progress of the first application program and the second application program to the first file, and obtaining and storing a merging result of the downloading part of the first file;
the first part is a part of the first file downloaded by the first application program, and the second part is a part of the first file downloaded by the second application program.
7. The method of claim 4, wherein the first application is the resource loader;
the download record comprises a download status;
determining a processing strategy of the first file according to the download records of the first application program and the second application program on the first file, wherein the processing strategy comprises the following steps:
according to the fact that the first application program downloads the first file in a non-downloaded state, the second application program downloads the first file in a downloaded state, and the processing strategy of the first file is determined to be:
and moving the first file downloaded by the first file to a preset storage position of the first application program.
8. The method of claim 4, wherein the first application is the resource loader;
The download record comprises a download state and a download progress;
determining a processing strategy of the first file according to the download records of the first application program and the second application program on the first file, wherein the processing strategy comprises the following steps:
according to the fact that the first application program downloads the first file in a non-downloaded state, and the second application program determines that the processing strategy of the first file is that:
moving the part of the first file downloaded by the second application program to a preset storage position of the first application program;
and continuing to download the first file according to the downloading progress of the second application program on the first file.
9. The method of claim 4, wherein the first application is the resource loader;
the determining the first set of files includes:
determining the second file set according to the download records of the files;
and determining the first file set from the configuration information according to the file identification of each second file in the second file set.
10. The method of claim 4, wherein the first application is the resource loader;
The determining and executing the processing strategy of the first file further comprises:
carrying out integrity and accuracy check on the downloaded first file;
if the verification is passed, the first file is reserved;
if the verification is not passed, deleting the first file and re-downloading the first file.
11. The method as recited in claim 10, further comprising:
and if all the files of the resource are determined to be downloaded and all the files pass the verification, loading the resource.
12. The method of any of claims 5-11, wherein the method is performed by a target SDK in the resource loader;
the method comprises the steps that a second application program is determined to pause downloading of the resource, a first file set and a downloading record of each first file in the first file set by the second application program are determined, and at least one of the following conditions is determined to be met:
the first application program calls the target SDK;
the second application program calls the target SDK;
and the target SDK senses that the first application program is in an operation state that the load of the terminal where the first application program is positioned is smaller than a preset threshold value.
13. The method of claim 4, wherein the first application is the application dispatcher;
the download record comprises at least one of a download state and a download progress;
determining a processing strategy of the first file according to the download records of the first application program and the second application program on the first file, wherein the processing strategy comprises the following steps:
determining a processing strategy of the first file as follows according to the download state of the second application program to the first file in the process of downloading:
if the downloading progress of the first application program to the first file is not greater than the downloading progress of the second application program to the first file, deleting the part of the first application program to download the first file, and continuing to download the first file according to the downloading progress of the second application program to the first file;
and if the downloading progress of the first application program to the first file is larger than the downloading progress of the second application program to the first file, continuing to download the first file according to the downloading progress of the first application program to the first file.
14. The method of claim 13, wherein determining the first set of files and the download records of the second application program for each first file in the first set of files comprises:
Transmitting a query request to the second application program by using a ContentProvider mechanism, wherein the query request comprises a file identifier of at least one file of the resource, and the query request is used for requesting a download record of the file with the corresponding file identifier;
and determining a first file set and a download record of the second application program for each first file in the first file set according to the download record of the file of the corresponding file identifier returned by the second application program.
15. A pre-download apparatus for a resource, the resource comprising at least one file, applied to a first application, the apparatus comprising:
the file determining module is used for determining that the second application program pauses downloading the resource, determining a first file set and a downloading record of the second application program for each first file in the first file set, wherein the first files are files except for a second file set in the resource, and the second files in the second file set are files downloaded by a resource loading program for loading the resource;
the policy execution module is used for determining a downloading record of the first application program to the first file for each first file, and determining and executing a processing policy of the first file according to the downloading record of the first application program and the second application program to the first file respectively;
Wherein when the first application is the resource loader, the second application is an application distribution program for application distribution; when the first application program is the application distribution program, the second application program is the resource loader.
16. An electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to carry out the steps of the method of any one of claims 1-14.
17. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1-14.
CN202310649552.4A 2023-06-02 2023-06-02 Resource pre-downloading method and device, electronic equipment and storage medium Active CN116405540B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202310649552.4A CN116405540B (en) 2023-06-02 2023-06-02 Resource pre-downloading method and device, electronic equipment and storage medium
CN202311246378.5A CN117061594A (en) 2023-06-02 2023-06-02 Resource pre-downloading method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310649552.4A CN116405540B (en) 2023-06-02 2023-06-02 Resource pre-downloading method and device, electronic equipment and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202311246378.5A Division CN117061594A (en) 2023-06-02 2023-06-02 Resource pre-downloading method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116405540A true CN116405540A (en) 2023-07-07
CN116405540B CN116405540B (en) 2023-08-04

Family

ID=87014515

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202310649552.4A Active CN116405540B (en) 2023-06-02 2023-06-02 Resource pre-downloading method and device, electronic equipment and storage medium
CN202311246378.5A Pending CN117061594A (en) 2023-06-02 2023-06-02 Resource pre-downloading method and device, electronic equipment and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202311246378.5A Pending CN117061594A (en) 2023-06-02 2023-06-02 Resource pre-downloading method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (2) CN116405540B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004355585A (en) * 2003-03-31 2004-12-16 Culture Com Technology Macao Ltd File downloading method and system
CN102164317A (en) * 2011-02-14 2011-08-24 上海高智科技发展有限公司 Internet protocol (IP) set-top box-oriented multi-server segmented downloading system
CN109167820A (en) * 2018-08-13 2019-01-08 彩讯科技股份有限公司 A kind of method for down loading of application program, device, storage medium and terminal
CN110247985A (en) * 2019-06-28 2019-09-17 北京奇艺世纪科技有限公司 A kind of resource downloading method, device, electronic equipment and medium
CN111352633A (en) * 2020-02-24 2020-06-30 腾讯科技(深圳)有限公司 Resource downloading method and device of application program, terminal and storage medium
CN113395353A (en) * 2021-06-30 2021-09-14 北京字节跳动网络技术有限公司 File downloading method and device, storage medium and electronic equipment
CN115878138A (en) * 2023-03-03 2023-03-31 腾讯科技(深圳)有限公司 Application pre-downloading method and device, computer and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004355585A (en) * 2003-03-31 2004-12-16 Culture Com Technology Macao Ltd File downloading method and system
CN102164317A (en) * 2011-02-14 2011-08-24 上海高智科技发展有限公司 Internet protocol (IP) set-top box-oriented multi-server segmented downloading system
CN109167820A (en) * 2018-08-13 2019-01-08 彩讯科技股份有限公司 A kind of method for down loading of application program, device, storage medium and terminal
CN110247985A (en) * 2019-06-28 2019-09-17 北京奇艺世纪科技有限公司 A kind of resource downloading method, device, electronic equipment and medium
CN111352633A (en) * 2020-02-24 2020-06-30 腾讯科技(深圳)有限公司 Resource downloading method and device of application program, terminal and storage medium
CN113395353A (en) * 2021-06-30 2021-09-14 北京字节跳动网络技术有限公司 File downloading method and device, storage medium and electronic equipment
CN115878138A (en) * 2023-03-03 2023-03-31 腾讯科技(深圳)有限公司 Application pre-downloading method and device, computer and storage medium

Also Published As

Publication number Publication date
CN116405540B (en) 2023-08-04
CN117061594A (en) 2023-11-14

Similar Documents

Publication Publication Date Title
US7698223B2 (en) Pluggable file-based digital rights management API layer for applications and engines
CN102685729B (en) For moving the background transfer services of the application in equipment
CN110765023B (en) Distributed system testing method and system based on chaos experiment
CN100463549C (en) Method for down loading network resource using mobile terminal
US7613453B2 (en) System and method for provisioning a third party mobile device emulator
WO2015062399A1 (en) Cloud service platform middleware and cloud uploading method
CN108370345A (en) System and method for storing message data
US20170168807A1 (en) Method and electronic device for updating application program
US20130031214A1 (en) Method and system for efficient download of data package
CN108399331A (en) Application process trial method and system
CN109167820A (en) A kind of method for down loading of application program, device, storage medium and terminal
CN106934272B (en) Application information verification method and device
CN114139135B (en) Equipment login management method, device and storage medium
CN116405540B (en) Resource pre-downloading method and device, electronic equipment and storage medium
CN107305608A (en) The management method and device of terminal device
CN115878138A (en) Application pre-downloading method and device, computer and storage medium
CN115039082A (en) Log writing method and device, electronic equipment and storage medium
CN108616603B (en) Method and system for synchronizing internal and external network data
CN109962946B (en) Method and device for downloading resources
CN111385265A (en) Communication method and device in iOS system
CN107168648B (en) File storage method and device and terminal
CN114585035A (en) Voice call method, device and computer readable storage medium
CN112915545A (en) Data processing method and system
WO2021102849A1 (en) Resource acquisition method and apparatus, and electronic device
CN108733805B (en) File interaction method, system, computer equipment and 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40089297

Country of ref document: HK