Picture resource incremental updating method and device, equipment and storage medium
Through the incremental update method, the incremental subpacket is used to determine the incremental subpacket to update the application, which solves the problem of high operating pressure on the device and realizes more efficient image resource management and update.
Patent Information
- Application Number
- CN202510356102.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-07-11
AI Technical Summary
In the prior art, the entire image resource package needs to be updated every time the application version is updated, resulting in high pressure on the device to run.
The incremental update method is adopted to determine the incremental subpacket by receiving the image subpacket identification information sent by the server, and update the application with incremental subpackets, reduce the size of the downloaded data packet, reduce the operating pressure of the device, and store the image resources into multiple subpackets for modular management.
It reduces the computing resources required for image resource updates, reduces the operating pressure of equipment, simplifies data management and maintenance, and reduces the processing cost of incremental updates.
Smart Images

Figure CN120295661A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to an incremental update method, device, equipment, and storage medium for picture resources. Background Art
[0002] When installing an application on a terminal device, it is necessary to download the installation package of the application from a server.
[0003] In the related art, during the compilation stage of an application, the running code of the application and the picture resources required by the application are respectively packaged, and the code resource package and the picture resource package are uploaded to the server. Then, the terminal device loads the code resource package and the picture resource package of the application to realize the running of the application. When the version of the application is updated, some picture resources in the picture resource package on the server may also be updated. Users need to download the updated picture resource package from the server and load and use the updated picture resource package.
[0004] However, when updating the version of the application each time by the above method, it is necessary to update the entire picture resource package, resulting in a relatively large operating pressure on the device. Summary of the Invention
[0005] Embodiments of this application provide an incremental update method, device, equipment, and storage medium for picture resources. The technical solutions provided by the embodiments of this application are as follows:
[0006] According to one aspect of the embodiments of this application, an incremental update method for picture resources is provided. The method includes:
[0007] Sending an application update request to a server, where the application update request is used to request an update to a first application in a first terminal device. The application update request includes first version information, and the first version information is used to indicate that the first application in the first terminal device is a first version. Multiple versions of picture resource packages of the first application are stored in the server, and each picture resource package includes at least one picture sub-package, and each picture sub-package includes at least one picture resource;
[0008] When a picture resource package of a second version of the first application is stored in the server, receiving identification information of at least one picture sub-package of the second version sent by the server, where the second version is the latest version of the first application;
[0009] Obtain the incremental sub - package of the second version based on the identification information of at least one picture sub - package of the second version and the identification information of at least one picture sub - package of the first version. The second version is the latest version of the first application, and the incremental sub - package of the second version is the picture sub - package of the second version that is missing when the first application is updated from the first version to the second version;
[0010] Perform an update process on the first application according to the incremental sub - package of the second version.
[0011] According to one aspect of the embodiments of the present application, there is provided a method for incremental update of picture resources. The method is executed by a server, and the server stores picture resource packages of multiple versions of the first application. The picture resource package includes at least one picture sub - package, and each picture sub - package includes at least one picture resource. The method includes:
[0012] Receive an application update request sent by a first terminal device. The application update request is used to request an update of the first application in the first terminal device. The application update request includes first version information, and the first version information is used to indicate that the first application in the first terminal device is the first version;
[0013] When the server stores the picture resource package of the second version of the first application, send the identification information of at least one picture sub - package of the second version to the first terminal device. The second version is the latest version of the first application.
[0014] According to one aspect of the embodiments of the present application, there is provided an apparatus for incremental update of picture resources. The apparatus includes:
[0015] A request - sending module, configured to send an application update request to a server. The application update request is used to request an update of the first application in the first terminal device. The application update request includes first version information, and the first version information is used to indicate that the first application in the first terminal device is the first version. The server stores picture resource packages of multiple versions of the first application. The picture resource package includes at least one picture sub - package, and each picture sub - package includes at least one picture resource;
[0016] An information - receiving module, configured to receive the identification information of at least one picture sub - package of the second version sent by the server when the server stores the picture resource package of the second version of the first application. The second version is the latest version of the first application;
[0017] An increment determination module, configured to obtain an incremental subpackage of the second version according to identification information of at least one picture subpackage of the second version and identification information of at least one picture subpackage of the first version, where the incremental subpackage of the second version is the picture subpackage of the second version that the first application lacks when being updated from the first version to the second version;
[0018] An update processing module, configured to perform an update process on the first application according to the incremental subpackage of the second version.
[0019] According to one aspect of the embodiments of the present application, there is provided an incremental update device for picture resources, where the device includes:
[0020] A request receiving module, configured to receive an application update request sent by a first terminal device, where the application update request is used to request an update to a first application in the first terminal device, and the application update request includes first version information, where the first version information is used to indicate that the first application in the first terminal device is the first version;
[0021] An information sending module, configured to send identification information of at least one picture subpackage of the second version to the first terminal device when a picture resource package of the second version of the first application is stored in the server, where the second version is the latest version of the first application.
[0022] According to one aspect of the embodiments of the present application, there is provided a computer device, where the computer device includes a processor and a memory, and a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above-mentioned incremental update method for picture resources.
[0023] According to one aspect of the embodiments of the present application, there is provided a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the above-mentioned incremental update method for picture resources.
[0024] According to one aspect of the embodiments of the present application, there is provided a computer program product, where the computer program product includes a computer program, and the computer program is loaded and executed by a processor to implement the above-mentioned incremental update method for picture resources.
[0025] The technical solutions provided by the embodiments of the present application can bring the following beneficial effects:
[0026] By receiving the identification information of at least one picture sub - packet of the second version sent by the server, the incremental sub - packet of the second version is determined, and the first application is updated with the incremental sub - packet of the second version. Compared with the method of updating the application with the entire picture resource packet in the related art, in this application, by adopting the method of updating the picture resources of the application with the incremental sub - packet, the size of the data packet that needs to be downloaded when the first terminal device updates the picture resources can be reduced. Thus, the computing resources required for the picture resource update are reduced, the operating pressure of the first terminal device for the picture resource update is lowered, and the picture resources are stored as multiple picture sub - packets, making the management of the picture resources more modular. Each picture sub - packet can be updated and maintained independently. Therefore, when performing incremental update, it is not necessary to check all the picture resources in the picture resource packet, and only the update status of each picture sub - packet needs to be checked, avoiding unnecessary resource consumption, simplifying data management and maintenance, and reducing the processing cost of incremental update. Brief Description of the Drawings
[0027] Figure 1 is a schematic diagram of the implementation environment of the solution provided by an embodiment of this application;
[0028] Figure 2 is a flowchart of the method for managing picture resources executed by the second terminal device provided by an embodiment of this application;
[0029] Figure 3 is a flowchart of the implementation of recompiling the picture resource packet provided by an embodiment of this application;
[0030] Figure 4 is a flowchart of the method for incremental update of picture resources executed by the first terminal device provided by an embodiment of this application;
[0031] Figure 5 is a flowchart of the method for incremental update of picture resources executed by the server provided by an embodiment of this application;
[0032] Figure 6 is a flowchart of the incremental update of picture resources provided by an embodiment of this application;
[0033] Figure 7 is a block diagram of the device for incremental update of picture resources provided by an embodiment of this application;
[0034] Figure 8 is a block diagram of the device for incremental update of picture resources provided by an embodiment of this application;
[0035] Figure 9 is a block diagram of the structure of the computer device provided by an embodiment of this application. Detailed Embodiments
[0036] To make the objectives, technical solutions, and advantages of this application more clear, the following will further describe the embodiments of this application in detail with reference to the accompanying drawings.
[0037] Please refer to Figure 1 , which shows a schematic diagram of the solution implementation environment provided by an embodiment of this application. This solution implementation environment can be implemented as an incremental update system for picture resources. This solution implementation environment may include: a first terminal device 10, a second terminal device 20, and a server 30.
[0038] The number of the first terminal devices 10 can be one or more. The first terminal device 10 can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a game console, an e-book reader, a multimedia playback device, a wearable device, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, etc. A client of a first application program can be installed in the first terminal device 10. Regarding the type of the first application program, this application does not make any limitation, including but not limited to social application programs, music application programs, game application programs, video application programs, etc. Optionally, the first application program can be an application program that needs to be downloaded and installed, or an application program that can be used immediately upon clicking. This application does not make any limitation thereto.
[0039] The number of the second terminal devices 20 is one. A client of a second application program can be installed in the second terminal device 20. The second application program is an application program with program compilation function. Exemplarily, a user can compile different versions of the first application program in the second application program.
[0040] The server 30 is used to provide background services for the client of the target application program installed and running in the first terminal device 10. For example, the server 30 can be the background server of the above target application program. The server 30 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited thereto. Optionally, the server 30 provides background services for the application programs in multiple first terminal devices 10 at the same time. The first terminal device 10 and the server 30 can communicate with each other through a network.
[0041] In an embodiment of the present application, during the process of compiling each version of the first application in the second application installed and run on the second terminal device, at least one picture resource required for the operation of each version of the first application is respectively packaged into picture resource packages for each version of the first application according to the picture packaging rules. The picture packaging rules are used to allocate at least one picture resource required for the operation of the first application to at least one picture sub-package, and to package at least one picture sub-package into a picture resource package.
[0042] The second terminal device sends the picture resource packages of multiple versions of the first application, the version information of the picture resource packages of each version of the first application, and the identification information of at least one picture sub-package in the picture resource packages of each version of the first application to the server for storage. Thus, the server stores the picture resource packages of multiple versions of the first application, each picture resource package includes at least one picture sub-package, and each picture sub-package includes at least one picture resource.
[0043] The first terminal device sends an application update request to the server. The application update request is used to request an update of the first application in the first terminal device. The application update request includes first version information, and the first version information is used to indicate that the first application in the first terminal device is the first version. The server receives the application update request sent by the first terminal device, and when the server stores the picture resource package of the second version of the first application, it sends the identification information of at least one picture sub-package of the second version to the first terminal device. The second version is the latest version of the first application. After receiving the identification information of at least one picture sub-package of the second version, the first terminal device obtains the incremental sub-package of the second version according to the identification information of at least one picture sub-package of the second version and the identification information of at least one picture sub-package of the first version. The incremental sub-package of the second version is the picture sub-package of the second version that the first application lacks when being updated from the first version to the second version. The first terminal device receives the incremental sub-package of the second version sent by the server and performs an update process on the first application according to the incremental sub-package of the second version.
[0044] Please refer to Figure 2 , which shows a flowchart of a method for managing picture resources provided by an embodiment of the present application. The execution subject of each step of this method can be the second terminal device. This method may include at least one of the following steps 210 to 230:
[0045] Step 210, establish a picture management project, which is used to compile the picture resource packages of each version of the first application.
[0046] In the client of the second application in the second terminal device, a host project and an image management project are established. The host project is used to compile the code resource packages of each version of the first application, and the image management project is used to compile the image resource packages of each version of the first application. That is, when compiling a version of the first application, the code resources and image resources of this version of the first application are respectively compiled and packaged to obtain the code resource package and image resource package of this version of the first application. When other terminal devices install the first application or update the first application, they need to download the code resource package and image resource package of the first application to achieve the loading of the first application. This application is a solution for incremental update of the image resources of the first application. Regarding the updated part of the code resources of the first application, this application is not involved for the time being. It can also be understood that this application does not limit the update method of the code resources of the first application.
[0047] Each version of the first application includes the first version of the first application and the modified version obtained by modifying the first version of the first application. Among the versions of the first application, the latter version is the version obtained by modifying the previous version. For example, if the versions of the first application include the first version, the second version, and the third version, then the first version is the version obtained by initial compilation of the first application, the second version is the version obtained by modifying on the basis of the first version of the first application, and the third version is the version obtained by modifying on the basis of the second version of the first application.
[0048] Step 220: Using the image management project, at least one image resource required for the operation of each version of the first application is respectively packaged into the image resource packages of each version of the first application according to the image packaging rules.
[0049] The image packaging rules are used to allocate at least one image resource required for the operation of the first application into at least one image sub-package, and to package at least one image sub-package into an image resource package.
[0050] Using the image management project, at least one image sub-package is created. The image sub-package is used to store at least one image resource. The image resource refers to the image resource corresponding to each display screen when the first application runs and displays each display screen on the terminal device. One image resource is used to display one display screen of the first application. When the first application runs on the terminal device and needs to display at least one display screen, the operation of the first application on the terminal device requires at least one image resource.
[0051] In some embodiments, at least one picture resource required for the operation of the first application is divided according to at least one business function of the first application to obtain at least one picture sub-package.
[0052] At least one business function of the first application is related to the program type of the first application. For example, if the program type of the first application is a social application, then at least one business function of the first application is at least one business function of the social application. Exemplarily, at least one business function of the first application may include at least one of business functions such as social chat function, video call function, voice call function, picture sharing function, file sharing function, etc. If the program type of the first application is a game application, then at least one business function of the first application is at least one business function of the game application. Exemplarily, at least one business function of the first application may include at least one of business functions such as game play function, social chat function, voice call function, commodity trading function, character dressing function, etc.
[0053] At least one picture resource required for the operation of the first application is allocated to at least one picture sub-package according to the business function to which the at least one picture resource respectively belongs. The storage capacity of each picture sub-package is not limited.
[0054] Each picture sub-package corresponds to one business function of the first application, and the picture resources in each picture sub-package are used to implement the display of the picture of one business function of the first application corresponding to the picture sub-package on the terminal device. Exemplarily, picture sub-package 1 corresponds to business function 1 of the first application. If picture sub-package 1 includes picture resource 1, picture resource 2, and picture resource 3, then picture resource 1, picture resource 2, and picture resource 3 are used to implement 3 display pictures of business function 1 on the terminal device.
[0055] By dividing at least one picture resource required for the operation of the first application according to at least one business function of the first application, the picture sub-packages where the picture resources of the same business function are located are the same, the position of the picture resources will not be easily changed, and it is not restricted by the storage capacity of the picture sub-packages, which is convenient for subsequent replacement of the picture resources of the corresponding picture sub-packages according to the adjustment of the business function.
[0056] In some embodiments, at least one picture resource required for the operation of the first application is divided according to the storage capacity of the picture sub-package to obtain at least one picture sub-package.
[0057] When the picture management project creates at least one picture sub-package and limits the storage capacity of each picture sub-package, at least one picture resource required for the operation of the first application is sequentially allocated to at least one picture sub-package according to the storage capacity of the picture sub-package. Optionally, the storage capacity of each picture sub-package can be the same or different, and the storage capacity required for each picture resource can be the same or different. Therefore, the number of picture sub-packages depends on the storage capacity of each picture sub-package, the storage capacity required for each picture resource, and the number of picture resources.
[0058] For example, if the operation of the first application requires picture resource 1, picture resource 2, picture resource 3, picture resource 4, and picture resource 5, and picture resource 1 and picture resource 2 are allocated to picture sub-package 1, and allocating picture resource 3 to picture sub-package 1 will exceed the storage capacity of picture sub-package 1, then picture resource 3 is allocated to picture sub-package 2. If allocating picture resource 4 to picture sub-package 2 will exceed the storage capacity of picture sub-package 2, then picture resource 4 is allocated to picture sub-package 3. If allocating picture resource 5 to picture sub-package 3 will not exceed the storage capacity of picture sub-package 3, then picture resource 3 is allocated to picture sub-package 3. Therefore, the picture resources required for the operation of the first application can be divided into picture sub-package 1, picture sub-package 2, and picture sub-package 3. Picture sub-package 1 includes picture resource 1 and picture resource 2, picture sub-package 2 includes picture resource 3, and picture sub-package 3 includes picture resource 4 and picture resource 5.
[0059] By dividing at least one picture resource required for the operation of the first application according to the storage capacity of the picture sub-package, it is possible to randomly divide each picture resource, reducing the division difficulty, reducing the computing resources required for the device to divide the picture sub-package, and improving the division speed.
[0060] After obtaining at least one picture sub-package according to the above picture division method, at least one picture sub-package is packaged into a picture resource package. Exemplarily, the gradle script is used to package at least one picture sub-package into a picture resource package. The gradle script defines a set of picture packaging rules and can implement the packaging method of packaging at least one picture sub-package into a picture resource package.
[0061] Step 230, send the picture resource packages of each version of the first application to the server.
[0062] After a version of the picture resource package is compiled in the second terminal device, the version of the picture resource package is sent to the server. Each picture resource package is configured with a hash value, and the hash value of each picture resource package is also sent to the server.
[0063] Allocate and package at least one picture resource required for the operation of the first application according to the above picture packaging rules, and send the at least one picture resource to the picture sub-package, so that when updating the picture resource package subsequently, one or more picture sub-packages can be selected, avoiding updating the entire picture resource package, reducing the computing resources required for subsequent picture resource updates, and reducing the operating pressure of the terminal device for picture resource updates.
[0064] In some embodiments, each version of the first application can be packaged separately to obtain a picture resource package corresponding to each version, and the picture resource packages of each version of the first application are uploaded to the picture resource platform. The picture resource platform generates version information of the picture resource packages of each version of the first application and identification information of at least one picture sub-package in the picture resource packages of each version of the first application according to the picture resource packages of each version of the first application.
[0065] The version information of the picture resource package includes the hash value of the picture resource package. Each picture resource package corresponds to a hash value, and the hash value of the picture resource package of each version is used to determine whether the picture resource package of this version has been updated compared with the picture resource package of the previous version. Exemplarily, the version information of the picture resource package of the first version includes the hash value of the picture resource package of the first version, and the hash value of the picture resource package of the first version is hash value 1. When the first application compiles the second version, the version information of the picture resource package of the second version is obtained. The version information of the picture resource package of the second version includes the hash value of the picture resource package of the second version, and the hash value of the picture resource package of the second version is hash value 2. If hash value 1 and hash value 2 are the same, it means that the picture resource package has not been updated when the first application compiles the second version, and the picture resource package of the second version is the same as the picture resource package of the first version. If hash value 1 and hash value 2 are different, it means that the picture resource package has been updated when the first application compiles the second version, and the picture resource package of the second version is different from the picture resource package of the first version.
[0066] The identification information of the picture sub-package includes the hash value of the picture sub-package and the address information of the picture sub-package. The hash value of the picture sub-package is used to determine whether the picture sub-package of this version has been updated compared with the picture sub-package of the previous version. The address information of the picture sub-package refers to the storage address of the picture sub-package in the cloud server, which is used to download the picture sub-package through the address information of the picture sub-package. Exemplarily, the address information of the picture sub-package can be the url (uniform resource locator) address of the picture sub-package.
[0067] In step 230, while the second terminal device sends the picture resource packages of each version of the first application to the server, it also sends the version information of the picture resource packages of each version of the first application and the identification information of at least one picture sub-package in the picture resource packages of each version of the first application to the server.
[0068] In some embodiments, at least one picture resource in each picture sub-package is respectively configured with corresponding index information, and the index information includes file information and picture information. The file information refers to the name information of the picture sub-package where the picture resource is located. The picture information includes at least one of the following: the name information of the picture resource, the indication information of the picture sub-package where the picture resource is located, the hash value of the picture resource, and the resolution of the picture resource. The hash value of the picture resource is used to determine the picture resource that has changed among at least one picture resource required for the operation of the original version of the first application during the process of recompiling the latest version of the first application.
[0069] When allocating and packaging at least one picture resource required for the operation of the first application, the index information of each picture resource is recorded, and the index information of each picture resource includes file information and picture information. The index information of each picture resource is the identification information exclusive to that picture resource, and in the case where the picture resource has not changed, the index information of the picture resource will not change either. For example, when the first application is compiled into the next version, if the picture resource has not changed, the index information of the picture resource will not change either; if the picture resource has changed, the index information of the picture resource will change accordingly.
[0070] The file information refers to the name information of the picture sub-package where the picture resource is located, and the name information of at least one picture sub-package is different from each other. The picture information includes at least one of the following: the name information of the picture resource, the indication information of the picture sub-package where the picture resource is located, the hash value of the picture resource, and the resolution of the picture resource. The name information of the picture resource is not limited, and it can be different from each other, or there can be multiple picture resources with the same name information. The indication information of the picture sub-package where the picture resource is located is used to indicate the picture sub-package where the picture resource is located. For example, the indication information of the picture sub-package where the picture resource is located can be the name information of the picture sub-package where the picture resource is located, or the position information of the picture sub-package where the picture resource is located in at least one picture sub-package, and so on. The hash value of the picture resource is used to determine whether the picture resource has changed during the process of recompiling the latest version of the first application, so that the picture resources that have changed can be determined according to the hash values respectively corresponding to at least one picture resource during the process of recompiling the latest version of the first application.
[0071] The resolution of the picture resource is used to indicate the resolution that needs to be configured when the picture resource is displayed as a display screen on the terminal device. Optionally, the resolution of the picture resource can be used to indicate a default resolution. When the picture resource is displayed on different terminal devices, the display screen corresponding to the picture resource will be displayed according to the default resolution. Optionally, the resolution of the picture resource can be used to indicate multiple resolutions, and the multiple resolutions are used to match the screen densities of different terminal devices. When the picture resource is displayed on different terminal devices, the device model of the terminal device will be determined according to the device model of the terminal device, and then the resolution matching the screen density will be selected to display the display screen corresponding to the picture resource, so as to improve the display effect of the device screen.
[0072] By configuring each picture resource with corresponding index information, each picture resource can be represented according to the index information, which is convenient for finding the picture resources that need to be changed when compiling the latest version of the first application later, and improves the compilation efficiency.
[0073] In some embodiments, when generating the picture resource package, a manifest file of the picture resource package will be generated. The manifest file of the picture resource package is stored in the second terminal device and will not be sent to the server. The manifest file of the picture resource package is used to record the indication information of the picture subpackage where each picture resource is located and the hash value of each picture resource, so that the picture resources that have changed during the process of recompiling the latest version of the first application can be determined according to the manifest file of the picture resource package, and the picture subpackage where the changed picture resources are located can be determined.
[0074] In some embodiments, the second terminal device is further configured to perform at least one of the following operations during the process of recompiling the latest version of the first application: replace the changed picture resource in at least one picture resource required for the operation of the original version of the first application; add incremental picture resources to at least one original picture subpackage corresponding to the original version of the first application; allocate the incremental picture resources to the newly created picture subpackage of the latest version.
[0075] Determine the image resources that have changed among the at least one image resources required for the operation of the original version of the first application based on the hash values corresponding to the at least one image resources required for the operation of the original version of the first application and the hash values corresponding to the at least one image resources required for the operation of the latest version of the first application. Replace the corresponding image resources in the at least one image resources required for the operation of the original version of the first application with the image resources whose hash values have changed among the at least one image resources required for the operation of the latest version of the first application. Exemplarily, if the hash value of image resource 1 in the original version of the first application is different from the hash value of image resource 1 in the latest version of the first application, then replace image resource 1 in the original version of the first application with image resource 1 in the latest version of the first application.
[0076] In the case of replacing the changed image resources among the at least one image resources required for the operation of the original version of the first application, update the index information of the changed image resources and the identification information of the image subpackage where the changed image resources are located.
[0077] Incremental image resources refer to the image resources that do not exist in the at least one image resources required for the operation of the original version of the first application among the at least one image resources required for the operation of the latest version of the first application. Exemplarily, if the at least one image resources required for the operation of the original version of the first application include image resource 1 and image resource 2, and the at least one image resources required for the operation of the latest version of the first application include image resource 1, image resource 2, and image resource 3, then image resource 3 is an incremental image resource.
[0078] In the case where the at least one image resources required for the operation of the latest version of the first application include incremental image resources, perform at least one of the following operations: add the incremental image resources to at least one original image subpackage corresponding to the original version of the first application; allocate the incremental image resources to newly created image subpackages of the latest version.
[0079] In the case where at least one image subpackage is divided based on at least one business function of the first application, the incremental image resources can be added to the image subpackage to which the business function of the incremental image resources belongs, or a new image subpackage can be created and the incremental image resources can be allocated to the newly created image subpackages of the latest version.
[0080] In the case where at least one image subpackage is based on the storage capacity of the image subpackage, a new image subpackage can be created and the incremental image resources can be allocated to the newly created image subpackages of the latest version.
[0081] When adding incremental image resources to at least one original image sub-package corresponding to the original version of the first application, index information of the incremental image resources is generated, and the identification information of the image sub-package to which the incremental image resources are added is updated. When allocating the incremental image resources to a newly created image sub-package of the latest version, the identification information of the newly created image sub-package of the latest version is generated.
[0082] By replacing the changed image resources during the recompilation of the latest version of the first application, or adding incremental image resources to the image sub-package of the original version, or adding incremental image resources to the newly created image sub-package, the modification to the original image sub-package and the original image resources is minimized as much as possible, thereby reducing the computing resources required for the second terminal device to recompile the latest version of the first application and improving the compilation efficiency.
[0083] The implementation flowchart of the recompilation of the image resource package can be referred to Figure 3 As shown, when generating the image resource package of the original version of the first application, the image resources have been divided into at least one image sub-package, and the index information of each image resource is recorded at the same time. During the process of recompiling the latest version of the first application, according to the hash value of each image resource, it is judged whether each image resource of the original version has changed, and then the changed image resources in the image sub-package are replaced. When there are incremental image resources in the latest version, the incremental image resources are added to the image sub-package of the original version, or the incremental image resources are allocated to a newly created image sub-package. Thus, the manifest file of the image resource package of the latest version and the image resource package of the latest version are generated.
[0084] Please refer to Figure 4 , which shows the flowchart of the incremental update method of the image resources provided by an embodiment of the present application. The execution subject of each step of this method can be the first terminal device. This method may include at least one of the following steps 410 to 440:
[0085] Step 410, sending an application update request to the server. The application update request is used to request an update to the first application in the first terminal device. The application update request includes first version information, and the first version information is used to indicate that the first application in the first terminal device is the first version.
[0086] The server stores image resource packages of multiple versions of the first application. The image resource package includes at least one image sub-package, and each image sub-package includes at least one image resource.
[0087] Optionally, in response to a start operation for the first application, an application update request is sent to the server. That is, each time the first application is started by the user, the client of the first application sends an application update request to the server. In this case, the latest version of the first application may not exist in the server. After receiving the application update request, the server determines whether there is a latest version of the first application. If the latest version of the first application exists in the server, incremental update of the picture resources of the first application is implemented. If the latest version of the first application does not exist in the server, the first application is not updated.
[0088] Optionally, if the latest version of the first application exists in the server, the server actively sends an update notification to the first terminal device. In response to a trigger operation for the update notification, an application update request is sent to the server. Exemplarily, when the first application is in the open state, an update notification is displayed in the display interface of the first application. Alternatively, in the system notification of the first terminal device, an update notification of the first application is displayed. In this case, incremental update of the picture resources of the first application can be implemented.
[0089] The first version can be any version of the first application, which is not limited in this application. For example, the first version can be version 1.0 of the first application.
[0090] In some embodiments, the first version information includes a first hash value, which refers to the hash value of the picture resource package of the first version.
[0091] Step 420, when the picture resource package of the second version of the first application is stored in the server, receive the identification information of at least one picture sub-package of the second version, where the second version is the latest version of the first application.
[0092] The server determines whether the picture resource package of the second version of the first application is stored in the server according to the first version information in the application update request sent by the first terminal device. If the picture resource package of the second version of the first application is stored in the server, the server sends the identification information of at least one picture sub-package of the second version to the first terminal device. The first terminal device receives the identification information of at least one picture sub-package of the second version sent by the server.
[0093] The second version is the version recompiled after the first version is compiled, and the second version is the latest version of the first application. For example, if the server stores picture resource packages of version 1.0, version 2.0, and version 3.0 of the first application, and the order of the compilation times of each picture resource package closest to the current time is the picture resource package of version 3.0, the picture resource package of version 2.0, and the picture resource package of version 1.0 in sequence, then the second version refers to version 3.0.
[0094] At least one picture sub-package in the picture resource package of the second version is respectively configured with corresponding identification information, and the identification information of each picture sub-package is used to indicate that picture sub-package.
[0095] In some embodiments, the first version information includes a first hash value, and the server stores a second hash value. The first hash value refers to the hash value of the picture resource package of the first version, and the second hash value refers to the hash value of the picture resource package of the second version. Step 420 includes sub-step 421.
[0096] Sub-step 421, in the case where the first hash value is different from the second hash value, receive the identification information of at least one picture sub-package of the second version sent by the server.
[0097] Exemplarily, if the server stores picture resource packages of version 1.0, version 2.0, and version 3.0 of the first application, the second version refers to version 3.0, and the second hash value refers to the hash value of the picture resource package of version 3.0, then in the case where the first version is version 1.0 or version 2.0, the first hash value is different from the second hash value, and the server sends the identification information of at least one picture sub-package of version 3.0 to the first terminal device. In the case where the first version is version 3.0, the first hash value is the same as the second hash value, and the server does not send any information to the first terminal device.
[0098] By judging whether there is the latest version of the first application recompiled in the server according to the hash value, the judging method is relatively simple and fast, and the accuracy of the judging method according to the hash value is relatively high. It can not only shorten the response time of the application update request, but also ensure the correctness of the server's strategy.
[0099] Step 430, according to the identification information of at least one picture sub-package of the second version and the identification information of at least one picture sub-package of the first version, obtain the incremental sub-package of the second version. The incremental sub-package of the second version is the picture sub-package of the second version that the first application lacks when updating from the first version to the second version.
[0100] The first terminal device stores the identification information of at least one picture sub - packet of the first version. After receiving the identification information of at least one picture sub - packet of the second version, the incremental sub - packets of the second version are obtained according to the differences between the identification information.
[0101] In some embodiments, the incremental sub - packets of the second version include at least one of the following: the picture sub - packets that have been updated in at least one picture sub - packet, the newly added picture sub - packets in the picture resource packet of the second version.
[0102] The picture sub - packets that have been updated in at least one picture sub - packet can be the picture sub - packets of the second version obtained by the second terminal device replacing the changed picture resources among at least one picture resource required for the operation of the original version of the first application during the recompilation of the second version of the first application, or can be the picture sub - packets of the second version obtained by the second terminal device adding incremental picture resources to at least one original picture sub - packet corresponding to the original version of the first application during the recompilation of the second version of the first application. The newly added picture sub - packets in the picture resource packet of the second version are the picture sub - packets of the second version obtained by the second terminal device allocating the incremental picture resources to the newly created picture sub - packets of the second version during the recompilation of the second version of the first application.
[0103] The recompilation of each version of the first application in the second terminal device is based on the recompilation of the previous version. Therefore, the original version of the first application mentioned above is the previous version of the second version. The first version can be the previous version of the second version or several previous versions of the second version. Exemplarily, if the second version is version 3.0, the first version can be version 1.0 or version 2.0.
[0104] Exemplarily, if the picture resource 1 in the picture sub - packet 1 of the original version has been replaced, the obtained picture sub - packet 1 of the second version is the incremental sub - packet of the second version. If incremental picture resources have been added to the picture sub - packet 2 of the original version, the obtained picture sub - packet 2 of the second version is the incremental sub - packet of the second version. If the picture sub - packet 3 does not exist in the original version and the picture sub - packet 3 of the second version exists in at least one picture sub - packet of the second version, the picture sub - packet 3 of the second version is the incremental sub - packet of the second version. The picture sub - packet 1, picture sub - packet 2, and picture sub - packet 3 of the second version are the picture sub - packets of the second version that the first application lacks when updated from the first version to the second version.
[0105] In some embodiments, the identification information of the picture sub - packet includes the hash value of the picture sub - packet and the address information of the picture sub - packet. Step 430 includes at least one of sub - steps 431 to 432.
[0106] Sub-step 431: Determine the incremental sub-packages in at least one picture sub-package of the second version based on the hash values of at least one picture sub-package of the second version and the hash values of at least one picture sub-package of the first version.
[0107] Compare the hash values of at least one picture sub-package of the second version and the hash values of at least one picture sub-package of the first version in sequence. When the hash value of a picture sub-package in the second version is different from the hash value of the corresponding picture sub-package in the first version, determine that the picture sub-package corresponding to this hash value in the second version belongs to the updated picture sub-packages in at least one picture sub-package of the second version, that is, belongs to the incremental sub-packages of the second version. When the hash value of a picture sub-package in the second version is the same as the hash value of the corresponding picture sub-package in the first version, determine that the picture sub-package corresponding to this hash value in the second version does not belong to the incremental sub-packages of the second version.
[0108] When there is no hash value of the corresponding picture sub-package in the first version for the hash value of a picture sub-package in the second version, determine that the picture sub-package corresponding to this hash value in the second version belongs to the newly added picture sub-packages in the picture resource package of the second version, that is, belongs to the incremental sub-packages of the second version.
[0109] Sub-step 432: Download the incremental sub-packages of the second version according to the address information of the incremental sub-packages of the second version.
[0110] After determining the incremental sub-packages in at least one picture sub-package of the second version, the identification information of the incremental sub-packages in at least one picture sub-package of the second version can be determined from the identification information of at least one picture sub-package of the second version. Download the incremental sub-packages of the second version from the cloud server according to the address information of the incremental sub-packages of the second version.
[0111] By using the method of hash value comparison to determine the incremental sub-packages in at least one picture sub-package of the second version, the accuracy of identifying incremental sub-packages can be improved. By using the address information method to download the incremental sub-packages by the first terminal device, avoiding directly sending the incremental sub-packages by the server, the operating cost of the server can be reduced, and at the same time, the acquisition rate of the incremental sub-packages can be increased.
[0112] Step 440: Perform an update process on the first application according to the incremental sub-packages of the second version.
[0113] A picture manager is customized in the first terminal device, and the picture manager performs an update process on the first application according to the incremental sub-packages of the second version.
[0114] The technical solution provided by the embodiments of the present application determines the incremental sub-packet of the second version by receiving the identification information of at least one picture sub-packet of the second version sent by the server, and updates the first application program with the incremental sub-packet of the second version. Compared with the method of updating the application program with the entire picture resource packet in the related art, the present application can reduce the size of the data packet that needs to be downloaded when the first terminal device updates the picture resources by using the incremental sub-packet to update the picture resources of the application program, thereby reducing the computing resources required for the picture resource update, reducing the operating pressure of the first terminal device for the picture resource update, and storing the picture resources as multiple picture sub-packets, making the management of the picture resources more modular. Each picture sub-packet can be updated and maintained independently. Therefore, when performing incremental update, it is not necessary to check all the picture resources in the picture resource packet, and only the update status of each picture sub-packet needs to be checked, avoiding unnecessary resource consumption, simplifying data management and maintenance, and reducing the processing cost of incremental update.
[0115] Figure 6 The flowchart of the incremental update of the picture resources is shown. First, a picture management project is established on the second terminal device. The picture management project is responsible for creating picture sub-packets of each version, modifying the picture resources in the existing picture sub-packets, and adding new picture resources to the new picture sub-packets. In the development and debugging stage, the host project directly depends on the picture management project. In the release package stage, the host project removes the picture management project and performs packaging according to the picture packaging rules. After obtaining the picture resource package, version information is generated for each picture resource package and identification information is generated for each picture sub-packet, and the picture resource package is uploaded to the server.
[0116] The first terminal device sends an application update request to the server to request an update to the first application program in the first terminal device. The application update request includes the first version information, and the first version information includes the first hash value. When the picture resource packet of the second version of the first application program is stored in the server and the first hash value is the same as the second hash value, the first application program is not updated, and the incremental update process of the picture resources ends. When the picture resource packet of the second version of the first application program is stored in the server and the first hash value is different from the second hash value, the server returns the identification information of at least one picture sub-packet of the second version. The first terminal device determines the incremental sub-packet in at least one picture sub-packet of the second version according to the hash value of at least one picture sub-packet of the second version and the hash value of at least one picture sub-packet of the first version, and downloads the incremental sub-packet of the second version according to the address information of the incremental sub-packet of the second version. Finally, the first application program is updated according to the incremental sub-packet of the second version, and the incremental update process of the picture resources ends.
[0117] In some embodiments, at least one picture subpackage is obtained by partitioning at least one picture resource required for the operation of a first application based on at least one business function of the first application.
[0118] In some embodiments, at least one picture subpackage is obtained by partitioning at least one picture resource required for the operation of a first application based on the storage capacity of the picture subpackage.
[0119] In some embodiments, picture resource packages of multiple versions of a first application stored in a server are sent to the server by a second terminal device after compilation. The second terminal device is used to, during the compilation of each version of the first application, respectively package at least one picture resource required for the operation of each version of the first application into picture resource packages of each version of the first application according to a picture packaging rule. The picture packaging rule is used to allocate at least one picture resource required for the operation of the first application to at least one picture subpackage, and to package at least one picture subpackage into a picture resource package.
[0120] In some embodiments, at least one picture resource in each picture subpackage is respectively configured with corresponding index information, and the index information includes file information and picture information. The file information refers to the name information of the picture subpackage where the picture resource is located. The picture information includes at least one of the following: the name information of the picture resource, the indication information of the picture subpackage where the picture resource is located, the hash value of the picture resource, and the resolution of the picture resource. The hash value of the picture resource is used to determine the picture resources that have changed among at least one picture resource required for the operation of the original version of the first application during the process of recompiling the latest version of the first application.
[0121] Please refer to Figure 5 , which shows a flowchart of a method for incremental update of picture resources provided by an embodiment of the present application. The execution subject of each step of this method can be a server. Multiple versions of picture resource packages of a first application are stored in the server, and each picture resource package includes at least one picture subpackage, and each picture subpackage includes at least one picture resource. This method may include at least one of the following steps 510 to 520:
[0122] Step 510, receiving an application update request sent by a first terminal device. The application update request is used to request an update of the first application in the first terminal device, and the application update request includes first version information, and the first version information is used to indicate that the first application in the first terminal device is the first version.
[0123] Step 520, when a picture resource package of the second version of the first application is stored in the server, send the identification information of at least one picture sub-package of the second version to the first terminal device, where the second version is the latest version of the first application.
[0124] In some embodiments, the first version information includes a first hash value, and a second hash value is stored in the server. The first hash value refers to the hash value of the picture resource package of the first version, and the second hash value refers to the hash value of the picture resource package of the second version. Then, step 520 is used to obtain the second hash value, and when the second hash value is different from the first hash value, send the identification information of at least one picture sub-package of the second version to the first terminal device.
[0125] In some embodiments, the above method further includes step 530.
[0126] Step 530, receive the picture resource packages of each version of the first application sent by the second terminal device, as well as receive the version information of the picture resource packages of each version of the first application and the identification information of at least one picture sub-package in the picture resource packages of each version of the first application.
[0127] Wherein, the second terminal device is used to, during the compilation of each version of the first application, pack at least one picture required for the operation of each version of the first application into the picture resource packages of each version of the first application according to the picture packaging rules; the picture packaging rules are used to allocate at least one picture required for the operation of the first application to at least one picture sub-package, and pack at least one picture sub-package into a picture resource package; the version information of the picture resource package includes the hash value of the picture resource package, and the identification information of the picture sub-package includes the hash value of the picture sub-package and the address information of the picture sub-package.
[0128] In some embodiments, at least one picture sub-package is obtained by dividing at least one picture resource required for the operation of the first application based on at least one business function of the first application. Alternatively, at least one picture sub-package is obtained by dividing at least one picture resource required for the operation of the first application based on the storage capacity of the picture sub-package.
[0129] In some embodiments, at least one image resource in each image sub-package is respectively configured with corresponding index information, and the index information includes file information and image information. The file information refers to the name information of the image sub-package where the image resource is located. The image information includes at least one of the following: the name information of the image resource, the indication information of the image sub-package where the image resource is located, the hash value of the image resource, and the resolution of the image resource. The hash value of the image resource is used to determine the changed image resources among at least one image resource required for the operation of the original version of the first application during the process of recompiling the latest version of the first application.
[0130] By transferring the logic of incremental judgment in the server to the first terminal device side for execution, it is possible to avoid the increase in the server's operating cost caused by the server simultaneously maintaining the application update requests of multiple terminal devices. Let the first terminal device be responsible for the update of the application program in the first terminal device, which can improve the rate of incremental update of image resources.
[0131] For the method for incremental update of image resources provided in this application, which is located on the second terminal device side, on the first terminal device side, and on the server side, for the details not elaborated on one side, reference can be made to the introduction on the other side.
[0132] The following is an embodiment of the device of this application, which can be used to execute the method embodiment of this application. For the details not disclosed in the device embodiment of this application, please refer to the method embodiment of this application.
[0133] Please refer to Figure 7 , which shows a block diagram of an incremental update device for image resources provided by an embodiment of this application. This device has the function of implementing the above-mentioned method for incremental update of image resources, and this function can be implemented by hardware or by hardware executing corresponding software. This device can be the first terminal device introduced above or can be set in the first terminal device. As Figure 7 shown, the device 700 may include: a request sending module 710, an information receiving module 720, an incremental determination module 730, and an update processing module 740.
[0134] The request sending module 710 is used to send an application update request to the server. The application update request is used to request an update of the first application program in the first terminal device. The application update request includes first version information, and the first version information is used to indicate that the first application program in the first terminal device is the first version. Multiple version image resource packages of the first application program are stored in the server, and each image resource package includes at least one image sub-package, and each image sub-package includes at least one image resource.
[0135] An information receiving module 720, configured to receive identification information of at least one picture sub-package of the second version sent by the server when a picture resource package of the second version of the first application is stored in the server, where the second version is the latest version of the first application.
[0136] An increment determination module 730, configured to obtain an incremental sub-package of the second version according to the identification information of at least one picture sub-package of the second version and the identification information of at least one picture sub-package of the first version, where the incremental sub-package of the second version is the picture sub-package of the second version that the first application lacks when being updated from the first version to the second version.
[0137] An update processing module 740, configured to perform an update process on the first application according to the incremental sub-package of the second version.
[0138] In some embodiments, the first version information includes a first hash value, and a second hash value is stored in the server, where the first hash value refers to the hash value of the picture resource package of the first version, and the second hash value refers to the hash value of the picture resource package of the second version; the information receiving module 720 is configured to:
[0139] Receive the identification information of at least one picture sub-package of the second version sent by the server when the first hash value is different from the second hash value.
[0140] In some embodiments, the identification information of the picture sub-package includes the hash value of the picture sub-package and the address information of the picture sub-package; the increment determination module 730 is configured to:
[0141] Determine an incremental sub-package in at least one picture sub-package of the second version according to the hash value of at least one picture sub-package of the second version and the hash value of at least one picture sub-package of the first version;
[0142] Download the incremental sub-package of the second version according to the address information of the incremental sub-package of the second version.
[0143] In some embodiments, the incremental sub-package of the second version includes at least one of the following:
[0144] A picture sub-package that has been updated in at least one picture sub-package of the second version;
[0145] A newly added picture sub-package in the picture resource package of the second version.
[0146] In some embodiments, the at least one picture sub - package is obtained by partitioning at least one picture resource required for the operation of the first application based on at least one business function of the first application;
[0147] Or,
[0148] The at least one picture sub - package is obtained by partitioning at least one picture resource required for the operation of the first application based on the storage capacity of the picture sub - package.
[0149] In some embodiments, the picture resource packages of multiple versions of the first application stored in the server are sent to the server by a second terminal device after being compiled. The second terminal device is used to, during the process of compiling each version of the first application, pack at least one picture resource required for the operation of each version of the first application into the picture resource packages of each version of the first application respectively according to the picture packaging rules;
[0150] The picture packaging rules are used to allocate at least one picture resource required for the operation of the first application to the at least one picture sub - package and to pack the at least one picture sub - package into the picture resource package.
[0151] In some embodiments, at least one picture resource in each picture sub - package is respectively configured with corresponding index information, and the index information includes file information and picture information;
[0152] The file information refers to the name information of the picture sub - package where the picture resource is located;
[0153] The picture information includes at least one of the following: the name information of the picture resource, the indication information of the picture sub - package where the picture resource is located, the hash value of the picture resource, the resolution of the picture resource. The hash value of the picture resource is used to determine the picture resources that have changed among at least one picture resource required for the operation of the original version of the first application during the process of recompiling the latest version of the first application.
[0154] In some embodiments, the second terminal device is further used to perform at least one of the following operations during the process of recompiling the latest version of the first application:
[0155] Replace the picture resources that have changed among at least one picture resource required for the operation of the original version of the first application;
[0156] Add incremental picture resources to at least one original picture sub - package corresponding to the original version of the first application;
[0157] Allocate the incremental image resources to the newly created image sub-package of the latest version.
[0158] Please refer to Figure 8 which shows a block diagram of an incremental update device for image resources provided by an embodiment of the present application. The device has the function of implementing the above-mentioned incremental update method for image resources, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be the server introduced above or can be set in the server. As Figure 8 shown, the device 800 may include: a request receiving module 810 and an information sending module 820.
[0159] The request receiving module 810 is configured to receive an application update request sent by a first terminal device, where the application update request is used to request an update to a first application program in the first terminal device, and the application update request includes first version information, and the first version information is used to indicate that the first application program in the first terminal device is the first version;
[0160] The information sending module 820 is configured to, when there is an image resource package of a second version of the first application program stored in the server, send identification information of at least one image sub-package of the second version to the first terminal device, where the second version is the latest version of the first application program.
[0161] In some embodiments, the first version information includes a first hash value, and a second hash value is stored in the server, where the first hash value refers to the hash value of the image resource package of the first version, and the second hash value refers to the hash value of the image resource package of the second version; the information sending module 820 is configured to:
[0162] Obtain the second hash value;
[0163] When the second hash value is different from the first hash value, send the identification information of at least one image sub-package of the second version to the first terminal device.
[0164] In some embodiments, the device 800 further includes an image receiving module, and the image receiving module is configured to:
[0165] Receive the image resource packages of each version of the first application program sent by a second terminal device, and receive the version information of the image resource packages of each version of the first application program, and the identification information of at least one image sub-package in the image resource packages of each version of the first application program;
[0166] Among them, the second terminal device is configured to, during the process of compiling each version of the first application, pack at least one picture required for the operation of each version of the first application into a picture resource package for each version of the first application according to a picture packaging rule; the picture packaging rule is used to allocate at least one picture required for the operation of the first application to at least one picture sub-package, and pack the at least one picture sub-package into the picture resource package;
[0167] The version information of the picture resource package includes the hash value of the picture resource package, and the identification information of the picture sub-package includes the hash value of the picture sub-package and the address information of the picture sub-package.
[0168] It should be noted that, when the device provided in the above embodiment realizes its functions, only the division of the above-mentioned functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment and the method embodiment belong to the same concept, and the specific implementation process can be seen in the method embodiment, which will not be elaborated here.
[0169] Please refer to Figure 9 , which shows a structural block diagram of a computer device 900 provided in an embodiment of the present application. The computer device 900 can be any electronic device with data calculation, processing, and storage functions. The computer device 900 can be used to implement the method for incremental update of picture resources provided in the above embodiment.
[0170] Generally, the computer device 900 includes: a processor 901 and a memory 902.
[0171] The processor 901 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), or PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0172] The memory 902 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 902 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 902 is used to store a computer program, and the computer program is configured to be executed by one or more processors to implement the above-mentioned incremental update method for picture resources.
[0173] Those skilled in the art can understand that Figure 9 the structure shown in
[0174] In a schematic embodiment, a computer-readable storage medium is further provided. A computer program is stored in the storage medium, and when the computer program is executed by a processor of a computer device, the incremental update method of the above picture resources is implemented. Optionally, the above computer-readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0175] In an exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the incremental update method of the above picture resources.
[0176] It should be noted that before and during the process of collecting relevant data of the user, this application can display a prompt interface, a pop-up window or output a voice prompt message. The prompt interface, the pop-up window or the voice prompt message is used to prompt the user that their relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the confirmation operation issued by the user for the prompt interface or the pop-up window. Otherwise (that is, when the confirmation operation issued by the user for the prompt interface or the pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are ended, that is, the relevant data of the user is not obtained. In other words, all user data collected by this application is processed strictly in accordance with the requirements of relevant national laws and regulations. Obtaining the informed consent or separate consent of the personal information subject is carried out under the condition that the user agrees and authorizes, and subsequent data use and processing behaviors are carried out within the scope of laws and regulations and the authorization of the personal information subject. The collection, use and processing of relevant user data need to comply with relevant national and regional laws, regulations and standards.
[0177] It should be understood that the "plurality" mentioned herein refers to two or more. "And / or" describes the association relationship of associated objects and indicates that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. In addition, the step numbers described herein only exemplarily show a possible execution sequence between steps. In some other embodiments, the above steps may not be executed in the order of the numbers. For example, two steps with different numbers can be executed simultaneously, or two steps with different numbers can be executed in the reverse order of the illustration. The embodiments of the present application do not limit this.
[0178] The above are only exemplary embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An incremental update method for picture resources, characterized in that, The method includes: Sending an application update request to a server, where the application update request is used to request an update of a first application in a first terminal device. The application update request includes first version information, and the first version information is used to indicate that the first application in the first terminal device is a first version. Multiple version picture resource packages of the first application are stored in the server, and each picture resource package includes at least one picture sub-package, and each picture sub-package includes at least one picture resource; When a picture resource package of a second version of the first application is stored in the server, receiving identification information of at least one picture sub-package of the second version sent by the server, where the second version is the latest version of the first application; Obtaining an incremental sub-package of the second version according to the identification information of at least one picture sub-package of the second version and the identification information of at least one picture sub-package of the first version. The incremental sub-package of the second version is the picture sub-package of the second version that the first application lacks when being updated from the first version to the second version; Performing an update process on the first application according to the incremental sub-package of the second version.
2. The method according to claim 1, characterized in that The first version information includes a first hash value, and a second hash value is stored in the server. The first hash value refers to the hash value of the picture resource package of the first version, and the second hash value refers to the hash value of the picture resource package of the second version; The receiving the identification information of at least one picture sub-package of the second version sent by the server includes: When the first hash value is different from the second hash value, receiving the identification information of at least one picture sub-package of the second version sent by the server.
3. The method according to claim 2, wherein The identification information of the picture sub-package includes the hash value of the picture sub-package and the address information of the picture sub-package; The obtaining the incremental sub-package of the second version according to the identification information of at least one picture sub-package of the second version and the identification information of at least one picture sub-package of the first version includes: Determining an incremental sub-package in at least one picture sub-package of the second version according to the hash value of at least one picture sub-package of the second version and the hash value of at least one picture sub-package of the first version; Downloading the incremental sub-package of the second version according to the address information of the incremental sub-package of the second version.
4. The method according to claim 3, characterized in that, The incremental sub-package of the second version includes at least one of the following: The picture sub-package in which an update occurs in at least one picture sub-package of the second version; The newly added picture sub-package in the picture resource package of the second version.
5. The method according to claim 1, wherein: The at least one picture sub-package is obtained by dividing at least one picture resource required for the operation of the first application based on at least one business function of the first application; Or, The at least one picture sub-package is obtained by dividing at least one picture resource required for the operation of the first application based on the storage capacity of the picture sub-package.
6. The method according to claim 1, wherein The picture resource packages of multiple versions of the first application stored in the server are sent to the server by a second terminal device after compilation. The second terminal device is used to, during the compilation of each version of the first application, pack at least one picture resource required for the operation of each version of the first application into picture resource packages of each version of the first application according to picture packaging rules; The picture packaging rules are used to allocate at least one picture resource required for the operation of the first application into at least one picture sub-package, and to pack the at least one picture sub-package into the picture resource package.
7. The method according to claim 6, characterized in that, At least one picture resource in each picture sub-package is respectively configured with corresponding index information, and the index information includes file information and picture information; The file information refers to the name information of the picture sub-package where the picture resource is located; The picture information includes at least one of the following: the name information of the picture resource, the indication information of the picture sub-package where the picture resource is located, the hash value of the picture resource, the resolution of the picture resource. The hash value of the picture resource is used to determine the picture resources that have changed among at least one picture resource required for the operation of the original version of the first application during the recompilation of the latest version of the first application.
8. The method according to claim 7, characterized in that, The second terminal device is further used to perform at least one of the following operations during the recompilation of the latest version of the first application: Replace the picture resources that have changed among at least one picture resource required for the operation of the original version of the first application; Add incremental picture resources to at least one original picture sub-package corresponding to the original version of the first application; Allocate the incremental picture resources to newly created picture sub-packages of the latest version.
9. An incremental update method for picture resources, characterized in that, The method is executed by a server, and the server stores picture resource packages of multiple versions of the first application. The picture resource package includes at least one picture sub-package, and each picture sub-package includes at least one picture resource. The method includes: Receiving an application update request sent by a first terminal device. The application update request is used to request an update of the first application in the first terminal device. The application update request contains first version information, and the first version information is used to indicate that the first application in the first terminal device is the first version; When the server stores a picture resource package of a second version of the first application, sending the identification information of at least one picture sub-package of the second version to the first terminal device, where the second version is the latest version of the first application.
10. The method according to claim 9, characterized in that, The first version information includes a first hash value, and the server stores a second hash value. The first hash value refers to the hash value of the picture resource package of the first version, and the second hash value refers to the hash value of the picture resource package of the second version; The sending the identification information of at least one picture sub-package of the second version to the first terminal device includes: Obtaining the second hash value; In the case where the second hash value is different from the first hash value, send the identification information of at least one picture sub-package of the second version to the first terminal device.
11. The method according to claim 9, characterized in that, The method further includes: Receiving the picture resource packages of each version of the first application sent by the second terminal device, as well as receiving the version information of the picture resource packages of each version of the first application, and the identification information of at least one picture sub-package in the picture resource packages of each version of the first application; Wherein, the second terminal device is used to respectively package at least one picture required for the operation of each version of the first application into the picture resource packages of each version of the first application according to the picture packaging rules during the compilation of each version of the first application; the picture packaging rules are used to allocate at least one picture required for the operation of the first application to the at least one picture sub-package, and to package the at least one picture sub-package into the picture resource package; The version information of the picture resource package includes the hash value of the picture resource package, and the identification information of the picture sub-package includes the hash value of the picture sub-package and the address information of the picture sub-package.
12. A computer device, characterized in that, The computer device includes a processor and a memory, and a computer program is stored in the memory. The computer program is loaded and executed by the processor to implement the incremental update method of picture resources as described in any one of claims 1 to 8, or to implement the incremental update method of picture resources as described in any one of claims 9 to 11.
13. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium. The computer program is loaded and executed by the processor to implement the incremental update method of picture resources as described in any one of claims 1 to 8, or to implement the incremental update method of picture resources as described in any one of claims 9 to 11.
14. A computer program product, characterized in that, The computer program product includes a computer program. The computer program is loaded and executed by the processor to implement the incremental update method of picture resources as described in any one of claims 1 to 8, or to implement the incremental update method of picture resources as described in any one of claims 9 to 11.