Physical partition access method and device, equipment and storage medium
By performing data access operations on the dynamic partitions of terminal devices, the problem of unused super partition space is solved, achieving more efficient utilization of system resources and expansion of user storage space.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HEYTAP TECHNOLOGY CO LTD
- Filing Date
- 2024-11-05
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, the super partition space of terminal devices is mainly reserved for software upgrades, resulting in low system resource utilization and users being unable to effectively utilize this space.
By detecting data access commands, data access operations can be performed on dynamic partitions in the terminal device, thereby expanding user storage space and saving system resources.
It improves the space utilization of the super partition, expands user storage space, saves system resources, and enhances the user experience.
Smart Images

Figure CN121996145A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data storage, and more particularly to a method, apparatus, device, and storage medium for accessing physical partitions. Background Technology
[0002] Terminal device manufacturers typically reserve some super partitions. However, currently, this super partition space is mainly reserved for software upgrades. Therefore, improving the utilization of system resources is an urgent problem to be solved. Summary of the Invention
[0003] This application provides a method, apparatus, device, and storage medium for accessing physical partitions, which are used to perform data access operations on physical partitions in a terminal device used for application version upgrades according to data access instructions, thereby expanding user storage space and saving system resources.
[0004] The first aspect of this application provides a method for accessing a physical partition, the method being applied to a terminal device, the method comprising: detecting a data access instruction; and performing a data access operation on a target partition according to the data access instruction, the target partition including a dynamic partition in the terminal device.
[0005] A second aspect of this application provides a physical partition access device, the device being applied to a terminal device, the device comprising:
[0006] The detection module is used to detect data access commands;
[0007] The access module is used to perform data access operations on the target partition according to the data access instruction, wherein the target partition includes the dynamic partition in the terminal device.
[0008] A third aspect of this application provides a terminal device that may include a memory, a processor, and a transceiver. The memory stores a computer program that can run on the processor, and the terminal device executes the program to implement the method described in the first aspect of this application.
[0009] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described in the first aspect of this application.
[0010] Another aspect of this application discloses a computer program product that, when run on a computer, causes the computer to execute the method described in the first aspect of this application.
[0011] Another aspect of this application discloses an application publishing platform for publishing computer program products, wherein when the computer program product is run on a computer, the computer executes the method described in the first aspect of this application.
[0012] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0013] In this embodiment, a data access instruction is detected; according to the data access instruction, a data access operation is performed on a target partition, the target partition including a dynamic partition in the terminal device. This is used to perform data access operations on a physical partition in the terminal device used for application version upgrades, thereby expanding user storage space and saving system resources. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments and the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application, and other drawings can be obtained based on these drawings.
[0015] Figure 1 This refers to the partition table for Android system terminal devices.
[0016] Figure 2 This is a schematic diagram of one embodiment of the physical partition access method in this application;
[0017] Figure 3A This is a schematic diagram of the remaining space partitioning in the dynamic partitioning in an embodiment of this application;
[0018] Figure 3B This is a schematic diagram of data access to the remaining space partition in the dynamic partition in an embodiment of this application;
[0019] Figure 3C This is a schematic diagram illustrating the use of memory expansion in an embodiment of this application;
[0020] Figure 4 This is a schematic diagram of another embodiment of the physical partition access method in this application;
[0021] Figure 5 This is a schematic diagram illustrating the control of the target partition in an OTA upgrade scenario according to an embodiment of this application;
[0022] Figure 6 This is a schematic diagram of another embodiment of the physical partition access method in this application;
[0023] Figure 7This is a schematic diagram of one embodiment of the physical partition access device in this application;
[0024] Figure 8 This is a schematic diagram of one embodiment of the terminal device in this application;
[0025] Figure 9 This is a schematic diagram of another embodiment of the terminal device in this application. Detailed Implementation
[0026] This application provides a method, apparatus, device, and storage medium for accessing physical partitions, which are used to perform data access operations on physical partitions in a terminal device used for application version upgrades according to data access instructions, thereby expanding user storage space and saving system resources.
[0027] To enable those skilled in the art to better understand the present application, the technical solutions of the embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. All embodiments based on the present application should fall within the scope of protection of the present application.
[0028] The following is a brief explanation of some of the terms used in this application:
[0029] OTA (Over-The-Air) updates are a method of remotely updating device firmware or software using wireless communication technology. This technology is widely used in modern Internet of Things (IoT) devices, smartphones, automobiles, embedded systems, and other fields, providing a convenient update method without a physical connection.
[0030] In Linux, DM technology refers to Device Mapper technology. Device Mapper is a mapping framework mechanism provided in the Linux 2.6 kernel that maps logical devices to physical devices. Through Device Mapper, users can formulate management strategies for implementing storage resources as needed. It allows the creation of virtual block devices, which appear as a complete block device in the Linux kernel, regardless of how they are organized or communicate.
[0031] The partition table is a crucial component of the storage structure of Android devices, used to manage and organize data on the device. Below are some common partitions in Android devices and their functions:
[0032] The boot partition contains the boot image, which includes the kernel and initialization scripts used to boot the Android system. This partition is responsible for the device's boot process, loading the kernel and starting the Android system.
[0033] Kernel partition: Stores the core component of the operating system, namely the Linux kernel. The kernel is the core part of the operating system, responsible for managing low-level functions such as hardware devices, memory management, and process scheduling.
[0034] The system partition contains the Android framework and is the main partition of the Android system. It contains the operating system's system files, applications, library files, system configurations, etc. This is the core part of the Android system, responsible for providing the system's basic functions and services.
[0035] The vendor partition contains proprietary files and drivers provided by the device manufacturer to support device-specific hardware functions and feature extensions, such as cameras, sensors, and audio.
[0036] Recovery partition: Contains the Android system's recovery mode, used for device repair, flashing, backup, and restoration.
[0037] System cache partition: Stores temporary data. This partition is optional if the device uses seamless updates. The cache partition does not necessarily have to be writable by the bootloader, but it must be able to be cleared.
[0038] Userdata partition: Contains user-installed applications and data, including custom data.
[0039] Metadata partition: Used to store metadata encryption keys when the device uses metadata encryption. Size is 16MB or larger. This partition is unencrypted, and the system does not take snapshots of its data.
[0040] Manufacturer (ODM) section: Contains the original design manufacturer's (ODM) custom settings for the system-on-chip (SoC) vendor's board support package (BSP).
[0041] Radio partition: Contains the image of the wireless device. This partition is only required for devices that contain the wireless device and store the wireless device's dedicated software in a dedicated partition.
[0042] Super partition: Stores the metadata and content of the dynamic partition. Dynamic partitions are Android's user-space partitioning system, supporting the creation and destruction of partitions and resizing during over-the-air (OTA) updates. Devices running Android 11 and later support dynamic partitions.
[0043] These partitions together constitute the storage structure of an Android device. Each partition has its specific function and role to ensure that the device can function properly and be updated.
[0044] In some implementations, such as Figure 1 The diagram shows the partitioning of a terminal device (e.g., an Android system terminal device). The partition table of an Android system terminal device initially includes at least one physical partition. During the upgrade process, there is a problem where a physical partition cannot be compiled once it exceeds its original size, leading to an inability to upgrade. This indicates a lack of flexibility in partition adjustment.
[0045] Starting with Android 10, physical partition tables that experienced significant size changes during upgrades were consolidated into a single physical partition called `super` (primarily including partitions like `system`, `vendor`, and `product`). These physical partitions, such as `system`, `vendor`, and `product`, were then converted into logical partitions within the `super` physical partition. These logical partitions, leveraging Linux's Device Mapper (DM) technology, can be easily dynamically resized and expanded, thus resolving the previous issue of inflexible partition adjustments. Therefore, most Android system terminal devices now have partition tables like this... Figure 1 As shown.
[0046] Another major problem with existing partition table planning is that the size of the super partition is difficult to accurately assess for various reasons, so manufacturers reserve some super partitions. Table 1 below shows statistics on the super partition sizes of some terminal devices:
[0047]
[0048] Table 1
[0049] The reserved size of the super partition on various Android devices varies significantly. Furthermore, this super partition space is primarily reserved for software upgrades; users cannot access it. Therefore, the super partition space is not fully utilized, resulting in low system resource utilization.
[0050] In the embodiments of this application, the terminal device may be a mobile phone, a tablet computer, a computer with wireless transceiver capabilities, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self-driving, a wireless terminal device in remote medical care, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, etc.
[0051] By way of example and not limitation, in this embodiment, the terminal device can also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not merely hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are feature-rich, large in size, and can achieve complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those that focus on a specific type of application function and require the use of other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0052] In the technical solution of this application, data access operations are performed on the physical partition in the terminal device used for application version upgrades according to the data access instructions, thereby expanding user storage space and saving system resources.
[0053] The technical solution of this application will be further described below by way of embodiments, such as... Figure 2 The diagram shown is an embodiment of a method for accessing a physical partition in this application. This method is applied to a terminal device and may include:
[0054] 201. A data access command has been detected.
[0055] For example, the terminal device detects a data access instruction, which may include a read data instruction or a write data instruction.
[0056] 202. Perform data access operations on the target partition according to the data access instruction, wherein the target partition includes the dynamic partition in the terminal device.
[0057] The terminal device performs data access operations on the dynamic partition (i.e., the super partition) according to the data access instructions. Since the super partition in existing technologies is mainly used for application version upgrades, but in this application's technical solution it can also be used for data access, thus improving the space utilization of the super partition and thereby enhancing system resources.
[0058] Optionally, in some possible implementations, the target partition includes the remaining space partition in the dynamic partition, wherein the remaining space partition is the partition corresponding to the current remaining space in the dynamic partition; the step of performing data access operation on the target partition according to the data access instruction may include: performing data access operation on the remaining space partition in the dynamic partition according to the data access instruction.
[0059] For example, the remaining space in a dynamic partition can also be managed as a logical partition. For instance, the logical partition name for the remaining space could be "shared partition." This shared partition would have read and write permissions by default and could be accessed by the userdata partition. Therefore, upon detecting a data access command, data access operations could be performed on the remaining space partition according to the data access command. Figure 3A The diagram shown is a schematic representation of the remaining space partition in a dynamic partitioning scheme according to an embodiment of this application. The target partition, i.e., the super partition, can include the partition corresponding to the currently occupied space of super and the partition corresponding to the currently remaining space of super. The partition corresponding to the currently remaining space of super is also the remaining space partition. The remaining space partition here can also be understood as the partition corresponding to the currently remaining space when no data access is performed.
[0060] In this technical solution, data access operations are performed on the remaining space partition in the dynamic partition according to the data access instructions. Since the remaining space partition in the dynamic partition provides data read and write functions, it can expand the user's storage space and thus save system resources.
[0061] Optionally, in some possible implementations, the data access instruction includes a read data instruction or a write data instruction; the step of performing data access operations on the target partition according to the data access instruction may include:
[0062] Perform a data read operation on the target partition according to the read data instruction; or,
[0063] According to the write data instruction, a write data operation is performed on the target partition.
[0064] For example, in the normal power-on mode of the terminal device, the target partition (i.e., the dynamic partition) can provide data read or write functions.
[0065] In this technical solution, the terminal device can perform read data operations on the target partition (i.e., the dynamic partition) according to read data instructions, or perform write data operations on the target partition (i.e., the dynamic partition) according to write data instructions. Because the target partition (i.e., the dynamic partition) provides data read and write functions, it can expand the user's storage space, thereby saving system resources.
[0066] Optionally, in some possible implementations, the target partition includes a remaining space partition in the dynamic partition, wherein the remaining space partition is the partition corresponding to the current remaining space in the dynamic partition; the step of performing data access operations on the target partition according to the data access instruction may include:
[0067] According to the read data instruction, perform a read data operation on the remaining space partition in the dynamic partition; or,
[0068] According to the write data instruction, write data to the remaining space partition in the dynamic partition.
[0069] For example, in the normal power-on mode of the terminal device, the remaining space partition in the dynamic partition can provide data read or write functions, thereby enabling data access.
[0070] In this technical solution, the terminal device can perform read data operations on the remaining space partition in the dynamic partition according to read data instructions, or write data operations on the remaining space partition in the dynamic partition according to write data instructions. Because the remaining space partition in the dynamic partition provides data read and write functions, it can expand the user's storage space, thereby saving system resources.
[0071] Optionally, in some possible implementations, the step of performing data access operations on the target partition according to the data access instruction may include: enabling the data access function of the target partition according to the data access instruction, and performing data access operations on the target partition.
[0072] For example, a terminal device can enable data access to a target partition (i.e., a dynamic partition) based on a data access command, and then perform data access operations on the target partition (i.e., the dynamic partition). Specifically, this can be achieved through a first functional module, which enables data access to the target partition (i.e., the dynamic partition) based on the data access command, and then performs data access operations on the target partition (i.e., the dynamic partition). This first functional module can manage the target partition (i.e., the dynamic partition), provide read and write operations, and allow access by user data partitions, as well as dynamically resizing functions. Other functional modules can access the target partition (i.e., the dynamic partition) through this first functional module.
[0073] In this technical solution, according to the data access instruction, the data access function of the target partition (i.e., the dynamic partition) can be enabled first, and then the data access operation can be performed on the target partition (i.e., the dynamic partition), which can provide an additional layer of security for data access to the target partition (i.e., the dynamic partition).
[0074] Optionally, in some possible implementations, the target partition includes the remaining space partition in the dynamic partition, and the remaining space partition is the partition corresponding to the current remaining space in the dynamic partition; the step of performing data access operation on the target partition according to the data access instruction may include: enabling the data access function of the remaining space partition in the dynamic partition according to the data access instruction, and performing data access operation on the remaining space partition in the dynamic partition.
[0075] For example, a terminal device can enable data access to the remaining space partition in a dynamic partition based on a data access command, and then perform data access operations on that partition. Specifically, this can be done through a first functional module (module A), which enables data access to the remaining space partition in the dynamic partition based on the data access command, and then performs data access operations on that partition. This first functional module can manage the remaining space partition in the dynamic partition, providing read and write operations, and can be accessed by user data partitions, as well as dynamically resize it. Other functional modules can access the remaining space partition in the dynamic partition through this first functional module. Figure 3B The diagram shown is a schematic of data access to the remaining space partition in the dynamic partition in an embodiment of this application.
[0076] For example, other functional modules may include a second functional module (using module B), a third functional module (using module C), or a fourth functional module (using module D). For instance, the second functional module is a nandswap module used for memory expansion. Figure 3CThe diagram shown illustrates the use of memory expansion in an embodiment of this application. The third functional module is the Fulldump & minidump module, used to save the log file of the dump in abnormal situations. The fourth functional module can be used for downloading application XXX, or storing temporary file data, etc.
[0077] In this technical solution, according to the data access instruction, the data access function of the remaining space partition in the dynamic partition can be enabled first, and then the data access operation of the remaining space partition in the dynamic partition can be performed, which can provide an additional layer of security for the data access of the remaining space partition in the dynamic partition.
[0078] Optionally, in some possible implementations, the terminal device further includes a user data partition; the step of performing a data access operation on the target partition according to the data access instruction may include: performing a data access operation on the target partition according to the data access instruction when the fourth current remaining space of the user data partition is less than or equal to a fourth space threshold.
[0079] For example, the terminal device also includes a user data partition. When the fourth current remaining space of the user data partition is less than or equal to the fourth space threshold, that is, the fourth current remaining space of the user data partition is relatively small, in order to prevent the fourth current remaining space of the user data partition from being insufficient, data access operations can be performed on the target partition (i.e., the dynamic partition) according to the data access instruction.
[0080] In this technical solution, data access operations can not be performed on the target partition (i.e., the dynamic partition) under all circumstances. Data access operations are only performed on the target partition (i.e., the dynamic partition) according to data access instructions when the remaining space in the user data partition is insufficient. The target partition (i.e., the dynamic partition) can, to the greatest extent possible, ensure sufficient space for application version upgrades.
[0081] Optionally, in some possible implementations, the target partition includes the remaining space partition in the dynamic partition, wherein the remaining space partition is the partition corresponding to the current remaining space in the dynamic partition; the terminal device further includes a user data partition; the step of performing data access operation on the target partition according to the data access instruction may include: when the fourth current remaining space of the user data partition is less than or equal to the fourth space threshold, performing data access operation on the remaining space partition in the dynamic partition according to the data access instruction.
[0082] For example, the terminal device also includes a user data partition. When the fourth current remaining space of the user data partition is less than or equal to the fourth space threshold, that is, the fourth current remaining space of the user data partition is relatively small, in order to prevent the fourth current remaining space of the user data partition from being insufficient, data access operations can be performed on the remaining space partition in the dynamic partition according to the data access instruction.
[0083] In this technical solution, data access operations can not be performed on the remaining space partition in the dynamic partition under all circumstances. Data access operations are only performed on the remaining space partition in the dynamic partition when the remaining space in the fourth user data partition is insufficient, based on data access instructions. This is because the remaining space partition in the dynamic partition provides data read and write capabilities, which can expand user storage space and thus save system resources.
[0084] Optionally, in some possible implementations, the terminal device further includes a user data partition; the step of performing data access operation on the target partition according to the data access instruction may include: when the fourth current remaining space of the user data partition is less than or equal to the fourth space threshold, enabling the data access function of the target partition according to the data access instruction, and performing data access operation on the target partition.
[0085] For example, the terminal device also includes a user data partition. When the fourth current remaining space of the user data partition is less than or equal to the fourth space threshold, that is, the fourth current remaining space of the user data partition is relatively small, in order to prevent the fourth current remaining space of the user data partition from being insufficient, the data access function of the target partition (i.e., the dynamic partition) can be enabled according to the data access instruction, and data access operation can be performed on the target partition (i.e., the dynamic partition).
[0086] In this technical solution, data access operations can not be performed on the target partition (i.e., the dynamic partition) under all circumstances. Only when the remaining space in the user data partition is insufficient will the data access function of the target partition (i.e., the dynamic partition) be activated according to the data access command, allowing data access operations to be performed on the target partition (i.e., the dynamic partition). This ensures that the target partition (i.e., the dynamic partition) has sufficient space for application version upgrades to the greatest extent possible.
[0087] Optionally, in some possible implementations, the target partition includes the remaining space partition in the dynamic partition, wherein the remaining space partition is the partition corresponding to the current remaining space in the dynamic partition; the terminal device further includes a user data partition; the step of performing data access operation on the target partition according to the data access instruction may include: when the fourth current remaining space of the user data partition is less than or equal to the fourth space threshold, according to the data access instruction, enabling the data access function of the target partition including the remaining space partition in the dynamic partition, and performing data access operation on the target partition including the remaining space partition in the dynamic partition.
[0088] For example, the terminal device also includes a user data partition. When the fourth current remaining space of the user data partition is less than or equal to the fourth space threshold, that is, the fourth current remaining space of the user data partition is relatively small, in order to prevent the fourth current remaining space of the user data partition from being insufficient, the data access function of the remaining space partition in the dynamic partition can be enabled according to the data access instruction, and the data access operation of the remaining space partition in the dynamic partition can be performed.
[0089] In this technical solution, data access operations can not be performed on the remaining space partition in the dynamic partition under all circumstances. Instead, data access to the remaining space partition in the dynamic partition is only enabled based on a data access command when the remaining space in the user data partition is insufficient. This is because the remaining space partition in the dynamic partition provides data read and write capabilities, which can expand user storage space and thus save system resources.
[0090] The embodiments of this application can maximize the utilization of dynamic partitions, or the remaining space partitions in dynamic partitions, throughout their lifecycle (LMT), while also saving user storage space as much as possible, maximizing the actual usable storage space for users, thereby improving user storage space and enhancing user experience.
[0091] In this embodiment, a data access instruction is detected; according to the data access instruction, a data access operation is performed on the target partition, which includes a dynamic partition in the terminal device. This is used to perform data access operations on the physical partition in the terminal device used for application version upgrades, thereby expanding user storage space and saving system resources.
[0092] like Figure 4 The diagram shown is a schematic representation of another embodiment of the physical partition access method in this application. The method is applied to a terminal device and may include:
[0093] 401. A data access command has been detected.
[0094] 402. Perform data access operations on the target partition according to the data access instruction, wherein the target partition includes the dynamic partition in the terminal device.
[0095] It should be noted that steps 401-402 and Figure 2 Steps 101-102 in the illustrated embodiment are similar and will not be repeated here.
[0096] 403. In the case of upgrading the target application, the current data corresponding to the target partition is migrated to the user data partition, and the terminal device further includes the user data partition.
[0097] Optionally, in some possible implementations, the step of migrating the current data corresponding to the target partition to the user data partition when upgrading the target application may include: migrating the current data corresponding to the target partition to the user data partition when upgrading the target application and the first current remaining space of the target partition is less than a first space threshold; or upgrading the target application when upgrading the target application and the first current remaining space of the target partition is greater than or equal to the first space threshold.
[0098] For example, the target partition includes a dynamic partition in the terminal device. When upgrading the target application, if the first current remaining space of the dynamic partition is less than a first space threshold, it indicates that the first current remaining space of the dynamic partition is relatively small. To prevent insufficient space during the upgrade process, the current data corresponding to the dynamic partition needs to be migrated to the user data partition. Here, the first current remaining space of the dynamic partition can be understood as the remaining space after data access in the dynamic partition, as described above. When upgrading the target application, if the first current remaining space of the dynamic partition is greater than or equal to the first space threshold, it indicates that the first current remaining space of the dynamic partition is relatively large, sufficient, and the target application can be directly upgraded.
[0099] For example, the target partition includes the remaining space partition in the dynamic partition, where the remaining space partition is the partition corresponding to the current remaining space in the dynamic partition. When upgrading the target application, if the first current remaining space of the remaining space partition in the dynamic partition is less than a first space threshold, it indicates that the first current remaining space of the remaining space partition in the dynamic partition is relatively small. To prevent insufficient space during the target application upgrade process, the current data corresponding to the remaining space partition in the dynamic partition needs to be migrated to the user data partition. Here, the first current remaining space of the remaining space partition in the dynamic partition can be understood as the remaining space after data access in the remaining space partition in the dynamic partition mentioned above. When upgrading the target application, if the first current remaining space of the remaining space partition in the dynamic partition is greater than or equal to the first space threshold, it indicates that the first current remaining space of the remaining space partition in the dynamic partition is relatively large, and there is sufficient space, allowing for a direct upgrade of the target application.
[0100] In this technical solution, in order to prevent the target application from running out of space during version upgrades, if the first remaining space of the target partition is less than the first space threshold, the current data corresponding to the target partition needs to be migrated to the user data partition.
[0101] 404. After the version upgrade of the target application is completed, the current data is migrated from the user data partition to the target partition.
[0102] Optionally, in some possible implementations, the current data is the second target data in the data corresponding to the target partition, and the priority of the second target data is higher than the priority of other data in the data corresponding to the target partition.
[0103] For example, the data corresponding to the target partition can be the data corresponding to the dynamic partition. The data corresponding to the dynamic partition includes the data corresponding to the currently occupied space and the data corresponding to the currently remaining space. The current data can be the data with higher priority from the data corresponding to the currently occupied space and the data corresponding to the currently remaining space, which will be migrated to the user data partition, while the data with lower priority may not be migrated to the user data partition.
[0104] Optionally, the data corresponding to the target partition can be the data corresponding to the remaining space partition in the dynamic partition, where the remaining space partition is the partition corresponding to the current remaining space in the dynamic partition. The current data can be the data with higher priority in the data corresponding to the remaining space partition, which will be migrated to the user data partition, while the data with lower priority in the data corresponding to the remaining space partition may not be migrated to the user data partition.
[0105] This technical solution provides a detailed description of the current data being migrated to the user data partition, thus improving the feasibility of the solution.
[0106] Optionally, in some possible implementations, migrating the current data from the user data partition to the target partition after the version upgrade of the target application is completed may include:
[0107] After the target application has been upgraded, determine the second current remaining space of the target partition;
[0108] If the second remaining space is greater than the second space threshold, the current data is migrated from the user data partition to the target partition; or,
[0109] If the second current remaining space is greater than the third space threshold and less than or equal to the second space threshold, the first target data in the current data is migrated from the user data partition to the target partition, and the priority of the first target data is greater than the priority of other data in the current data.
[0110] Optionally, in some possible implementations, the method may further include: determining a second current remaining space of the target partition after the version upgrade of the target application is completed; and not performing the step of migrating the current data from the user data partition to the target partition if the second current remaining space is less than or equal to a third space threshold.
[0111] For example, after the target application is upgraded, the second current remaining space of the target partition can be detected and determined. The second current remaining space can be understood as the remaining space of the dynamic partition after the target application is upgraded.
[0112] When the second remaining space is greater than the second space threshold, it indicates that the second remaining space of the dynamic partition is relatively large. In this case, all current data migrated to the user data partition before the version upgrade can be migrated back to the dynamic partition. When the second remaining space is greater than the third space threshold but less than or equal to the second space threshold, it indicates that the second remaining space of the dynamic partition is neither too large nor too small. In this case, the highest priority target data among the current data migrated to the user data partition before the version upgrade can be migrated back to the dynamic partition, while other data with lower priority in the current data will not be migrated back to the dynamic partition. When the second remaining space is less than or equal to the third space threshold, it indicates that the second remaining space of the dynamic partition is very small. In this case, no current data will be migrated back to the dynamic partition.
[0113] Optionally, after the target application is upgraded, the second current remaining space of the target partition can be detected and determined. This second current remaining space can also be understood as the remaining space partition in the dynamic partition, which is the remaining space after the target application is upgraded.
[0114] When the second current remaining space is greater than the second space threshold, it indicates that the second current remaining space of the dynamic partition is relatively large. In this case, all current data migrated to the user data partition before the version upgrade can be migrated back to the remaining space partition of the dynamic partition. When the second current remaining space is greater than the third space threshold but less than or equal to the second space threshold, it indicates that the second current remaining space of the dynamic partition is neither too large nor too small. In this case, the highest priority target data among the current data migrated to the user data partition before the version upgrade can be migrated back to the remaining space partition of the dynamic partition, while other data with lower priority in the current data will not be migrated back to the remaining space partition of the dynamic partition. When the second current remaining space is less than or equal to the third space threshold, it indicates that the second current remaining space of the dynamic partition is very small. In this case, no current data will be migrated back to the remaining space partition of the dynamic partition.
[0115] In OTA upgrade scenarios, before entering the OTA upgrade process, the first functional module needs to migrate the data from the target partition to the user data partition. This is to ensure sufficient remaining space to store the OTA upgrade package. After the OTA upgrade is complete, the first functional module then migrates any necessary data back to the target partition. For example... Figure 5 The diagram shown is a schematic diagram of the control of the target partition in the OTA upgrade scenario in an embodiment of this application.
[0116] In this technical solution, after the target application has been upgraded, the second current remaining space of the target partition can be determined. Based on the size of the second current remaining space, it can be decided whether to migrate all the current data back to the target partition, thereby maximizing the utilization of the target partition.
[0117] In this embodiment, a data access instruction is detected; according to the data access instruction, a data access operation is performed on the target partition, which includes a dynamic partition in the terminal device; when upgrading the target application, the current data corresponding to the target partition is migrated to the user data partition, which also includes the terminal device; when the target application upgrade is completed, the current data is migrated from the user data partition to the target partition. This is used to perform data access operations on the physical partition in the terminal device used for application version upgrades according to the data access instruction, thereby expanding user storage space and saving system resources. Furthermore, the target application version can also be upgraded based on a second current remaining space in the target partition, thereby improving the space utilization of the target partition.
[0118] like Figure 6 The diagram shown is a schematic representation of another embodiment of the physical partition access method in this application. The method is applied to a terminal device and may include:
[0119] 601. A data access command was detected.
[0120] 602. Perform data access operations on the target partition according to the data access instruction, wherein the target partition includes the dynamic partition and the user data partition in the terminal device.
[0121] In this technical solution, the dynamic (super) partition and the entire user data (userdata) partition can be centrally managed. Therefore, the target partition includes not only the dynamic partition in the terminal device but also the user data partition in the terminal device. After detecting a data access command, data access operations can be performed on the target partition according to the data access command.
[0122] 603. When upgrading the target application, and the third current remaining space of the target partition is greater than or equal to the first space threshold, upgrade the target application.
[0123] For example, when upgrading a target application, if the third current remaining space of the target partition is greater than or equal to the first space threshold, it means that the third current remaining space of the target partition is relatively large and there is enough space, so the target application can be upgraded directly.
[0124] 604. When upgrading the target application and the third remaining space of the target partition is less than the first space threshold, output a prompt message to indicate that there is insufficient remaining space and to clean up the space; when the fourth remaining space after cleaning up the space is greater than or equal to the first space threshold, upgrade the target application.
[0125] For example, when upgrading a target application, if the third current remaining space of the target partition is less than the first space threshold, it indicates that the first current remaining space of the target partition is relatively small. To prevent insufficient space during the upgrade process, a prompt message is output, reminding the user that there is insufficient remaining space and space needs to be cleared. After clearing the space, if the fourth remaining space after clearing is greater than or equal to the first space threshold, it indicates that the fourth current remaining space of the target partition is relatively large and sufficient, allowing the target application to be upgraded.
[0126] In this embodiment, a data access instruction is detected; according to the data access instruction, a data access operation is performed on the target partition, which includes a dynamic partition and a user data partition in the terminal device; if a version upgrade of the target application is performed and the third current remaining space of the target partition is greater than or equal to a first space threshold, the target application is upgraded; if a version upgrade of the target application is performed and the third current remaining space of the target partition is less than the first space threshold, a prompt message is output, indicating insufficient remaining space and requesting space cleanup; if a fourth remaining space after space cleanup is detected to be greater than or equal to the first space threshold, the target application is upgraded. This is used to perform data access operations on the physical partition in the terminal device used for application version upgrades according to the data access instruction, thereby expanding user storage space and saving system resources. Furthermore, the target application version upgrade can also be performed based on the third current remaining space of the target partition, thereby improving the space utilization rate of the target partition.
[0127] like Figure 7 The diagram shown is a schematic representation of an embodiment of a physical partition access device in this application. The device is applied to a terminal device and may include:
[0128] Detection module 701 is used to detect data access commands;
[0129] Access module 702 is used to perform data access operations on a target partition according to the data access instruction, wherein the target partition includes a dynamic partition in the terminal device.
[0130] Optionally, in some possible implementations, the data access instruction includes a read data instruction or a write data instruction; the access module 702 is specifically used to perform a read data operation on the target partition according to the read data instruction; or,
[0131] Access module 702 is specifically used to perform write data operations on the target partition according to the write data instruction.
[0132] Optionally, in some possible implementations, the terminal device further includes a user data partition; the physical partition access device further includes a migration module 703.
[0133] The migration module 703 is specifically used to migrate the current data corresponding to the target partition to the user data partition when the target application is upgraded; and to migrate the current data from the user data partition to the target partition when the target application has been upgraded.
[0134] Optionally, in some possible implementations, the migration module 703 is specifically used to migrate the current data corresponding to the target partition to the user data partition when the target application is upgraded and the first current remaining space of the target partition is less than a first space threshold.
[0135] Optionally, in some possible implementations, the migration module 703 is specifically used to determine the second current remaining space of the target partition after the version upgrade of the target application is completed; if the second current remaining space is greater than the second space threshold, migrate the current data from the user data partition to the target partition; or, if the second current remaining space is greater than the third space threshold and less than or equal to the second space threshold, migrate the first target data in the current data from the user data partition to the target partition, wherein the priority of the first target data is greater than the priority of other data in the current data.
[0136] Optionally, in some possible implementations, the migration module 703 is specifically used to determine the second current remaining space of the target partition after the version upgrade of the target application is completed; if the second current remaining space is less than or equal to the third space threshold, the step of migrating the current data from the user data partition to the target partition is not performed.
[0137] Optionally, in some possible implementations, the current data is the second target data in the data corresponding to the target partition, and the priority of the second target data is higher than the priority of other data in the data corresponding to the target partition.
[0138] Optionally, in some possible implementations, the target partition may also include a user data partition in the terminal device.
[0139] Optionally, in some possible implementations, the physical partition access device may also include upgrade module 704;
[0140] Upgrade module 704 is configured to upgrade the target application when the target application is being upgraded and the third current remaining space of the target partition is greater than or equal to the first space threshold; or,
[0141] The upgrade module 704 is used to output a prompt message when upgrading the target application and the third current remaining space of the target partition is less than the first space threshold. The prompt message is used to indicate that there is insufficient remaining space and to clean up the space. When the fourth remaining space after cleaning up the space is greater than or equal to the first space threshold, the upgrade module 704 is used to upgrade the target application.
[0142] like Figure 8 The diagram shown is a schematic representation of an embodiment of the terminal device described in this application, which may include, for example: Figure 7 The physical partition access device shown.
[0143] like Figure 9 The diagram shown is a schematic diagram of another embodiment of the terminal device in this application. The following is in conjunction with... Figure 9 A detailed introduction to the various components of a mobile phone in a terminal device:
[0144] The RF circuit 910 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 980; additionally, it transmits uplink data to the base station. Typically, the RF circuit 910 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, the RF circuit 910 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, and Short Messaging Service (SMS).
[0145] The memory 920 can be used to store software programs and modules. The processor 980 executes various functions and data processing of the mobile phone by running the software programs and modules stored in the memory 920. The memory 920 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 920 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0146] The input unit 930 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 931), and drive the corresponding connected devices according to a pre-set program. Optionally, the touch panel 931 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 980, and can also receive and execute commands sent by the processor 980. In addition, the touch panel 931 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 931, the input unit 930 may also include other input devices 932. Specifically, other input devices 932 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0147] The display unit 940 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 940 may include a display panel 941, which may optionally be configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display. Further, a touch panel 931 may cover the display panel 941. When the touch panel 931 detects a touch operation on or near it, it transmits the information to the processor 980 to determine the type of touch event. Subsequently, the processor 980 provides corresponding visual output on the display panel 941 based on the type of touch event. Although in Figure 9 In this embodiment, the touch panel 931 and the display panel 941 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 931 and the display panel 941 can be integrated to realize the input and output functions of the mobile phone.
[0148] The mobile phone may also include at least one sensor 950, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 941 according to the ambient light level, and the proximity sensor can turn off the display panel 941 and / or backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity, which can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, taps), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0149] Audio circuit 960, speaker 961, and microphone 962 provide an audio interface between the user and the mobile phone. Audio circuit 960 converts received audio data into electrical signals and transmits them to speaker 961, where speaker 961 converts them into sound signals for output. On the other hand, microphone 962 converts collected sound signals into electrical signals, which are received by audio circuit 960, converted into audio data, and then processed by processor 980 before being transmitted via RF circuit 910 to, for example, another mobile phone, or the audio data can be output to memory 920 for further processing.
[0150] Wi-Fi is a short-range wireless transmission technology. Through the Wi-Fi module 970, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 9 The Wi-Fi module 970 is shown, but it is understood that it is not an essential component of a mobile phone and can be omitted as needed without changing the essence of the invention.
[0151] The processor 980 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes software programs and / or modules stored in the memory 920, and calls data stored in the memory 920 to perform various functions and process data, thereby providing overall monitoring of the phone. Optionally, the processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 980.
[0152] The mobile phone also includes a power supply 990 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 980 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0153] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be described in detail here.
[0154] In this embodiment, the processor 980 is configured to detect a data access instruction and, according to the data access instruction, perform a data access operation on a target partition, wherein the target partition includes a dynamic partition in the terminal device.
[0155] Optionally, in some possible implementations, the data access instructions include read data instructions or write data instructions; the processor 980 is specifically configured to perform read data operations on the target partition according to the read data instructions; or...
[0156] The processor 980 is specifically used to perform write data operations on the target partition according to the write data instruction.
[0157] Optionally, in some possible implementations, the terminal device may further include a user data partition;
[0158] The processor 980 is specifically configured to migrate the current data corresponding to the target partition to the user data partition when upgrading the target application; and to migrate the current data from the user data partition to the target partition after the upgrade of the target application is completed.
[0159] Optionally, in some possible implementations, the processor 980 is specifically configured to migrate the current data corresponding to the target partition to the user data partition when the target application is being upgraded and the first current remaining space of the target partition is less than a first space threshold.
[0160] Optionally, in some possible implementations, the processor 980 is specifically configured to, upon completion of a version upgrade of the target application, determine a second current remaining space of the target partition; if the second current remaining space is greater than a second space threshold, migrate the current data from the user data partition to the target partition; or, if the second current remaining space is greater than a third space threshold and less than or equal to the second space threshold, migrate a first target data in the current data from the user data partition to the target partition, wherein the priority of the first target data is greater than the priority of other data in the current data.
[0161] Optionally, in some possible implementations, the processor 980 is specifically configured to, upon completion of a version upgrade of the target application, determine a second current remaining space of the target partition; and if the second current remaining space is less than or equal to a third space threshold, not perform the step of migrating the current data from the user data partition to the target partition.
[0162] Optionally, in some possible implementations, the current data is the second target data in the data corresponding to the target partition, and the priority of the second target data is higher than the priority of other data in the data corresponding to the target partition.
[0163] Optionally, in some possible implementations, the target partition may also include a user data partition in the terminal device.
[0164] Optionally, in some possible implementations, the processor 980 is configured to upgrade the target application when the target application is being upgraded and the third current remaining space of the target partition is greater than or equal to the first space threshold; or,
[0165] The processor 980 is configured to, when upgrading a target application and the third current remaining space of the target partition is less than the first space threshold, output a prompt message indicating insufficient remaining space and requesting space cleanup; and when a fourth remaining space after space cleanup is detected to be greater than or equal to the first space threshold, upgrade the target application.
[0166] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0167] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0168] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0169] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0170] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0171] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0172] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for accessing a physical partition, characterized in that, The method is applied to a terminal device, and the method includes: Data access command detected; According to the data access instruction, a data access operation is performed on the target partition, which includes a dynamic partition in the terminal device.
2. The method according to claim 1, characterized in that, The data access instructions include read data instructions or write data instructions; the step of performing data access operations on the target partition according to the data access instructions includes: Perform a data read operation on the target partition according to the read data instruction; or, According to the write data instruction, a write data operation is performed on the target partition.
3. The method according to claim 1 or 2, characterized in that, The terminal device further includes a user data partition; the method further includes: In the event of a version upgrade of the target application, the current data corresponding to the target partition will be migrated to the user data partition; Once the version upgrade of the target application is completed, the current data is migrated from the user data partition to the target partition.
4. The method according to claim 3, characterized in that, The step of migrating the current data corresponding to the target partition to the user data partition when upgrading the target application includes: If the target application is upgraded and the first current remaining space of the target partition is less than the first space threshold, the current data corresponding to the target partition is migrated to the user data partition.
5. The method according to claim 3, characterized in that, The step of migrating the current data from the user data partition to the target partition after the version upgrade of the target application is completed includes: After the target application has been upgraded, determine the second current remaining space of the target partition; If the second remaining space is greater than the second space threshold, the current data is migrated from the user data partition to the target partition; or, If the second current remaining space is greater than the third space threshold and less than or equal to the second space threshold, the first target data in the current data is migrated from the user data partition to the target partition, and the priority of the first target data is greater than the priority of other data in the current data.
6. The method according to claim 3, characterized in that, The method further includes: After the target application has been upgraded, determine the second current remaining space of the target partition; If the second current remaining space is less than or equal to the third space threshold, the step of migrating the current data from the user data partition to the target partition is not performed.
7. The method according to claim 3, characterized in that, The current data is the second target data in the data corresponding to the target partition, and the priority of the second target data is higher than the priority of other data in the data corresponding to the target partition.
8. The method according to claim 1 or 2, characterized in that, The target partition also includes the user data partition in the terminal device.
9. The method according to claim 8, characterized in that, The method further includes: If the target application is upgraded and the third current remaining space of the target partition is greater than or equal to the first space threshold, then the target application is upgraded; or, If the target application is upgraded and the third remaining space of the target partition is less than the first space threshold, a prompt message is output to indicate that there is insufficient remaining space and to clean up the space. If the fourth remaining space after cleaning up the space is greater than or equal to the first space threshold, the target application is upgraded.
10. A physical partition access device, characterized in that, The device is used in a terminal device, and the device includes: The detection module is used to detect data access commands; The access module is used to perform data access operations on the target partition according to the data access instruction, wherein the target partition includes the dynamic partition in the terminal device.
11. A terminal device, characterized in that, The device includes a memory and a processor, as well as a transceiver, wherein the memory stores a computer program that can run on the processor, and the terminal device executes the program to implement the method of any one of claims 1-9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1-9.