CN110968334B - Application resource updating method, resource package manufacturing method, device, medium and equipment - Google Patents

Application resource updating method, resource package manufacturing method, device, medium and equipment Download PDF

Info

Publication number
CN110968334B
CN110968334B CN201911081574.5A CN201911081574A CN110968334B CN 110968334 B CN110968334 B CN 110968334B CN 201911081574 A CN201911081574 A CN 201911081574A CN 110968334 B CN110968334 B CN 110968334B
Authority
CN
China
Prior art keywords
resource
downloaded
queue
resources
target resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911081574.5A
Other languages
Chinese (zh)
Other versions
CN110968334A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201911081574.5A priority Critical patent/CN110968334B/en
Publication of CN110968334A publication Critical patent/CN110968334A/en
Application granted granted Critical
Publication of CN110968334B publication Critical patent/CN110968334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure relates to the field of computer technologies, and in particular, to an application resource update method, a resource package manufacturing method, an application resource update device, a resource package manufacturing device, a computer readable storage medium, and an electronic device, where the method includes: reading a target resource package and obtaining a queue to be downloaded corresponding to the target resource package; sequencing the resources to be downloaded according to the initial position of the resources to be downloaded in the target resource package in the queue to be downloaded so as to obtain a first resource queue; traversing the first resource queue, and merging adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain resource blocks so as to obtain a second resource queue; and downloading the application packets in sequence based on the second resource queue so as to update the application corresponding to the target resource packet. The technical scheme of the embodiment of the disclosure can accelerate the update speed of the application resource and shorten the update time.

Description

Application resource updating method, resource package manufacturing method, device, medium and equipment
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to an application resource update method, a resource package manufacturing method, an application resource update device, a resource package manufacturing device, a computer readable storage medium, and an electronic device.
Background
Due to the development of the internet, developers have developed application programs having various functions and services. However, with the improvement of living standard, the requirements of various functions and services are increasing. To accommodate the needs of people, developers need to develop and update applications. Many large applications are typically updated by updating resource files. For example, when a client of many online games updates, a part of the resource files in the client will be updated, so as to shorten the time consumed by updating the resources.
In the prior art, the update is generally performed in two ways: firstly, all updated resource files are directly downloaded, but the downloading time is long, and a plurality of redundant resources are downloaded at the same time; secondly, firstly, comparing the resources, and only updating the differential resources after comparison, however, the differential resources identified by the comparison method are usually a plurality of discrete small resource files, so that the downloading speed can be influenced, and the problem of long time consumption for updating is caused.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure aims to provide an application resource updating method, a resource package manufacturing method, an application resource updating device, a resource package manufacturing device, a computer readable storage medium and electronic equipment, so that the speed of updating the application resource is increased at least to a certain extent, and the time consumption of updating is shortened.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of the present disclosure, there is provided an application resource updating method, including:
reading a target resource package and obtaining a queue to be downloaded corresponding to the target resource package;
sequencing the resources to be downloaded according to the initial position of the resources to be downloaded in the target resource package in the queue to be downloaded so as to obtain a first resource queue;
traversing the first resource queue, and merging adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain resource blocks so as to obtain a second resource queue;
And downloading the application packets in sequence based on the second resource queue so as to update the application corresponding to the target resource packet.
Optionally, based on the foregoing solution, the resources to be downloaded in the target resource package are arranged in order from the back to the front according to the modification time.
Optionally, based on the foregoing solution, traversing the first resource queue, and merging, according to the starting position and the size of the resource to be downloaded, adjacent resources to be downloaded in the first resource queue to obtain a resource block, where the method includes:
calculating a termination position corresponding to the resource to be downloaded according to the size of the resource to be downloaded and the corresponding starting position;
and merging adjacent resources to be downloaded in the first resource queue based on the starting position and the ending position to obtain a resource block.
Optionally, based on the foregoing solution, the merging, based on the starting position and the ending position, adjacent resources to be downloaded in the first resource queue to obtain a resource block includes:
judging whether two adjacent resources to be downloaded in the first resource queue are continuous or not based on the starting position and the ending position so as to obtain the relation between the two adjacent resources to be downloaded; wherein the relationship comprises continuous and discontinuous;
Determining a plurality of adjacent resources to be downloaded with a continuous relationship in the first resource queue;
and merging the plurality of resources to be downloaded to obtain a resource block.
Optionally, based on the foregoing solution, the obtaining a queue to be downloaded corresponding to the target resource packet includes:
reading a first description file corresponding to a target resource to be downloaded in the target resource package, and simultaneously reading a second description file corresponding to the target resource to be downloaded in a local application;
and judging whether to add the target resource to be downloaded into a queue to be downloaded according to the first description file and the second description file.
Optionally, based on the foregoing scheme, the description file includes an information-digest value;
the step of judging whether to add the target resource to be downloaded to a queue to be downloaded according to the first description file and the second description file comprises the following steps:
when the second description file is different from the first description file, adding the target resource to be downloaded into a queue to be downloaded;
and when the second description file is the same as the first description file, not processing the target resource to be downloaded.
According to a second aspect of the present disclosure, there is provided a resource package manufacturing method, including:
Reading the modification time of the resources to be updated, and sequencing the resources to be updated according to the sequence from the back to the front of the modification time to obtain an update sequence;
and packaging the resources to be updated according to the sequence of the update sequence to obtain a target resource package, so that the target resource package updates the application corresponding to the target resource package according to the application resource update method described in any one of the above.
According to a third aspect of the present disclosure, there is provided an application resource updating apparatus, including: the resource processing module is used for reading a target resource packet and acquiring a queue to be downloaded corresponding to the target resource packet;
the first ordering module is used for ordering the resources to be downloaded according to the initial position of the resources to be downloaded in the target resource package in the queue to be downloaded so as to obtain a first resource queue;
the resource merging module is used for traversing the first resource queue, merging adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain resource blocks so as to obtain a second resource queue;
and the resource downloading module is used for downloading the target resource package according to the second resource queue in sequence so as to update the application corresponding to the target resource package.
According to a fourth aspect of the present disclosure, there is provided a resource pack making apparatus including:
the second ordering module is used for reading the modification time of the resources to be updated, and ordering the resources to be updated according to the sequence from near to far of the modification time to obtain an update sequence;
and the resource packaging module is used for packaging the resources to be updated according to the sequence of the updating sequence to obtain a target resource package so as to update the application corresponding to the target resource package according to the application resource updating method.
According to a fifth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements an application resource updating method or resource package making method as described in any of the above.
According to a sixth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
a processor; and
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the application resource updating method or the resource package making method as claimed in any one of the preceding claims.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
in the method for updating application resources provided by the embodiment of the disclosure, a target resource package and a corresponding to-be-downloaded queue are read first, the to-be-downloaded resources are sequenced according to the initial position of the to-be-downloaded resources in the to-be-downloaded queue in the target resource package to obtain a first resource queue, then the first resource queue is traversed, adjacent to-be-downloaded resources in the first resource queue are combined according to the initial position and the size of the to-be-downloaded resources to obtain resource blocks, and finally downloading is sequentially performed based on the second resource queue, so that the aim of updating the application corresponding to the target resource package is achieved. According to the technical scheme provided by the embodiment of the disclosure, the resources to be downloaded in the first resource queue are combined according to the starting position and the size of the resources to be downloaded to obtain the resource block, so that the process of downloading a plurality of discrete small resource files in the process of updating the resources is avoided, the resource downloading speed is increased, the resource updating speed is further increased, and the time consumption of resource updating is shortened.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 schematically illustrates a flow chart of a method of application resource update in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a flowchart of a method for obtaining a queue to be downloaded corresponding to the target resource package in an exemplary embodiment of the disclosure;
FIG. 3 schematically illustrates a flowchart of a method for determining whether to add the target resource to be downloaded to a queue to be downloaded according to the first description file and the second description file in an exemplary embodiment of the present disclosure;
fig. 4 schematically illustrates a flowchart of a method for traversing the first resource queue and merging adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain a resource block in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a flowchart of a method for merging adjacent resources to be downloaded in the first resource queue to obtain a resource block based on the start position and the end position in an exemplary embodiment of the present disclosure;
FIG. 6 schematically illustrates a flowchart of an application resource update method in an exemplary embodiment of the present disclosure when the description file is an MD5 value in an exemplary embodiment of the present disclosure;
FIG. 7 illustrates a schematic format of a target resource package in an exemplary embodiment of the present disclosure;
FIG. 8 schematically illustrates a flow chart of a resource package fabrication method in an exemplary embodiment of the present disclosure;
FIG. 9 schematically illustrates a composition diagram of an application resource updating device in an exemplary embodiment of the present disclosure;
fig. 10 schematically illustrates a composition diagram of a resource pack manufacturing apparatus in an exemplary embodiment of the present disclosure;
fig. 11 schematically shows a structural schematic diagram of a computer system suitable for use in implementing the electronic device of the exemplary embodiments of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
In the present exemplary embodiment, an application resource update method is provided first, which can be applied to a resource update process of an application program of a terminal device such as a mobile phone, a tablet, a computer, and the like. Referring to fig. 1, the above-described application resource updating method may include the steps of:
s110, reading a target resource package and acquiring a queue to be downloaded corresponding to the target resource package;
s120, sorting the resources to be downloaded according to the initial positions of the resources to be downloaded in the queues to be downloaded in the target resource package so as to obtain a first resource queue;
S130, traversing the first resource queue, and merging adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain resource blocks so as to obtain a second resource queue;
and S140, downloading is sequentially carried out based on the second resource queue so as to update the application corresponding to the target resource package.
According to the application resource updating method provided by the embodiment, the resource blocks are obtained by combining the resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded, so that the process of downloading a plurality of discrete small resource files in the resource updating process is avoided, the resource downloading speed is improved, the resource updating speed is further improved, and the resource updating time is shortened.
Hereinafter, each step of the application resource updating method in the present exemplary embodiment will be described in more detail with reference to the accompanying drawings and embodiments.
Step S110, reading a target resource package and obtaining a queue to be downloaded corresponding to the target resource package.
In an example embodiment of the present disclosure, the resources to be downloaded in the target resource package may be arranged in a sequence from the back to the front according to the modification time. For example, 3 resources A, B, C to be downloaded are included in the target resource package, and the corresponding update times are 20x9 years, 6 months, 1 day, 20x9 years, 4 months, 2 days, and 20x9 years, 10 months, 1 day, respectively. The order of the resources A, B, C to be downloaded in the target resource package at this time may be C, A, B. By arranging the resources to be downloaded in the target resource package from the back to the front according to the modification time, the latest updated resources to be downloaded can be continuously arranged in the target resource package, so that the subsequent resources to be downloaded can be combined conveniently.
In an example embodiment of the present disclosure, the obtaining a queue to be downloaded corresponding to the target resource packet, as shown in fig. 2, includes the following steps S210 to S220:
step S210, a first description file corresponding to a target resource to be downloaded in the target resource package is read, and a second description file corresponding to the target resource to be downloaded in a local application is read.
In an example embodiment of the present disclosure, in order to determine which part of the resources to be downloaded in the target resource package is the resource that needs to be downloaded in this update, which part of the resources to be downloaded need not be downloaded in this update, it is necessary to read the first description file corresponding to the target resource to be downloaded, and also to read the second description file corresponding to the target resource to be downloaded in the local application. Wherein the description file comprises descriptive files, such as information-digest values (MD 5), version numbers, etc., that may be used to characterize the current resource version.
Step S220, determining whether to add the target resource to be downloaded to a queue to be downloaded according to the first description file and the second description file.
In an example embodiment of the present disclosure, when a description file includes an information-digest value (MD 5), referring to fig. 3, determining whether to add the target resource to be downloaded to a queue to be downloaded according to the first description file and the second description file includes steps S310 to S320:
Step S310, adding the target resource to be downloaded to a queue to be downloaded when the second description file is different from the first description file;
step S320, when the second description file is the same as the first description file, the target resource to be downloaded is not processed.
In an example embodiment of the present disclosure, when the description file includes the information-digest value (MD 5), whether the resource to be downloaded is a resource that needs to be downloaded for the current update may be determined by comparing whether the description file corresponding to the local file corresponds to the target resource to be downloaded. When the second description file is different from the first description file, the local application is proved not to update the target resource to be downloaded, so that the target resource to be downloaded is judged to be the resource to be downloaded in the updating process, and the target resource to be downloaded is added into the queue to be downloaded. And in contrast, when the second description file is the same as the first description file, proving that the local application has updated the target resource to be downloaded, so that the target resource to be downloaded is judged not to be the resource to be downloaded in the updating process, and therefore, the target resource to be downloaded is not processed. The resources which need to be downloaded in the current update in the target resource package can be accurately judged through comparison of the description files, and redundant resources are prevented from being downloaded.
Step S120, sorting the resources to be downloaded according to the starting position of the resources to be downloaded in the queue to be downloaded in the target resource packet, so as to obtain a first resource queue.
In an example embodiment of the present disclosure, since the resources to be downloaded in the target resource package are arranged according to a certain order, after determining the queue to be downloaded, the resources to be downloaded may be ordered according to the arrangement order of the resources to be downloaded in the target resource package, so that sequential downloading may be performed in the target resource package.
Furthermore, when the resources to be downloaded in the target resource package are arranged in sequence from the back to the front according to the modification time, the latest updated resources to be downloaded can be placed at the forefront of the target resource package, so that the searching and downloading are facilitated.
Step S130, traversing the first resource queue, and merging adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain resource blocks so as to obtain a second resource queue.
In one example embodiment of the present disclosure, the starting location may be in the form of an offset, e.g., the offset of the resource D to be downloaded in the target resource packet may be 24; correspondingly, the size of the file may be the location of the offset occupied by the resource packet to be downloaded, for example, the size of the resource D to be downloaded may be 1214.
In an example embodiment of the present disclosure, traversing the first resource queue, merging adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain a resource block, as shown in fig. 4, may include the following steps S410 to S420:
step S410, calculating a termination position corresponding to the resource to be downloaded according to the size of the resource to be downloaded and the corresponding start position.
In an example embodiment of the present disclosure, the termination position of the resource to be downloaded may be calculated according to the size of the resource to be downloaded and the corresponding start position. For example, when the starting position and the size of the resource to be downloaded are characterized by the form of offset, the starting position and the size corresponding to the resource to be downloaded D are 24 and 1214, respectively, and the corresponding ending position of the resource to be downloaded D may be calculated to be 1237.
Step S420, merging the adjacent resources to be downloaded in the first resource queue based on the starting position and the ending position to obtain a resource block.
In an example embodiment of the present disclosure, merging adjacent resources to be downloaded in the first resource queue based on the start position and the end position to obtain a resource block, as shown in fig. 5, may include the following steps S510 to S530:
And step S510, judging whether two adjacent resources to be downloaded in the first resource queue are continuous or not based on the starting position and the ending position so as to obtain the relation between the two adjacent resources to be downloaded.
In an example embodiment of the present disclosure, a relationship between resources to be downloaded may be determined according to a start position and an end position of the resources to be downloaded. The relationship between the resources to be downloaded may be a continuous relationship or a disconnected relationship. For example, in the form of offset, the ending position corresponding to the resource D to be downloaded is 1237, and the starting position corresponding to the resource E to be downloaded is 1238, so that it may be determined that the resource D to be downloaded is continuous with the resource E to be downloaded; for another example, in the form of offset, the ending position corresponding to the resource F to be downloaded is 5516, and the starting position corresponding to the resource G to be downloaded is 5526, so that it can be determined that the resource D to be downloaded is disconnected from the resource to be downloaded.
It should be noted that, due to the reason of byte alignment, when performing continuity determination, a preset byte may be set, and if the difference between the ending position of the previous resource and the starting position of the next resource is within the preset byte, it may be determined that the two files are continuous.
Step S520, determining a plurality of adjacent resources to be downloaded with a continuous relationship in the first resource queue;
and step S530, combining the plurality of resources to be downloaded to obtain a resource block.
In an example embodiment of the present disclosure, there may be a plurality of consecutive resources to be downloaded in the first resource queue, so the plurality of consecutive resources to be downloaded may be determined according to a relationship between the resources to be downloaded, and then combined to obtain a resource block. Wherein the number of consecutive resources to be downloaded may be 2, 3, 4 or even more. For example, in the first resource queue, the resource to be downloaded D is continuous with the resource to be downloaded E, and the resource to be downloaded E is continuous with the resource to be downloaded H, and then the resource to be downloaded D, E, H is considered to be continuous, and may be combined to form one resource block.
It should be noted that, there may be multiple groups of adjacent resources to be downloaded with a continuous relationship in the first resource queue, and at this time, the multiple groups of adjacent resources to be downloaded may be combined respectively to form multiple resource blocks. For example, when it is determined that the resources D, E, H to be downloaded are continuous and it is also determined that the resources I, K to be downloaded are continuous, the resources D, E, H to be downloaded are combined into one resource block, and the resources I, K to be downloaded are combined into another resource block.
The implementation details of the technical solution of this exemplary embodiment will be described in detail below with reference to fig. 6 and 7, taking the MD5 value as an example of a description file:
in this exemplary embodiment, the format in the target resource packet may be as shown in fig. 7, where the header portion includes the resource name, the starting position, the size, and MD5 of the resources to be downloaded, and the resources to be downloaded are ordered from the back to the front according to the modification time.
Step S601, reading MD5 of a resource file in a local application;
step S602, the MD5 of each target resource to be downloaded in the target resource packet is read, and the list of resources to be downloaded corresponding to the target resource to be downloaded in the target resource packet is as follows:
('220742.skill','88d1d38497e1a4f6418203888731df39'),
('220743.skill','246f41a6397d4d3329be5ebf1f2f29f0'),
('220744.skil1','08c3d856f669799752e65b4ae4b46052'),
('220840.skil1','81b2e2f302d3626bfdf8cb09e5ba42af'),
('220850.skil1','f9fa3c3c74a21072f1da974bf71cac3e'),
('1002/20011.skil1','d346dc764c2110080685fe230099be73'),
('1010/20011.skil1','c27ale5d82a139db7209006319731f39'),
('220820.skill','329182576bbbc66987d00f2d54358d0e'),
('220821.skill','ffbd40d84a0c5f3626039178dcela3f8'),
('220830.skill','deffe54f0eec38e6a61417a1d03695e1'),
('220810.skil1','607bb7c965ebf6a3fbbc86caf9e9c9d4'),
('220811.skill','a624195aa693071a08efef02cb9923f5'),
('220790.skil1','18d549e81a310462c365cb6d4818e7fd'),
('220800.skil1','cbd0ecc84555f64ff41ca4af0f6c708b'),
('500320.skill','0c8cdaa365226e02019b98938840053d');
step S603, comparing the MD5 of the target resource with the corresponding MD5 in the local application;
step S604, when MD5 is the same, the target resource is not processed;
step S605, when MD5 is different, adding the target resource into the queue to be downloaded, and comparing the obtained resource list to be downloaded corresponding to the queue to be downloaded as follows:
('220850.skil1',4387,1129,'f9fa3c3c74a21072f1da974bf71cac3e'),
(220744.skil1',2422,1126,'08c3d856f669799752e65b4ae4b46052'),
('220742.skill',24,1214,88d1d38497e1a4f6418203888731df39'),
('1002/20011.skil1',5526,1134,'d346dc764c2110080685fe230099be73'),
(220840.skil1',3548,839,81b2e2f302d3626bfdf8cb09e5ba42af'),
('1010/20011.skilL',6660,1138,'c27ale5d82a139db7209006319731f39'),
('220743.skill',1238,1184,'246f41a6397d4d3329be5ebf1f2f29f0');
wherein, the 4 fields respectively represent the resource name, the starting position, the size and MD5 of the resource to be downloaded, for example, the resource name corresponding to the first resource to be downloaded in the list is "'220850.Skil1'", the starting position of the resource is "4387", the size of the resource is "1129", and MD5 of the resource is "'f9fa3c3c74a21072f1da974bf71cac3e'";
Step S606, the resources to be downloaded in the queue to be downloaded are ordered according to the sequence in the target resource package, and a first resource queue is obtained;
taking the resource to be downloaded as an example, a first resource queue can be obtained according to the sequence in the target resource packet, and the list of the resource to be downloaded corresponding to the first resource queue is as follows:
(220742.skil1',24,1214,88d1d38497e1a4f6418203888731df39'),
(220743.skill',1238,1184,'246f41a6397d4d3329be5ebf1f2f29f0'),
('220744.skill',2422,1126,'08c3d856f669799752e65b4ae4b46052'),
('220840.skil1',3548,839,81b2e2f302d3626bfdf8cb09e5ba42af'),
('220850.skil1',4387,1129,'f9fa3c3c74a21072f1da974bf71cac3e'),
('1002/20011.skill',5526,1134,'d346dc764c2110080685fe230099be73'),
('1010/20011.skill',6660,1138,'c27ale5d82a139db7209006319731f39');
step S607, judging the relation between the resources to be downloaded in the first resource queue;
step S608, determining a plurality of adjacent resources to be downloaded with continuous relation according to the relation among the resources to be downloaded;
step S609, combining the resources to be downloaded in the first resource queue to obtain resource blocks respectively, and forming a second resource queue;
taking the first resource queue as an example, the 1 st to 5 th resources to be downloaded may be combined into one resource block, and the 6 th and 7 th resources may be combined into one resource block, to obtain a second resource queue, where the resource block list corresponding to the second resource queue is as follows:
220742. Skill 1, 220743. Skill 1, 220744. Skill 1, 220840. Skill 1, 220850.Skill, starting position: 24, file block size: 5492,
1002/20011.Ski 1, 1010/20011.Ski, starting position: 5526 file block size: 2272.
In addition, there is also provided a resource package fabricating method in an exemplary embodiment of the present disclosure, referring to fig. 8, the resource package fabricating method including the steps S810 to S820 as follows:
step 810, reading the modification time of the resource to be updated, and sorting the resource to be updated according to the sequence from the back to the front of the modification time to obtain an update sequence.
In an example embodiment of the present disclosure, in order to facilitate downloading when making a target resource package, recently updated resources to be updated are continuously arranged in the target resource package, so that the resources to be updated are arranged in order from the back to the front according to the modification time. For example, the resources to be updated may be ordered according to the svn version numbers of the resources to be updated.
Step S820, packaging the resources to be updated according to the sequence of the update sequence to obtain a target resource package, so as to update the application corresponding to the target resource package according to the application resource update method.
In one example embodiment of the present disclosure, after ordering, the resource packages to be updated may be packaged according to the ordering to form the target resource package. For example, the update time corresponding to the resource A, B, C to be updated is 20×9, 6, 1, 20×9, 4, 2, and 20×9, 10, 1, respectively, so the resource to be updated is sorted into C, B, A, and then packaged to form the target resource package as shown in fig. 7.
It should be noted that, before the target resource package is manufactured, all the resources in the application development catalog need to be traversed, and the modified resources are used as the resources to be updated, so as to be used for manufacturing the subsequent target resource package.
It is noted that the above-described figures are merely schematic illustrations of processes involved in a method according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
In addition, in an exemplary embodiment of the present disclosure, an application resource updating apparatus is also provided. Referring to fig. 9, the application resource updating apparatus 900 includes: a resource processing module 910, a first ordering module 920, a resource combining module 930, and a resource downloading module 940.
The resource processing module 910 may be configured to read a target resource packet and obtain a queue to be downloaded corresponding to the target resource packet; the first sorting module 920 may be configured to sort the resources to be downloaded according to a starting position of the resources to be downloaded in the queue to be downloaded in the target resource packet, so as to obtain a first resource queue; the resource merging module 930 may be configured to traverse the first resource queue, and merge adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain a resource block, so as to obtain a second resource queue; the resource downloading module 940 may be configured to sequentially download, based on the second resource queue, the application corresponding to the target resource package to be updated.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the resources to be downloaded in the target resource package are arranged in order from the back to the front of the modification time.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the resource merging module 930 may be configured to calculate a termination position corresponding to the resource to be downloaded according to a size of the resource to be downloaded and the corresponding start position; and merging adjacent resources to be downloaded in the first resource queue based on the starting position and the ending position to obtain a resource block.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the resource merging module 930 may be configured to determine, based on the starting position and the ending position, whether two adjacent resources to be downloaded in the first resource queue are continuous, so as to obtain a relationship between the two adjacent resources to be downloaded; wherein the relationship comprises continuous and discontinuous; determining a plurality of adjacent resources to be downloaded with a continuous relationship in the first resource queue; and merging the plurality of resources to be downloaded to obtain a resource block.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the resource processing module 910 may be configured to read a first description file corresponding to a target resource to be downloaded in the target resource package, and simultaneously read a second description file corresponding to the target resource to be downloaded in a local application; and judging whether to add the target resource to be downloaded into a queue to be downloaded according to the first description file and the second description file.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the resource processing module 910 may be configured to add the target resource to be downloaded to a queue to be downloaded when the second description file is different from the first description file; and when the second description file is the same as the first description file, not processing the target resource to be downloaded.
In an exemplary embodiment of the present disclosure, a resource package manufacturing apparatus is also provided. Referring to fig. 10, the application resource updating apparatus 1000 includes: a second ranking module 1010 and a resource packaging module 1020.
The second sorting module 1010 may be configured to read a modification time of the resource to be updated, and sort the resource to be updated according to the order of the modification time from near to far to obtain an update sequence; the resource packaging module 1020 may be configured to package the resource to be updated according to the order of the update sequence to obtain a target resource package, so as to update an application corresponding to the target resource package according to the above-mentioned application resource update method.
Since each functional module of the application resource updating device and the resource package manufacturing device of the exemplary embodiment of the present disclosure corresponds to the steps of the foregoing exemplary embodiments of the application resource updating method and the resource package manufacturing method, for details not disclosed in the embodiments of the present disclosure, please refer to the foregoing embodiments of the application resource updating method and the resource package manufacturing method of the present disclosure.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, in the exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-mentioned application resource updating method and resource package manufacturing method is also provided.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 1100 according to such an embodiment of the present disclosure is described below with reference to fig. 11. The electronic device 1100 shown in fig. 11 is merely an example and should not be construed as limiting the functionality and scope of use of the disclosed embodiments.
As shown in fig. 11, the electronic device 1100 is embodied in the form of a general purpose computing device. Components of electronic device 1100 may include, but are not limited to: the at least one processing unit 1110, the at least one memory unit 1120, a bus 1130 connecting the different system components (including the memory unit 1120 and the processing unit 1110), and a display unit 1140.
Wherein the storage unit stores program code that is executable by the processing unit 1110 such that the processing unit 1110 performs steps according to various exemplary embodiments of the present disclosure described in the above-described "exemplary methods" section of the present specification. For example, the processing unit 1110 may perform step S110 as shown in fig. 1: reading a target resource package and obtaining a queue to be downloaded corresponding to the target resource package; s120: sequencing the resources to be downloaded according to the initial position of the resources to be downloaded in the target resource package in the queue to be downloaded so as to obtain a first resource queue; s130: traversing the first resource queue, and merging adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain resource blocks so as to obtain a second resource queue; s140: and downloading the application packets in sequence based on the second resource queue so as to update the application corresponding to the target resource packet.
As another example, the electronic device may implement the steps shown in fig. 2-6 and 8.
The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a Random Access Memory (RAM) 1121 and/or a cache memory 1122, and may further include a Read Only Memory (ROM) 1123.
Storage unit 1120 may also include a program/utility 1124 having a set (at least one) of program modules 1125, such program modules 1125 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus 1130 may be a local bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a bus using any of a variety of bus architectures.
The electronic device 1100 may also communicate with one or more external devices 1170 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1100, and/or any device (e.g., router, modem, etc.) that enables the electronic device 1100 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1150. Also, electronic device 1100 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 1160. As shown, network adapter 1160 communicates with other modules of electronic device 1100 via bus 1130. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 1100, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the present disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
Further, in an exemplary embodiment of the present disclosure, a program product for implementing the above method is provided, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described figures are only schematic illustrations of processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. An application resource updating method, comprising:
Reading a target resource package and obtaining a queue to be downloaded corresponding to the target resource package;
sequencing the resources to be downloaded according to the initial position of the resources to be downloaded in the target resource package in the queue to be downloaded so as to obtain a first resource queue;
traversing the first resource queue, and merging adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain resource blocks so as to obtain a second resource queue;
and downloading the application packets in sequence based on the second resource queue so as to update the application corresponding to the target resource packet.
2. The method of claim 1, wherein the resources to be downloaded in the target resource package are arranged in a sequence from back to front of modification time.
3. The method of claim 1, wherein traversing the first resource queue, merging adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain resource blocks, comprises:
calculating a termination position corresponding to the resource to be downloaded according to the size of the resource to be downloaded and the corresponding starting position;
And merging adjacent resources to be downloaded in the first resource queue based on the starting position and the ending position to obtain a resource block.
4. The method of claim 3, wherein the merging adjacent resources to be downloaded in the first resource queue based on the start position and the end position to obtain a resource block comprises:
judging whether two adjacent resources to be downloaded in the first resource queue are continuous or not based on the starting position and the ending position so as to obtain the relation between the two adjacent resources to be downloaded; wherein the relationship comprises continuous and discontinuous;
determining a plurality of adjacent resources to be downloaded with a continuous relationship in the first resource queue;
and merging the plurality of resources to be downloaded to obtain a resource block.
5. The method of claim 1, wherein the obtaining the queue to be downloaded corresponding to the target resource packet comprises:
reading a first description file corresponding to a target resource to be downloaded in the target resource package, and simultaneously reading a second description file corresponding to the target resource to be downloaded in a local application;
And judging whether to add the target resource to be downloaded into a queue to be downloaded according to the first description file and the second description file.
6. The method of claim 5, wherein the description file includes a message-digest value;
the step of judging whether to add the target resource to be downloaded to a queue to be downloaded according to the first description file and the second description file comprises the following steps:
when the second description file is different from the first description file, adding the target resource to be downloaded into a queue to be downloaded;
and when the second description file is the same as the first description file, not processing the target resource to be downloaded.
7. A method for making a resource package, comprising:
reading the modification time of the resources to be updated, and sequencing the resources to be updated according to the sequence from the back to the front of the modification time to obtain an update sequence;
and packaging the resources to be updated according to the sequence of the update sequence to obtain a target resource package, so that the target resource package updates the application corresponding to the target resource package according to the application resource update method of any one of claims 1 to 6.
8. An application resource updating apparatus, comprising:
the resource processing module is used for reading a target resource packet and acquiring a queue to be downloaded corresponding to the target resource packet;
the first ordering module is used for ordering the resources to be downloaded according to the initial position of the resources to be downloaded in the target resource package in the queue to be downloaded so as to obtain a first resource queue;
the resource merging module is used for traversing the first resource queue, merging adjacent resources to be downloaded in the first resource queue according to the starting position and the size of the resources to be downloaded to obtain resource blocks so as to obtain a second resource queue;
and the resource downloading module is used for downloading the target resource package according to the second resource queue in sequence so as to update the application corresponding to the target resource package.
9. A resource pack making apparatus, comprising:
the second ordering module is used for reading the modification time of the resources to be updated, and ordering the resources to be updated according to the sequence from near to far of the modification time to obtain an update sequence;
and the resource packaging module is used for packaging the resources to be updated according to the sequence of the updating sequence to obtain a target resource package so as to update the application corresponding to the target resource package according to the application resource updating method of any one of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements the application resource updating method according to any one of claims 1 to 6 or the resource package making method according to claim 7.
11. An electronic device, comprising:
a processor; and
a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the application resource updating method of any of claims 1 to 6 or the resource package making method of claim 7.
CN201911081574.5A 2019-11-07 2019-11-07 Application resource updating method, resource package manufacturing method, device, medium and equipment Active CN110968334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911081574.5A CN110968334B (en) 2019-11-07 2019-11-07 Application resource updating method, resource package manufacturing method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911081574.5A CN110968334B (en) 2019-11-07 2019-11-07 Application resource updating method, resource package manufacturing method, device, medium and equipment

Publications (2)

Publication Number Publication Date
CN110968334A CN110968334A (en) 2020-04-07
CN110968334B true CN110968334B (en) 2023-04-25

Family

ID=70030340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911081574.5A Active CN110968334B (en) 2019-11-07 2019-11-07 Application resource updating method, resource package manufacturing method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN110968334B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118075251A (en) * 2022-11-22 2024-05-24 华为技术有限公司 Method for downloading software package, electronic device and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542864A (en) * 2018-11-29 2019-03-29 广州创维平面显示科技有限公司 A kind of resource storage method, resource downloading method, system, equipment and medium
CN110247985A (en) * 2019-06-28 2019-09-17 北京奇艺世纪科技有限公司 A kind of resource downloading method, device, electronic equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9304816B2 (en) * 2013-08-05 2016-04-05 International Business Machines Corporation Multiple stage workload management system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542864A (en) * 2018-11-29 2019-03-29 广州创维平面显示科技有限公司 A kind of resource storage method, resource downloading method, system, equipment and medium
CN110247985A (en) * 2019-06-28 2019-09-17 北京奇艺世纪科技有限公司 A kind of resource downloading method, device, electronic equipment and medium

Also Published As

Publication number Publication date
CN110968334A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
CN110609872B (en) Method and apparatus for synchronizing node data
CN110391938B (en) Method and apparatus for deploying services
CN110960855B (en) Communication protocol code updating method and device, electronic equipment and storage medium
CN112395253B (en) Index file generation method, terminal device, electronic device and medium
CN114785685B (en) Software differential upgrading method and device, electronic equipment and readable storage medium
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN115757400B (en) Data table processing method, device, electronic equipment and computer readable medium
CN111309747A (en) Data synchronization method, system and device
CN113254105B (en) Resource processing method and device, storage medium and electronic equipment
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN110795446A (en) List updating method and device, readable medium and electronic equipment
CN110619100A (en) Method and apparatus for acquiring data
CN114035879A (en) Page theme color changing method and device, electronic equipment and computer readable medium
CN110618768B (en) Information presentation method and device
CN110968334B (en) Application resource updating method, resource package manufacturing method, device, medium and equipment
CN111628913B (en) Online time length determining method and device, readable medium and electronic equipment
US9465876B2 (en) Managing content available for content prediction
CN112905090A (en) Spreadsheet processing method, device, terminal and storage medium
CN110716699A (en) Method and apparatus for writing data
CN111240657A (en) Method and device for generating SDK and electronic equipment
CN111314457B (en) Method and device for setting virtual private cloud
CN114253520B (en) Interface code generation method and device
CN114968621B (en) Data communication method, device, equipment, storage medium and system
US20240152504A1 (en) Data interaction method, apparatus, and electronic device
CN115221178B (en) Data table binding method, device, electronic equipment and computer readable 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