Application size providing method and device, vehicle and readable storage medium
By responding to data request information, determining application attributes and obtaining partition and shared cache file sizes, the accurate space occupied by the application is calculated, and the problem of inaccurate storage space occupied by prefabricated system applications in the prior art is solved, and higher calculations are achieved Accuracy.
Patent Information
- Application Number
- CN202310865397.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2025-01-14
AI Technical Summary
The prior art is difficult to accurately obtain the storage space occupancy information of prefabricated system applications in the system, resulting in users being unable to understand the actual size of the application.
By responding to data request information, determine the application attributes of the target application, and obtain its space size in different partitions and the shared cache file size based on the application attributes, and calculate the accurate space occupied by the application.
It realizes the provision of accurate storage space occupancy information for the target application, improves users' understanding of application size, and is different from the method of simply categorizing cached files into application size in the existing technology, considers the impact of shared cached files, and improves Calculation accuracy.
Smart Images

Figure CN119311650A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of software technology, and more specifically, relates to an application size providing method and device, a vehicle, and a readable storage medium. Background Art
[0002] At present, in order to more clearly understand the storage space occupied by each application, users often request to view the size information of each application in the corresponding system. Among them, for third-party applications in the system, users can view relatively accurate application sizes. However, for pre-made system applications in the system, users often cannot view the accurate application size.
[0003] From the user's perspective, no matter what kind of application, they hope to know the accurate space occupancy information of the application. Therefore, this application aims to provide a solution to this problem. Summary of the invention
[0004] The object of the present invention is to provide a method and device for providing application size, a vehicle, and a readable storage medium, so as to display the accurate application size to the user.
[0005] A first aspect of an embodiment of the present invention provides a method for providing an application size, including:
[0006] In response to the data request information, determining the application attribute of the target application; wherein the data request information is information requesting the application size of the target application;
[0007] Acquire at least one type of application size information corresponding to the target application according to the application attribute;
[0008] The application size information includes the size of the space occupied by the application in different partitions and the size of the shared cache file corresponding to the application; the partition refers to the partition of the storage space of the system where the target application is located;
[0009] determining an application size of the target application based on the at least one application size information;
[0010] Returns the application size of the target application.
[0011] In a possible implementation manner, the acquiring, according to the application attribute, at least one application size information corresponding to the target application includes:
[0012] Obtaining the size of the space occupied by the target application in the data partition;
[0013] When the application attribute shows that the target application is a system application, obtaining the size of the space occupied by the target application in the system partition;
[0014] When the application attribute shows that the target application is a system application and the target application shares a cache file with other applications, the size of the shared cache file corresponding to the target application is obtained.
[0015] In a possible implementation, when the application attribute indicates that the target application is a system application, obtaining the size of the space occupied by the target application in the system partition includes:
[0016] When the application attribute shows that the target application is a preset system application, obtaining the size of the space occupied by the target application in the system partition;
[0017] Among them, preset system applications refer to system applications that are pre-marked and need to accurately display the application size.
[0018] In a possible implementation manner, determining the application attribute of the target application includes:
[0019] Acquire an application identifier of the target application from the data request information;
[0020] An application attribute of the target application is determined based on the application identifier.
[0021] In a possible implementation manner, determining the application size of the target application based on the at least one application size information includes:
[0022] If the at least one application size information includes only the first application size, determining the first application size as the application size of the target application;
[0023] The first application size is the size of the space occupied by the target application in the data partition.
[0024] In a possible implementation manner, determining the application size of the target application based on the at least one application size information includes:
[0025] If the at least one application size information only includes the first application size and the second application size, determining the sum of the first application size and the second application size as the application size of the target application;
[0026] The first application size is the size of the space occupied by the target application in the data partition, and the second application size is the size of the space occupied by the target application in the system partition.
[0027] In a possible implementation manner, determining the application size of the target application based on the at least one application size information includes:
[0028] If the at least one application size information includes the size of the space occupied by the target application in the data partition, the size of the space occupied by the target application in the system partition, and the size of the shared cache file corresponding to the target application, (S1+S2-S3) is determined as the application size of the target application;
[0029] Among them, S1 is the size of the space occupied by the target application in the data partition, S2 is the size of the space occupied by the target application in the system partition, and S3 is the size of the shared cache file corresponding to the target application.
[0030] A second aspect of an embodiment of the present invention provides an application size providing device, including:
[0031] An application attribute determination module, configured to determine the application attribute of a target application in response to data request information; wherein the data request information is information requesting an application size of the target application;
[0032] An application size acquisition module, used to acquire at least one application size information corresponding to the target application according to the application attribute;
[0033] The application size information includes the size information of the application in different partitions and the size information of the shared cache folder corresponding to the application, and the partition refers to the partition of the system where the target application is located;
[0034] an application size calculation module, configured to determine the application size of the target application based on the at least one application size information;
[0035] The application size returning module is used to return the application size of the target application.
[0036] According to a third aspect of an embodiment of the present invention, a vehicle is provided, comprising an on-board terminal, wherein the on-board terminal comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned application size providing method when executing the computer program.
[0037] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned application size providing method are implemented.
[0038] The application size providing method and device, vehicle, and readable storage medium provided by the embodiments of the present invention have the following beneficial effects:
[0039] Different from the method of "calculating the application size in the data partition of the system where the application is located" in the prior art, the embodiment of the present invention will first determine the application attributes of the target application when receiving data request information, and then determine the application size information related to the target application that needs to be obtained based on the application attributes of the target application. On this basis, the application size of the target application is returned based on the aforementioned related application size information.
[0040] That is to say, different from the prior art, the embodiment of the present invention takes into account the differences in application attributes of different applications, and on this basis, adaptively obtains the corresponding application size information according to the application attributes and then calculates the target application size. The application size obtained based on this method can better describe the storage space actually occupied by the target application, that is, the application size obtained based on this method is more accurate, so the embodiment of the present invention effectively solves the problems of the prior art.
[0041] In addition, it should be pointed out that the prior art usually calculates the application size in the data partition of the system where the application is located, and the application size calculated in the data partition includes the size of the space occupied by various cache files of the application. On this basis, according to the description of the application size information in the embodiment of the present invention, it can be seen that, unlike the method of "simply classifying all kinds of cache files as cache files of the application and performing application size calculation" in the prior art, the embodiment of the present invention also considers the possibility that some applications have shared cache files, and therefore when "obtaining application size information according to application attributes", the size of the shared cache file corresponding to the application is taken as a type of application size information separately, thereby taking into account the impact of file sharing on the application size calculation. Based on this, the accuracy of the application size provided by the embodiment of the present invention is further improved.
[0042] In summary, the embodiments of the present invention can provide accurate application size, so that users can better understand the application size. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A schematic diagram of a flow chart of a method for providing application size according to an embodiment of the present invention;
[0045] Figure 2 A schematic diagram of a flow chart of a method for providing application size provided by another embodiment of the present invention;
[0046] Figure 3A structural block diagram of an application size providing device provided by an embodiment of the present invention;
[0047] Figure 4 A schematic block diagram of a vehicle-mounted terminal provided in accordance with an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0049] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0050] Please refer to Figure 1 , Figure 1 A flowchart of a method for providing an application size according to an embodiment of the present invention is provided. The method for providing an application size includes:
[0051] S101: Determine application attributes of a target application in response to data request information, wherein the data request information is information requesting an application size of the target application.
[0052] In this embodiment, when the data request information triggered by the user is received, the application attribute of the target application may be first determined according to the application information about the target application carried in the data request information.
[0053] The application attributes of the target application include, but are not limited to: the application type of the target application, the sharing type of the target application (ie, whether the cache file is shared with other applications), and the like.
[0054] S102: Obtain at least one type of application size information corresponding to the target application according to the application attribute.
[0055] The application size information includes the size of the space occupied by the application in different partitions and the size of the shared cache file corresponding to the application. A partition refers to a partition of the storage space of the system where the target application is located.
[0056] Among them, most of the current data systems are Android systems (also known as Android systems), and the Android system includes a System partition (also known as a system partition) and a Data partition (also known as a data partition). The default rule of the Android system is that pre-made system applications are installed in the System partition, and data is stored in the Data partition. Since the prior art determines the application size by calculating the size of the application in the Data partition, the existing Android system cannot view the exact application size for pre-made system applications. For example, the system application size viewed by the existing Android system is only a few KB, which is obviously unrealistic. Therefore, an embodiment of the present invention considers obtaining the application size information of the corresponding partition based on the application attributes of the target application, so as to achieve an accurate description of the target application size through at least one application size information.
[0057] In this embodiment, considering that some system applications are configured with the SystemUid attribute, such system applications will share the same cache file, and the cache file is stored in the Data partition. This results in the same application size of such system applications obtained based on the prior art. Therefore, the embodiment of the present invention will also consider obtaining the size of the shared cache file corresponding to the target application according to the application attributes of the target application, thereby incorporating the size of the shared cache file corresponding to the target application into the application size calculation of the target application, thereby achieving accurate calculation of the target application size.
[0058] Among them, applications with the SystemUid attribute refer to applications that have android:sharedUserId="android.uid.system" configured in the application's AndroidManifest.xml configuration file. It is known that by setting sharedUserId, multiple applications with the same UID (that is, application identifier) can be configured to run in the same process. Therefore, the aforementioned configuration of the UID to android.uid.system means allowing the corresponding application to run in the system process and have system permissions. At this time, system applications with the same UID (or applications with the SystemUid attribute) will share the same cache file.
[0059] For example, system applications with the same UID (or applications with SystemUid attributes) will share the data_dalvik_cache file, which will contain many installation and uninstallation files (for example, optimized bytecode files or optimized Dex files). These files are automatically generated by the system after an application is installed. Usually, cache files can be used as part of the space occupied by the application to participate in the calculation of the application size, but shared cache files are usually larger (for example, up to tens of megabytes or even larger). At this time, it is obviously not reasonable to use the space occupied by the shared cache files as part of the space occupied by a certain application to calculate the size of the application. Therefore, the embodiment of the present invention can obtain the size of the shared cache files corresponding to the target application when it is detected that the application attributes of the target application include the SystemUid attribute, so as to subsequently remove the space occupied by the shared cache files from the space occupied by the target application, thereby obtaining a more accurate application size.
[0060] In this embodiment, it should be noted that the size of the space occupied by the application in different partitions belongs to different types of application size information. For example, the size of the space occupied by the application in the system partition and the size of the space occupied by the application in the data partition belong to different types of application size information.
[0061] S103: Determine the application size of the target application based on at least one type of application size information.
[0062] In this embodiment, after obtaining the application size information corresponding to the target application, the application size information can be comprehensively calculated according to the type of each application size information to obtain the application size of the target application. The application size of the target application includes the size of the application installation file (that is, apk file) of the target application and the size of the application data (including cache data) of the target application.
[0063] S104: Return the application size of the target application.
[0064] In this embodiment, after the application size of the target application is determined, the application size of the target application may be returned to the user.
[0065] The application size providing method provided in the embodiment of the present invention can be applied to the vehicle system of the vehicle. On this basis, returning the application size of the target application can be detailed as: displaying the application size of the target application on the vehicle screen, and / or broadcasting the application size of the target application through the vehicle multimedia system.
[0066] From the above description, it can be seen that, unlike the method of "directly calculating the application size in the data partition of the system where the application is located" in the prior art, the embodiment of the present invention will first determine the application attributes of the target application when receiving data request information, and then determine the application size information related to the target application that needs to be obtained based on the application attributes of the target application. On this basis, the application size of the target application is returned based on the aforementioned related application size information.
[0067] That is to say, different from the prior art, the embodiment of the present invention takes into account the differences in application attributes of different applications, and on this basis, adaptively obtains the corresponding application size information according to the application attributes and then calculates the target application size. The application size obtained based on this method can better describe the storage space actually occupied by the target application, that is, the application size obtained based on this method is more accurate, so the embodiment of the present invention effectively solves the problems of the prior art.
[0068] In addition, it should be pointed out that the prior art usually calculates the application size in the data partition of the system where the application is located, and the application size calculated in the data partition includes the size of the space occupied by various cache files of the application. On this basis, according to the description of the application size information in the embodiment of the present invention, it can be seen that, unlike the method of "simply classifying all kinds of cache files as cache files of the application and performing application size calculation" in the prior art, the embodiment of the present invention also considers the possibility that some applications have shared cache files, and therefore when "obtaining application size information according to application attributes", the size of the shared cache file corresponding to the application is taken as a type of application size information separately, thereby taking into account the impact of file sharing on the application size calculation. Based on this, the accuracy of the application size provided by the embodiment of the present invention is further improved.
[0069] In summary, the embodiments of the present invention can provide accurate application size, so that users can better understand the application size.
[0070] In a possible implementation, obtaining at least one application size information corresponding to the target application according to the application attribute includes:
[0071] Get the size of the target application's space in the data partition.
[0072] When the application properties show that the target application is a system application, obtain the size of the space occupied by the target application in the system partition.
[0073] When the application properties show that the target application is a system application and the target application shares a cache file with other applications, the size of the shared cache file corresponding to the target application is obtained.
[0074] In this embodiment, it should be noted that the application installation files of third-party applications are stored in the data partition, and the application data of both system applications and third-party applications are also stored in the data partition. The application installation files of system applications are stored in the system partition, and system configuration files are also stored in the system partition. Therefore, the embodiment of the present invention determines whether to obtain the application size information of the relevant partition according to the application attributes.
[0075] In this embodiment, according to the above description, no matter what kind of application the target application is, it occupies a certain space in the data partition. Therefore, the embodiment of the present invention can directly obtain the size of the space occupied by the target application in the data partition.
[0076] In this embodiment, according to the above description, when the target application is a system application, considering that its application installation file exists in the system partition, the embodiment of the present invention can also obtain the size of the space occupied by the target application in the system partition when the application properties show that the target application is a system application.
[0077] In this embodiment, when the target application is a system application and it shares a cache file with other applications, in order to eliminate the influence of the shared cache file, the embodiment of the present invention may also obtain the size of the shared cache file corresponding to the target application.
[0078] Based on the above description, the embodiment of the present invention can obtain corresponding application size information under different application attributes for subsequent calculation of the application size.
[0079] In a possible implementation, when the application properties show that the target application is a system application, obtaining the size of the space occupied by the target application in the system partition includes:
[0080] When the application properties show that the target application is a preset system application, the size of the space occupied by the target application in the system partition is obtained.
[0081] Among them, preset system applications refer to system applications that are pre-marked and need to accurately display the application size.
[0082] In this embodiment, considering that some system applications do not need to accurately display their application sizes, system applications that need to accurately display their application sizes can be marked in advance, and then it can be determined whether the target application is a system application that needs to accurately display its application size based on the marked information. If the target application is a system application that needs to accurately display its application size and is marked in advance, the size of the space occupied by the target application in the system partition is obtained.
[0083] Similarly, in a possible implementation, when the application properties show that the target application is a system application and the target application shares a cache file with other applications, the size of the shared cache file corresponding to the target application is obtained, which can also be detailed as follows:
[0084] When the application properties show that the target application is a preset system application and the target application shares a cache file with other applications, the size of the shared cache file corresponding to the target application is obtained.
[0085] That is to say, only when the target application is a pre-marked system application that needs to accurately display the application size, the size of the corresponding shared cache file is obtained.
[0086] It can be seen from the above description that, by marking system applications, the embodiments of the present invention can reduce the statistics of application size information, thereby improving the calculation efficiency of application size, increasing the speed of returning application size, and improving user experience.
[0087] In a possible implementation, determining the application attribute of the target application includes:
[0088] Get the application identifier of the target application from the data request information.
[0089] An application attribute of the target application is determined based on the application identifier.
[0090] In this embodiment, the application attribute of the target application can be determined by the application identifier of the target application (that is, the UID of the target application). For example, when the application identifier of the target application belongs to the identifier set of third-party applications, it indicates that the target application is a third-party application. When the application identifier of the target application belongs to the identifier set of system applications, it indicates that the target application is a system application. When the application identifier of the target application belongs to a shared identifier, it indicates that the target application is a system application and it shares cache files with other applications.
[0091] In this embodiment, the application identifier of the target application is also used to obtain the application size information of the target application, that is, various application size information can be obtained in the corresponding partition through the application identifier of the target application.
[0092] In this embodiment, an additional attribute identifier may be set to represent the application attribute of the target application. For example, the "preset system application" mentioned in the above embodiment may additionally set an attribute identifier of Boolean type to represent whether a certain application is a preset system application. For example, when the attribute identifier of a certain application is true, it may represent that the application is a preset system application, and when the attribute identifier of a certain application is false, it may represent that the application is not a preset system application.
[0093] In a possible implementation, determining the application size of the target application based on at least one application size information includes:
[0094] If the at least one type of application size information only includes the first application size, the first application size is determined as the application size of the target application.
[0095] The first application size is the size of the space occupied by the target application in the data partition.
[0096] In this embodiment, if the at least one application size information includes only the first application size, it means that the target application is a third-party application, and the first application size is the application size of the target application.
[0097] In a possible implementation, determining the application size of the target application based on at least one application size information includes:
[0098] If the at least one type of application size information only includes the first application size and the second application size, the sum of the first application size and the second application size is determined as the application size of the target application.
[0099] The first application size is the size of the space occupied by the target application in the data partition, and the second application size is the size of the space occupied by the target application in the system partition.
[0100] In this embodiment, if at least one application size information only includes the first application size and the second application size, it means that the target application is a system application and the target application does not share cache files with other applications. At this time, the sum of the first application size and the second application size is the application size of the target application.
[0101] In a possible implementation, determining the application size of the target application based on at least one application size information includes:
[0102] If at least one application size information includes the size of the space occupied by the target application in the data partition, the size of the space occupied by the target application in the system partition, and the size of the shared cache file corresponding to the target application, then (S1+S2-S3) is determined as the application size of the target application.
[0103] Among them, S1 is the size of the space occupied by the target application in the data partition, S2 is the size of the space occupied by the target application in the system partition, and S3 is the size of the shared cache file corresponding to the target application.
[0104] In this embodiment, if at least one type of application size information includes the size of the space occupied by the target application in the data partition, the size of the space occupied by the target application in the system partition, and the size of the shared cache file corresponding to the target application, then it means that the target application is a system application and the target application shares cache files with other applications. At this time, in order to eliminate the influence of the shared cache files, the size of the shared cache file corresponding to the target application can be subtracted from the sum of the size of the space occupied by the target application in the data partition and the size of the space occupied by the target application in the system partition to obtain the application size of the target application.
[0105] In summary, after obtaining the application size information corresponding to the target application, the embodiment of the present invention can implement personalized calculation of the target application size according to the number of types of application size information corresponding to the target application, and thus obtain an accurate size of the target application.
[0106] Based on the above embodiments, you can also refer to Figure 2 , Figure 2 A specific implementation method of the method provided by the embodiment of the present invention is given. In order to quickly return the application size of the target application, the specific execution of the method of the embodiment of the present invention can also be shown as steps S11 to S77. Please refer to steps S11 to S77. After receiving the data request information, the size of the target application in the data partition can be obtained according to the UID of the target application carried in the data request information. On this basis, it can be determined whether the target application is a system application based on the aforementioned UID. If the target application is not a system application, the size of the target application in the data partition is directly determined as the size of the target application. If the target application is a system application, it is determined whether the target application is configured with the SystemUid attribute. If the target application is not configured with the SystemUid attribute, the sum of the size of the target application in the data partition and the size of the target application in the system partition is determined as the size of the target application; if the target application is not configured with the SystemUid attribute, the "size of the target application in the data partition + the size of the target application in the system partition - the size of the shared cache file corresponding to the target application" is determined as the size of the target application.
[0107] pass Figure 2 The embodiment of the present invention can realize statistical calculation of each application size information while judging the application attributes, thereby improving the calculation efficiency of the application size.
[0108] It should be noted that in order to achieve statistical calculation of various application size information, the embodiment of the present invention will modify part of the source code of the system where the target application is located to support the acquisition of various application size information in the embodiment of the present invention. That is, the present invention achieves accurate provision of application size by means of "modifying the underlying logic of the system and designing application size calculation solutions for different application attributes".
[0109] Corresponding to the application size providing method of the above embodiment, Figure 3 This is a structural block diagram of an application size providing device provided by an embodiment of the present invention. For the convenience of description, only the parts related to the embodiment of the present invention are shown. Figure 3 The application size providing device 20 includes: an application attribute determining module 21, an application size acquiring module 22, an application size calculating module 23 and an application size returning module 24.
[0110] The application attribute determination module 21 is used to determine the application attribute of the target application in response to the data request information, wherein the data request information is information requesting the application size of the target application.
[0111] The application size acquisition module 22 is used to acquire at least one type of application size information corresponding to the target application according to the application attribute.
[0112] The application size information includes the size information of the application in different partitions and the size information of the shared cache folder corresponding to the application. The partition refers to the partition of the system where the target application is located.
[0113] The application size calculation module 23 is used to determine the application size of the target application based on at least one application size information.
[0114] The application size returning module 24 is used to return the application size of the target application.
[0115] In a possible implementation, the application size acquisition module 22 is specifically used for:
[0116] Get the size of the target application's space in the data partition.
[0117] When the application properties show that the target application is a system application, obtain the size of the space occupied by the target application in the system partition.
[0118] When the application properties show that the target application is a system application and the target application shares a cache file with other applications, the size of the shared cache file corresponding to the target application is obtained.
[0119] In a possible implementation, when the application properties show that the target application is a system application, obtaining the size of the space occupied by the target application in the system partition includes:
[0120] When the application properties show that the target application is a preset system application, the size of the space occupied by the target application in the system partition is obtained.
[0121] Among them, preset system applications refer to system applications that are pre-marked and need to accurately display the application size.
[0122] In a possible implementation, the application attribute determination module 21 is specifically configured to:
[0123] Get the application identifier of the target application from the data request information.
[0124] An application attribute of the target application is determined based on the application identifier.
[0125] In a possible implementation, the application size calculation module 23 is specifically configured to perform the following steps:
[0126] If the at least one type of application size information only includes the first application size, the first application size is determined as the application size of the target application.
[0127] The first application size is the size of the space occupied by the target application in the data partition.
[0128] In a possible implementation, the application size calculation module 23 is specifically configured to perform the following steps:
[0129] If the at least one type of application size information only includes the first application size and the second application size, the sum of the first application size and the second application size is determined as the application size of the target application.
[0130] The first application size is the size of the space occupied by the target application in the data partition, and the second application size is the size of the space occupied by the target application in the system partition.
[0131] In a possible implementation, the application size calculation module 23 is specifically configured to perform the following steps:
[0132] If at least one application size information includes the size of the space occupied by the target application in the data partition, the size of the space occupied by the target application in the system partition, and the size of the shared cache file corresponding to the target application, then (S1+S2-S3) is determined as the application size of the target application.
[0133] Among them, S1 is the size of the space occupied by the target application in the data partition, S2 is the size of the space occupied by the target application in the system partition, and S3 is the size of the shared cache file corresponding to the target application.
[0134] The embodiment of the present invention further provides a vehicle, the vehicle comprising a vehicle-mounted terminal, see Figure 4 , Figure 4 FIG. 1 is a schematic block diagram of a vehicle-mounted terminal provided by an embodiment of the present invention. Figure 4 The terminal 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to perform the following operations to perform the functions of the modules / units in the above-mentioned device embodiments, such as Figure 3 The functions of modules 21 to 24 are shown.
[0135] It should be understood that in the embodiment of the present invention, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0136] The input device 302 may include a touch panel, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.
[0137] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.
[0138] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiment of the present invention can execute the implementation methods described in the first and second embodiments of the application size providing method provided in the embodiment of the present invention, and can also execute the implementation methods of the terminal described in the embodiment of the present invention, which will not be repeated here.
[0139] In another embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, wherein the program instructions are executed by a processor to implement all or part of the processes in the above-mentioned embodiment method, and may also be completed by instructing the relevant hardware through the computer program, wherein the computer program may be stored in a computer-readable storage medium, and wherein the computer program may be executed by the processor to implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the contents contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signal and telecommunication signal.
[0140] The computer-readable storage medium may be an internal storage unit of the terminal of any of the foregoing embodiments, such as a hard disk or memory of the terminal. The computer-readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the computer-readable storage medium may also include both an internal storage unit of the terminal and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the terminal. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0141] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0142] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the terminals and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0143] In the several embodiments provided in the present application, it should be understood that the disclosed terminals and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.
[0144] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0145] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0146] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for providing application size, characterized in that: include: In response to the data request information, determining the application attribute of the target application; wherein the data request information is information requesting the application size of the target application; Acquire at least one type of application size information corresponding to the target application according to the application attribute; The application size information includes the size of the space occupied by the application in different partitions and the size of the shared cache file corresponding to the application; the partition refers to the partition of the storage space of the system where the target application is located; determining an application size of the target application based on the at least one application size information; Returns the application size of the target application.
2. The method for providing application size according to claim 1, characterized in that: The acquiring at least one application size information corresponding to the target application according to the application attribute includes: Obtaining the size of the space occupied by the target application in the data partition; When the application attribute shows that the target application is a system application, obtaining the size of the space occupied by the target application in the system partition; When the application attribute shows that the target application is a system application and the target application shares a cache file with other applications, the size of the shared cache file corresponding to the target application is obtained.
3. The method for providing application size according to claim 2, wherein: When the application attribute indicates that the target application is a system application, determining the size of the space occupied by the target application in the system partition includes: When the application attribute shows that the target application is a preset system application, obtaining the size of the space occupied by the target application in the system partition; Among them, preset system applications refer to system applications that are pre-marked and need to accurately display the application size.
4. The method for providing application size according to any one of claims 1 to 3, characterized in that: The determining of the application attributes of the target application includes: Acquire an application identifier of the target application from the data request information; An application attribute of the target application is determined based on the application identifier.
5. The method for providing application size according to claim 1, wherein: The determining the application size of the target application based on the at least one application size information includes: If the at least one application size information includes only the first application size, determining the first application size as the application size of the target application; The first application size is the size of the space occupied by the target application in the data partition.
6. The method for providing application size according to claim 1, wherein: The determining the application size of the target application based on the at least one application size information includes: If the at least one application size information only includes a first application size and a second application size, determining a sum of the first application size and the second application size as the application size of the target application; The first application size is the size of the space occupied by the target application in the data partition, and the second application size is the size of the space occupied by the target application in the system partition.
7. The method for providing application size according to claim 1, wherein: The determining the application size of the target application based on the at least one application size information includes: If the at least one application size information includes the size of the space occupied by the target application in the data partition, the size of the space occupied by the target application in the system partition, and the size of the shared cache file corresponding to the target application, (S1+S2-S3) is determined as the application size of the target application; Among them, S1 is the size of the space occupied by the target application in the data partition, S2 is the size of the space occupied by the target application in the system partition, and S3 is the size of the shared cache file corresponding to the target application.
8. An application size providing device, characterized in that: include: An application attribute determination module, configured to determine the application attribute of a target application in response to data request information; wherein the data request information is information requesting an application size of the target application; An application size acquisition module, used to acquire at least one application size information corresponding to the target application according to the application attribute; The application size information includes the size information of the application in different partitions and the size information of the shared cache folder corresponding to the application, and the partition refers to the partition of the system where the target application is located; an application size calculation module, configured to determine the application size of the target application based on the at least one application size information; The application size returning module is used to return the application size of the target application.
9. A vehicle, characterized in that: include: Vehicle terminal; The vehicle-mounted terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.