CN106855816B - Resource file loading method and device of application program in terminal - Google Patents

Resource file loading method and device of application program in terminal Download PDF

Info

Publication number
CN106855816B
CN106855816B CN201611149038.0A CN201611149038A CN106855816B CN 106855816 B CN106855816 B CN 106855816B CN 201611149038 A CN201611149038 A CN 201611149038A CN 106855816 B CN106855816 B CN 106855816B
Authority
CN
China
Prior art keywords
application program
resource file
application
resource
identification information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611149038.0A
Other languages
Chinese (zh)
Other versions
CN106855816A (en
Inventor
李鑫
修建竹
于洪
吴超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201611149038.0A priority Critical patent/CN106855816B/en
Publication of CN106855816A publication Critical patent/CN106855816A/en
Application granted granted Critical
Publication of CN106855816B publication Critical patent/CN106855816B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure discloses a resource file loading method and device of an application program in a terminal, and belongs to the technical field of computers. The method is used for the first application program in the terminal to process the resource file, and comprises the following steps: receiving a loading instruction of a resource file in a first application program, judging whether the first application program has simplified identification information or not, if the first application program has the simplified identification information, determining a second application program sharing the resource file to the first application program in a terminal, and loading the resource file shared by the second application program to the first application program from a resource file package of the second application program. The loading method of the resource files in the application program can ensure that the application program does not need to store the resource files which are the same as the resource reservation application program, and the problem of waste of the storage space of the terminal caused by independent storage of the resource files of the application program is avoided.

Description

Resource file loading method and device of application program in terminal
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for loading a resource file of an application program in a terminal.
Background
With the rapid development of internet technology, application programs in terminals are more and more abundant. In the prior art, after each application program is installed in a terminal, respective resource files are stored independently. When the application program runs, the resource files in the resource file package of the application program are loaded to realize the specific functions of the application program.
However, as more and more applications are installed in the terminal, the resource files of the applications occupy more and more storage of the terminal. In the prior art, some application programs are developed simultaneously as a series, for example, such application programs have the same background color, control buttons (buttons), or resource files such as pictures, that is, in the prior art, resource files related to public resources in some application programs have a certain consistency, so according to the prior art, when the resource files of each application program are independently stored, a part of the resource files are repeatedly stored, which results in waste of terminal storage space.
Disclosure of Invention
In order to solve the technical problem of terminal storage space waste caused by independent storage of application program resource files in the related art, the disclosure provides a resource file loading method and device for an application program in a terminal.
In one aspect, the present application provides a method for loading a resource file of an application program in a terminal, where the method includes:
receiving a first application program resource file loading instruction;
if the first application program has simplified identification information, searching a second application program sharing the resource file to the first application program in the terminal according to the simplified identification information; the simplified identification information is identification information added in the application program after the resource file identical to the second application program is deleted;
and loading the resource file deleted by the first application program from the resource file package of the second application program.
In another aspect, the present application provides an apparatus for loading a resource file of an application program in a terminal, where the apparatus includes:
the loading instruction receiving module is used for receiving a loading instruction of the first application program resource file;
the simplification judging module is used for judging whether the first application program has simplified identification information or not;
the second application determination module is used for searching a second application program which shares the resource file with the first application program in the terminal according to the simplified identification information if the first application program has the simplified identification information; the simplified identification information is identification information added in the application program after the resource file identical to the second application program is deleted;
and the resource file loading module is used for loading the resource file deleted by the first application program from the resource file package of the second application program.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the terminal, a loading instruction of a resource file in a first application program is received, whether the first application program has the simplified identification information or not is judged, if the first application program has the simplified identification information, a second application program sharing the resource file to the first application program in the terminal is determined, and the resource file deleted by the first application program is loaded from a resource file package of the second application program. When the first application program with the simplified identification information loads some resource files, the resource files are deleted from the resource file package of the first application program, and the deleted resource files are loaded from the terminal to the resource file package of the second application program sharing the resource files, so that the first application program does not need to store the resource files identical to the second application program, and the problem of waste of the storage space of the terminal caused by repeated storage of part of the resource files among the application programs is solved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1A is a flowchart illustrating a resource file loading method for an application in a terminal according to an example embodiment;
FIG. 1B is a flowchart illustrating a resource file loading method for an application in a terminal according to an example embodiment;
fig. 2 is a flowchart illustrating a resource file loading method of an application in a terminal according to another exemplary embodiment;
FIG. 3 is a flow diagram illustrating a method for in-application resource file loading for sharing resource files to other applications in a terminal in accordance with an illustrative embodiment;
FIG. 4 is a flowchart illustrating a method for in-application resource file loading for sharing resource files to other applications in a terminal according to another example embodiment;
fig. 5 is a block diagram illustrating a resource file loading apparatus of an application in a terminal according to an exemplary embodiment;
fig. 6 is a block diagram illustrating a resource file loading apparatus of an application in a terminal according to another exemplary embodiment;
fig. 7 is a block diagram illustrating a resource file loading apparatus of an application in a terminal according to another exemplary embodiment;
FIG. 8 is a block diagram illustrating an in-application resource file processing apparatus for sharing a resource file to other applications in a terminal according to an example embodiment;
fig. 9 is a block diagram illustrating a resource file loading apparatus of an application in a terminal according to another exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Fig. 1A and fig. 1B are flowcharts illustrating two implementation methods of a resource file loading method for an application program in a terminal according to an exemplary embodiment. As shown in fig. 1A, the resource file loading method for an application program in a terminal is used for a first application program in the terminal to perform resource file processing, and may include the following steps.
In step S101, a first application resource file loading instruction is received;
in step S102, if the first application has the simplified identification information, a second application sharing the resource file with the first application in the terminal is searched according to the simplified identification information;
the simplified identification information is identification information added in the application program after the resource file identical to the second application program is deleted;
in step S103, the resource file deleted by the first application is loaded from the resource file package of the second application.
More specifically, as shown in fig. 1B, the resource file loading method for an application program in a terminal is used for a first application program in the terminal to perform resource file processing, and can also be implemented by the following steps.
In step S110, a loading instruction of a resource file in a first application program is received.
Similar to step S101, the application program is a software program installed in the terminal. There are a variety of applications in the terminal, each with its own resource file.
During the operation of the application program, the corresponding operation of the resource file is executed by receiving the loading instruction of the resource file, thereby realizing the specific function of the application program.
The following table illustrates resource files for an application according to an exemplary embodiment.
Figure BDA0001179094040000041
Figure BDA0001179094040000051
In step S120, it is determined whether the first application has the abbreviated identifier information, and if so, step S130 is executed, and if not, step S160 is executed.
When the functions of the application program are more and more rich, the storage occupied by the resource files of the application program is more and more large, wherein the resource files comprise various picture, audio, video and other resource files.
For different application programs, because different application programs have different functional characteristics, resource files of different application programs have certain differences. However, there is a certain consistency among some applications for the common resource files such as background color, buttons, and the like.
In an exemplary embodiment, each resource file package of the application program contains a Manifest file, and the Manifest file records the application program family in which the application program is located. Typically, common resource files in the same application family are the same.
When the two application programs have the same resource file, the simplified identification information is added into one application program, and the same resource file is deleted from the application program added with the simplified identification information.
When an application program runs and loads a resource file, judging whether the application program has simplified identification information or not, and when the application program has the simplified identification information, not only loading the resource file stored in the application program, but also determining the application program sharing the resource file to the application program, namely determining a second application program sharing the resource file to the first application program when the first application program receiving a resource file loading instruction has the simplified identification information; and if the application program does not have the simplified identification information, loading the resource files in the resource file packet stored by the application program.
In step S130, a second application sharing the resource file to the first application in the terminal is searched according to the abbreviated identifier information.
The second application is an application that shares the resource file with the first application.
Determining various ways of a second application program sharing the resource file to the first application program in the terminal, and searching application program pointing information of the first application program sharing the resource file to the first application program according to the simplified identification information in the first application program; or searching an application program sharing the resource file with the first application program in an application family to which the first application program belongs; the second application sharing the resource file with the first application in the terminal may also be determined in other ways.
In step S140, the resource file deleted by the first application is loaded from the resource file package of the second application.
When the first application program has the simplified identification information and the first application program loads the resource file, the resource file shared by the second application program to the first application program is loaded besides the resource file in the resource file package of the first application program, namely the resource file deleted from the first application program package when the simplified identification is set, the deleted resource file is the same as part of the resource file in the second application program package, so that the first application program and the second application program can both use the application program in the second application program resource file package, and the normal operation of the first application program is ensured.
In step S160, the resource file in the resource file package of the first application program itself is loaded.
When the first application program does not have the simplified identification information and loads the resource file, the first application program loads the resource file in the resource file package of the first application program.
By using the method, in the terminal, after receiving the loading instruction of the resource file in the first application program, the embodiment of the method determines whether the first application program has the simplified identification information, if the first application program has the simplified identification information, determines a second application program sharing the resource file to the first application program in the terminal, and loads the resource file deleted by the first application program from the resource file package of the second application program. When the first application program with the simplified identification information loads some resource files, the resource files are deleted from the resource file package of the first application program, and the deleted resource files are loaded from the terminal to the resource file package of the second application program sharing the resource files, so that the first application program does not need to store the resource files identical to the second application program, and the problem of waste of the storage space of the terminal caused by repeated storage of part of the resource files among the application programs is solved.
Fig. 2 is a flowchart illustrating a resource file loading method for an application in a terminal according to an exemplary embodiment. As shown in fig. 2, before the step S110 in fig. 1, the resource file loading method for the application program in the terminal may further include the following steps.
In step S210, it is determined whether a second application preset in the terminal exists for the first application, if yes, step S220 is executed, and if no, step S310 is executed.
The preset second application program can be one application program randomly designated in advance; or may be an application program determined by a preset method, for example, according to the resource file storage size of each application program in the terminal, selecting the application program with the largest storage as a preset second application program; the second application may also be preset in other ways.
There are various ways to determine whether the preset second application program exists in the terminal. Whether a preset second application program exists in the terminal can be determined by checking whether each application program in the terminal has sharing information for setting resource files to be shared with other application programs; the pointing information in each application program with the simplified identification information can be checked to determine that the application program indicated in the pointing information is a preset second application program; whether the preset second application program exists in the terminal can also be determined in other ways.
In a specific exemplary embodiment, an application family to which a first application belongs is searched first, and then whether a preset second application exists in the application family is determined. The application program family is a series of application program sets, functions of the application programs in the same application program family have certain differences, but the application programs generally have uniform styles, so that resource files of the application programs have a greater degree of consistency. Each application program file has a unique identifier, and the application program family of each application program is judged through the identifier. For example, a manifest file is stored in the application program, the application program family to which the first application program belongs can be determined according to the identifier in the manifest file, and all application programs in the application program family can be searched according to the application program family. And judging whether a preset second application program exists among all application programs of the application program family according to the modes of judging whether the application programs have sharing information for setting resource files shared to other application programs or have simplified identification information and the like.
In step S220, the resource files are compared between the first application program and the second application program, and the same resource file between the first application program and the second application program is determined.
It will be appreciated that the resource files of the second application are each stored in its own resource file package.
And comparing the resource files between the first application program and the second application program, namely comparing the resource files in the first application program resource file package and the resource files in the second application program resource file package one by one to judge whether the same resource files exist or not.
In step S230, the same resource file is deleted in the first application, and the reduced identification information is added in the first application. The condensed identification information corresponds to the second application.
The simplified identification information is used for identifying the application program with the part or all of the resource file deleted. Through the simplified identification information, when the application program is indicated to load the resource file, a second application program sharing the resource file is determined, and the resource file shared by the second application program to the application program is loaded.
In step S310, comparing the resource files among all the applications in the terminal; the purpose is to capture the differences in resource files between applications.
When the preset second application program does not exist in the terminal, the second application program is determined in the terminal, and the resource file in the second application program is shared to other application programs except the second application program in the terminal.
The difference of the resource files between the application programs is the difference of the resource files between every two application programs.
In step S320, an application that can share the resource file most to other applications is determined as the second application among all applications in the terminal.
In addition, two or more applications exist in the terminal, and one application is used as the second application in the terminal. And deleting the resource file which is the same as the second application program in other application programs except the second application program of the terminal. Therefore, the second application needs to be determined in the terminal.
In the terminal, there are various ways of determining the second application program sharing the resource file according to the difference of the resource file between the application programs. The number of the application programs of other application programs and the application program with the same resource files can be obtained for each application program, and then a second application program is determined according to the number; or acquiring the same resource file size as other application programs for each application program, and determining a second application program according to the total resource file size; the second application may also be determined in other ways.
For example, the terminal includes an application a, an application B, and an application C, where the application a includes resource files a1, a2, A3, and a4, the application B includes resource files B1, B2, and B3, and the application C includes resource files C1 and C2. The resource files a1 and B1 are the same resource files, and the resource files a2 and C2 are the same resource files. The application program having the same resource file as the application program a is B, C, the application program having the same resource file as the application program B is a, the application program having the same resource file as the application program C is a, the resource file that the application program a can share to other application programs is determined to be the largest according to the number of application programs having the same resource file as the application program, and the application program a is determined to be the second application program sharing the resource file to the application program B, C.
By using the method, in the terminal, after receiving the loading instruction of the resource file in the first application program, the embodiment of the method determines whether the first application program has the simplified identification information, if the first application program has the simplified identification information, determines a second application program sharing the resource file to the first application program in the terminal, and loads the resource file deleted by the first application program from the resource file package of the second application program. When the first application program with the simplified identification information loads some resource files, the resource files are deleted from the resource file package of the first application program, and the deleted resource files are loaded from the terminal to the resource file package of the second application program sharing the resource files, so that the first application program does not need to store the resource files identical to the second application program, and the problem of waste of the storage space of the terminal caused by repeated storage of part of the resource files among the application programs is solved.
Further, after the problem of loading the resource file is solved, the method of this embodiment further includes:
in step S401, a resource file update instruction sent by the second application is received.
For the second application program, if the server or the user needs to update the resource file of the second application program, the update includes various situations such as adding the resource file, deleting the resource file, modifying the resource file, etc., the second application program needs to notify the first application program of the update information before updating the resource file of the second application program, and at this time, the first application program receives the update instruction and executes the following steps.
In step S402, the resource file deleted by the first application for adding the thin identification information is acquired from the resource file package of the second application.
Referring to the embodiment of the loading method, since the same resource file as the resource file deleted by the first application program is stored in the second application program package, the resource file may be changed due to the update operation, in one case, if the second application program deletes some resource files, the deleted resource files may be contents that the first application program needs to be loaded before updating, which may cause the first application program not to be loaded, and may cause the first application program not to be started in a serious case.
Therefore, for the first application program, after receiving the resource file update instruction sent by the second application program, the resource file deleted by the first application program after adding the simplified identification information needs to be acquired from the resource file package of the second application program.
In step S403, a resource file acquisition completion instruction is sent to the second application program, where the resource file acquisition completion instruction is used to enable the second application program to determine whether to perform resource file update after receiving the instruction.
Because the content shared by the second application program to other application programs may be different, the second application program needs to wait for all the first application programs to add and restore the resource file before determining to perform the update operation on the resource file.
In step S404, after the second application completes updating, it is determined whether the resource file identical to the second application is updated.
In step S405, if yes, the updated resource file that is the same as the second application is deleted.
On the other hand, another method for updating a resource file from the perspective of a second application program is provided in the embodiments of the present application, as shown in fig. 3, a method for loading a resource file of an application program in a terminal is used for processing a resource file by the second application program, where the second application program is an application program that shares a resource file with other application programs in the terminal, and the method for loading a resource file of an application program in a terminal may include the following steps.
In step S410, a resource file update instruction of the second application program is received.
The update instruction is used for instructing the second application program to update the resource file.
The updating of the resource file comprises resource file processing such as deleting part of the resource file, adding the resource file, modifying the resource file and the like.
In step S420, in response to the resource file update instruction, the difference of the resource file between the updated resource file and the pre-updated resource file of the second application is obtained.
When the application program for updating the resource file is the second application program sharing the resource file, the application program with the simplified identification information in the terminal shares the resource file of the second application program, so that the difference between the updated application program and the updated application program needs to be obtained before updating the resource file to perform difference evaluation in order to avoid the influence of the change of the resource file in the second application program on the application programs.
The differences in resource files between the second application after the update and before the update include files for resources added after the update, deleted resource files, modified resource files, and the like.
In step S430, the same resource file between the other application program in the terminal and the second application program is determined according to the difference.
When the indication that the updated application program is not the second application program, the updating of the resource file of the application program does not affect other application programs in the terminal, so that the resource file before updating in the application program is directly replaced by the updated resource file. And after the resource file is replaced, re-determining the resource file which is the same as the resource file of the second application program according to the replaced resource file, and further realizing the resource file sharing with the second application program.
When the updated application program is indicated to be the second application program, the same resource files between other application programs in the terminal and the second application program need to be determined again according to the file difference between the updated application program and the updated application program.
And comparing the resource files of other application programs and the second application program according to the difference of the resource files of the second application program after updating and before updating and the resource file before updating, and determining the same resource file between the other application programs and the second application program in the terminal.
In step S440, sharing information for sharing the same resource file to other applications is added in the second application.
In step S450, the resource file before update in the second application is replaced with the updated resource file by adding the shared information.
By using the method, when the application program for updating the resource file is the second application program sharing the resource file, the difference of the resource file of the second application program between the updated application program and the second application program is obtained before updating the resource file, the same resource file between the other application programs in the terminal and the second application program is re-determined according to the difference, and the resource file shared by the second application program to the other application programs is further updated, so that the normal operation of the other application programs is not influenced after the second application program is updated, and the accuracy of processing the resource file is ensured.
Further, the method of this embodiment further includes:
in step S501, a resource file deletion instruction sent by the second application is received.
For the second application, if the server or the user needs to delete the resource file of the second application, the second application needs to notify the application sharing the resource file in the second application before deleting the resource file of the second application, at this time, the first application serving as the resource file in the shared second application receives the deletion instruction, and executes the following steps.
In step S502, the resource file deleted by the first application for adding the thin identification information is acquired from the resource file package of the second application.
Referring to the embodiment of the loading method, since the same resource file as the resource file deleted by the first application program is stored in the second application program package, the first application program cannot be loaded due to the deletion operation of the resource file of the second application program, and the first application program cannot be started in a serious case.
Therefore, for the first application program, after receiving the resource file deletion instruction sent by the second application program, the resource file deleted by the first application program after adding the simplified identification information needs to be acquired from the resource file package of the second application program.
In step S503, after the deleted resource file is acquired, the reduced identification information in the first application program is deleted.
Because the content shared by the second application program to other application programs may be different, the second application program needs to wait for all the first application programs to add and restore the resource file before determining to perform the deletion operation of the resource file.
After the first application program obtains the deleted resource file, at this time, the first application program does not need to share the resource file in the second application program, so that the simplified identification information in the first application program is deleted.
Fig. 4 is a flowchart illustrating resource file loading of an application in a terminal according to an example embodiment. As shown in fig. 4, the resource file loading method of the application program in the terminal may further include the following steps.
In step S510, a resource file deletion instruction sent by the second application is received.
The resource file deleting instruction is used for telling the first application program that the second application program can delete the resource file.
In step S520, the resource file deleted by the first application for adding the simplified identification information is obtained from the resource file package of the second application;
that is, for each application program sharing the resource file in the second application program, the resource file shared by the application program is respectively restored to the application program.
When the resource file deleting instruction indicates the second application program to delete the resource file, in order to avoid the influence of the deletion of the resource file on the application program sharing the resource file in the second application program, the resource file shared by other application programs in the terminal is restored to the corresponding application program before the second application program deletes the resource file.
For example, the second application a includes resource files a1, a2, A3, and a4, where the second application a shares the resource files a1 and a2 to the application B and shares the resource files a1 and A3 to the application C. When the system or the user instructs the second application a to delete the resource file, the second application should restore the resource files a1, a2 to the application B and the resource files a1, A3 to the application C before deleting the resource file.
In step S530, after the deleted resource file is acquired, the simplified identification information in the first application program is deleted.
By the method, before the second application program deletes the resource file, the resource file shared by the second application program to other application programs is acquired, namely, the file shared by the second application program is correspondingly restored to other application programs, so that influence on other application programs caused by deletion of the resource file in the second application program is avoided, and normal operation of other application programs after the second application program deletes the resource file is ensured.
The following is an embodiment of the apparatus of the present disclosure, which may be used to execute an embodiment of a resource file loading method of an application program in the terminal. For details that are not disclosed in the embodiments of the device of the present disclosure, please refer to the embodiments of the resource file loading method of the application program in the terminal of the present disclosure.
Fig. 5 is a block diagram illustrating a resource file loading apparatus of an application program in a terminal according to an exemplary embodiment, where, as shown in fig. 5, the resource file loading apparatus of the application program in the terminal is used for a first application program in the terminal to perform resource file processing, and the apparatus includes, but is not limited to: a load instruction receiving module 110, a compaction judgment module 120, a second application determination module 130, and a resource file loading module 140.
A loading instruction receiving module 110, configured to receive a loading instruction of a first application resource file;
a compaction judgment module 120, configured to judge whether the first application has compaction identification information;
a second application determining module 130, configured to, if the first application program has the simplified identification information, search, according to the simplified identification information, a second application program in the terminal, which shares the resource file with the first application program; the simplified identification information is identification information added in the application program after the resource file identical to the second application program is deleted;
and the resource file loading module 140 is configured to load the resource file deleted by the first application from the resource file package of the second application.
The implementation process of the functions and actions of each module in the device is specifically detailed in the implementation process of the corresponding step in the resource file loading method of the application program in the terminal, and is not described herein again.
Alternatively, as shown in fig. 6, the apparatus includes but is not limited to: a second application existence judging module 210, a resource file comparing module 220 and a simplified deleting module 230.
A second application existence determining module 210, configured to determine whether a preset second application exists in the terminal for the first application;
a resource file comparison module 220, configured to compare resource files between the first application program and a preset second application program, and determine a resource file that is the same between the first application program and the second application program;
the simplified deletion module 230 is configured to delete the same resource file in the first application program, and add the simplified identification information corresponding to the second application program in the first application program.
Optionally, as shown in fig. 7, a preset second application program does not exist in the terminal, and the apparatus in fig. 6 further includes but is not limited to: a difference acquisition module 310 and a second application determination module 330.
A difference obtaining module 310, configured to compare resource files among all application programs in the terminal;
the second application determining module 320 determines, as the second application, the application that can share the resource file most to other applications among all applications in the terminal according to the result of the difference obtaining module comparison.
Optionally, the apparatus in fig. 6 further includes:
the update receiving module is used for receiving a resource file update instruction sent by the second application program;
a first deleted file acquisition module, configured to acquire, from the resource file package of the second application program, a resource file deleted by the first application program for adding simplified identification information;
a file acquisition completion instruction sending module, configured to send a resource file acquisition completion instruction to the second application program, where the resource file acquisition completion instruction is used to enable the second application program to determine whether to update a resource file after receiving the instruction;
the same resource file updating determining module is used for judging whether the same resource file as the updated second application program is updated or not again after the second application program completes the updating of the resource file;
and the same resource file deleting module is used for deleting the same resource file with the updated second application program if the same resource file is deleted.
Optionally, the apparatus in fig. 6 further includes:
a deletion instruction receiving module, configured to receive a resource file deletion instruction sent by the second application program;
a second deleted file obtaining module, configured to obtain, from the resource file package of the second application program, a resource file that is deleted by the first application program in order to add the simplified identification information;
and the simplified identification deleting module is used for deleting the simplified identification information in the first application program after the deleted resource file is obtained.
Optionally, fig. 8 is a block diagram of a resource file loading apparatus of an application program in a terminal according to an exemplary embodiment, where the resource file loading apparatus is used for a second application program to perform resource file processing, and the second application program shares a resource file with other application programs in the terminal. As shown in fig. 8, the apparatus includes, but is not limited to: an update instruction receiving module 410, an update difference obtaining module 420, a shared file determining module 430, a shared information adding module 440, and an application updating module 450.
An update instruction receiving module 410, configured to receive a resource file update instruction of a second application program;
an update difference obtaining module 420, configured to respond to the resource file update instruction, and obtain a difference between the resource file of the second application after the update and the resource file of the second application before the update;
a shared file determining module 430, configured to determine, according to the difference, the same resource file between the other application program and the second application program in the terminal;
a shared information adding module 440, configured to add shared information in the second application, where the shared information is used to share the same resource file to other applications;
the application updating module 450 is configured to replace the resource file before updating in the second application program with the updated resource file by adding the shared information.
Optionally, as shown in fig. 9, the apparatus in fig. 8 further includes, but is not limited to: a delete command receiving module 510, a file restoring module 520, and a file deleting module 530.
A deleting instruction receiving module 510, configured to receive a resource file deleting instruction of the second application;
the file restoring module 520 is configured to restore, for each application program sharing the resource file in the second application program, the resource file shared by the application program to the application program;
a file deleting module 530, configured to delete all resource files in the second application.
It is to be understood that the invention is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be effected therein by one skilled in the art without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A resource file loading method of an application program in a terminal is characterized by comprising the following steps:
receiving a first application program resource file loading instruction;
if the first application program has simplified identification information, searching a second application program sharing the resource file to the first application program in the application program family to which the first application program belongs according to the simplified identification information; the simplified identification information is identification information added in the application program after the resource file identical to the second application program is deleted; the application program family is a same series of application program sets;
and loading the resource file deleted by the first application program from the resource file package of the second application program.
2. The method according to claim 1, wherein the reduced identification information is added by a method comprising:
aiming at the first application program, judging whether a preset second application program exists in an application program family to which the first application program belongs, if so, judging that the preset second application program exists in the application program family to which the first application program belongs
Comparing the resource files between the first application program and the preset second application program, and determining the same resource files between the first application program and the preset second application program;
deleting the same resource file in the first application program, and adding simplified identification information corresponding to the second application program in the first application program.
3. The method according to claim 2, wherein after determining whether the second application preset in the application family to which the first application belongs exists, the method further comprises:
if not, comparing the resource files of all the application programs in the application program family to which the first application program belongs;
and determining the application program which can share the resource file to other application programs most as a second application program in all application programs in the application program family to which the first application program belongs.
4. The method of claim 2, further comprising:
receiving a resource file updating instruction sent by the second application program;
acquiring a resource file deleted by the first application program for adding simplified identification information from a resource file package of the second application program;
sending a resource file acquisition completion instruction to the second application program, wherein the resource file acquisition completion instruction is used for enabling the second application program to determine whether to update the resource file after receiving the instruction;
after the second application program finishes updating the resource file, whether the resource file which is the same as the updated second application program is updated or not is judged again;
and if so, deleting the resource file which is the same as the updated resource file between the second application programs.
5. The method of claim 2, further comprising:
receiving a resource file deleting instruction sent by the second application program;
acquiring a resource file deleted by the first application program for adding simplified identification information from a resource file package of the second application program;
and deleting the simplified identification information in the first application program after the deleted resource file is obtained.
6. An apparatus for loading a resource file of an application program in a terminal, the apparatus comprising:
the loading instruction receiving module is used for receiving a loading instruction of the first application program resource file;
the simplification judging module is used for judging whether the first application program has simplified identification information or not;
the second application determination module is used for searching a second application program which shares the resource file with the first application program in the application program family to which the first application program belongs according to the simplified identification information if the first application program has the simplified identification information; the simplified identification information is identification information added in the application program after the resource file identical to the second application program is deleted; the application program family is a same series of application program sets;
and the resource file loading module is used for loading the resource file deleted by the first application program from the resource file package of the second application program.
7. The apparatus of claim 6, further comprising:
a second application existence judging module, configured to judge, for the first application program, whether a preset second application program exists in an application program family to which the first application program belongs;
the resource file comparison module is used for comparing the resource files between the first application program and the preset second application program and determining the same resource files between the first application program and the preset second application program;
and the simplified deletion module is used for deleting the same resource file in the first application program and adding simplified identification information corresponding to the second application program in the first application program.
8. The apparatus of claim 7, wherein the second application does not exist in a preset application family to which the first application belongs, and the apparatus further comprises:
the difference acquisition module is used for comparing resource files of all the application programs in the application program family to which the first application program belongs;
and the second application determining module is used for determining the application program which can share the resource file to other application programs most from all application programs in the application program family to which the first application program belongs as the second application program.
9. The apparatus of claim 7, further comprising:
the updating instruction receiving module is used for receiving a resource file updating instruction sent by the second application program;
a deleted file acquisition module, configured to acquire, from the resource file package of the second application program, a resource file deleted by the first application program for adding the simplified identification information;
a file acquisition completion instruction sending module, configured to send a resource file acquisition completion instruction to the second application program, where the resource file acquisition completion instruction is used to enable the second application program to determine whether to update a resource file after receiving the instruction;
the same resource file updating determining module is used for judging whether the same resource file as the updated second application program is updated or not again after the second application program completes the updating of the resource file;
and the same resource file deleting module is used for deleting the same resource file with the updated second application program if the same resource file is deleted.
10. The apparatus of claim 7, further comprising:
a deletion instruction receiving module, configured to receive a resource file deletion instruction sent by the second application program;
a second deleted file obtaining module, configured to obtain, from the resource file package of the second application program, a resource file that is deleted by the first application program in order to add the simplified identification information;
and the simplified identification deleting module is used for deleting the simplified identification information in the first application program after the deleted resource file is obtained.
CN201611149038.0A 2016-12-13 2016-12-13 Resource file loading method and device of application program in terminal Active CN106855816B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611149038.0A CN106855816B (en) 2016-12-13 2016-12-13 Resource file loading method and device of application program in terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611149038.0A CN106855816B (en) 2016-12-13 2016-12-13 Resource file loading method and device of application program in terminal

Publications (2)

Publication Number Publication Date
CN106855816A CN106855816A (en) 2017-06-16
CN106855816B true CN106855816B (en) 2020-10-13

Family

ID=59125754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611149038.0A Active CN106855816B (en) 2016-12-13 2016-12-13 Resource file loading method and device of application program in terminal

Country Status (1)

Country Link
CN (1) CN106855816B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124480B (en) * 2019-12-19 2023-07-25 北京奇艺世纪科技有限公司 Method and device for generating application program package, electronic equipment and storage medium
CN114546969A (en) * 2020-11-24 2022-05-27 华为技术有限公司 File sharing method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104793998A (en) * 2014-01-20 2015-07-22 中兴通讯股份有限公司 Terminal system resource management method and device
CN105159788A (en) * 2015-09-11 2015-12-16 Tcl集团股份有限公司 Method and system for dynamic resource sharing between Android applications
CN105867947A (en) * 2016-04-25 2016-08-17 青岛海信电器股份有限公司 Data processing method and device after upgrades of preset applications
CN106095518A (en) * 2016-06-28 2016-11-09 东软集团股份有限公司 Application program installation method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030149958A1 (en) * 2002-02-06 2003-08-07 Shumeet Baluja Automatic code generation for applications which run on common platforms

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104793998A (en) * 2014-01-20 2015-07-22 中兴通讯股份有限公司 Terminal system resource management method and device
CN105159788A (en) * 2015-09-11 2015-12-16 Tcl集团股份有限公司 Method and system for dynamic resource sharing between Android applications
CN105867947A (en) * 2016-04-25 2016-08-17 青岛海信电器股份有限公司 Data processing method and device after upgrades of preset applications
CN106095518A (en) * 2016-06-28 2016-11-09 东软集团股份有限公司 Application program installation method and device

Also Published As

Publication number Publication date
CN106855816A (en) 2017-06-16

Similar Documents

Publication Publication Date Title
CN106528224B (en) Content updating method, server and system for Docker container
CN107832100B (en) APK plug-in loading method and terminal thereof
EP3567476A1 (en) Application data processing method and apparatus, and storage medium
CN109739815B (en) File processing method, system, device, equipment and storage medium
CN112445579B (en) Zero terminal data processing system and file copying method and device thereof
US11310066B2 (en) Method and apparatus for pushing information
CN109063149B (en) Method for pushing screen saver pictures individually
CN108536745B (en) Shell-based data table extraction method, terminal, equipment and storage medium
US9483493B2 (en) Method and system for accessing a distributed file system
US20150178030A1 (en) Network device, control method for network device, and storage medium thereof
US11720370B2 (en) Electronic apparatus and method of executing application program
CN107632872B (en) Desktop layout processing method, user data processing method and device and computer storage medium
CN110968331A (en) Method and device for running application program
CN106855816B (en) Resource file loading method and device of application program in terminal
WO2008069508A1 (en) Portable storage apparatus for providing working environment migration service and method thereof
CN113110851A (en) Resource loading method and device, electronic equipment and medium
JP2017167763A (en) Information processor, test execution method and program
CN112256295A (en) Application program updating method, device, equipment and storage medium
WO2018201993A1 (en) Image drawing method, terminal and storage medium
CN107608827B (en) Backup method and terminal for package configuration file and related medium product
CN112511909B (en) Boot push processing method, system, electronic device and medium
US9361048B2 (en) Device management apparatus and device management method for managing device settings
JP7331132B2 (en) Application program installation method, operation method, electronic device, computer readable medium
CN112616076A (en) Startup processing method and system based on smart television, electronic device and medium
CN107302605B (en) Configuration method and device of television proxy server, television and storage medium

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 266000, No. 218, Bay Road, Qingdao economic and Technological Development Zone, Shandong

Applicant after: Hisense Visual Technology Co., Ltd.

Address before: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant before: QINGDAO HISENSE ELECTRONICS Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant