WO2024022176A1 - 一种系统运行方法与终端装置 - Google Patents

一种系统运行方法与终端装置 Download PDF

Info

Publication number
WO2024022176A1
WO2024022176A1 PCT/CN2023/107987 CN2023107987W WO2024022176A1 WO 2024022176 A1 WO2024022176 A1 WO 2024022176A1 CN 2023107987 W CN2023107987 W CN 2023107987W WO 2024022176 A1 WO2024022176 A1 WO 2024022176A1
Authority
WO
WIPO (PCT)
Prior art keywords
partition
partitions
partition table
terminal device
patch
Prior art date
Application number
PCT/CN2023/107987
Other languages
English (en)
French (fr)
Inventor
任文杰
尹永宏
王超
陈磊
金波
李英伟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024022176A1 publication Critical patent/WO2024022176A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Definitions

  • the present application relates to the field of electronic technology, and in particular, to a system operating method and a terminal device.
  • A/B upgrade is an upgrade method proposed to achieve seamless upgrade.
  • the terminal device includes side A and side B, which can correspond to different versions of the same operating system.
  • side A corresponds to Lower version, corresponding to side B High version.
  • switching from side A to side B can be upgraded without affecting the normal use of users, that is, seamless upgrade.
  • a terminal device stores a partition table for side A and a partition table for side B.
  • the side A partition table stores information about partitions included in side A
  • the side B partition table stores information about partitions included in side B.
  • the partitions on side A do not overlap with the partitions on side B.
  • the terminal device runs on side A based on the partition table on side A, and runs on side B based on the partition table on side B.
  • the A-side partition table and the B-side partition table have been written into the terminal device before the terminal device leaves the factory. They are uneditable and unchangeable, and have poor flexibility, which is not conducive to subsequent software upgrades and optimizations of the terminal device.
  • the purpose of this application is to provide a system operation method and terminal device to improve the convenience and flexibility of system upgrade.
  • a system operation method is provided, which is applied to a terminal device.
  • the terminal device includes N partitions, N is a positive integer, and different partitions are storage areas used to store different functional data in the terminal device, so
  • the method includes: obtaining a first partition table, the first partition table includes information of at least one partition among the N partitions, and the first partition table is updateable; according to the latest first partition table, Reading data stored in the at least one partition; and running an operating system of the terminal device based on the data.
  • the terminal device has an updateable partition table, and the partition table includes information on at least one partition among the N partitions.
  • the partition table before the update includes information from partition 1 to partition 3
  • the partition table after the update includes information from partition 4 to partition 6.
  • the partition table is not fixed and cannot be updated or edited, and is highly flexible, which is conducive to subsequent software upgrades and optimizations of the terminal device.
  • the first partition table may be updated, including: the partitions included in the first partition table before and after the update are combinations of different partitions among the N partitions.
  • the first partition table can be flexibly changed and can be a flexible combination of different partitions among N partitions.
  • N partitions include partitions 1 to 6
  • the first partition table before updating includes information about partitions 1 to 3
  • the first partition table after updating includes information about partitions 4 to 6.
  • the partition table is divided into side A and side B.
  • the partition table of side A only includes the partition information of side A
  • the partition table of side B only includes side B.
  • the partition information on side A and side B partition table cannot be updated or edited.
  • the partition table is fixed.
  • the partition table can be updated and can be a combination of different partitions among N partitions, which is more flexible and more convenient for subsequent system optimization and upgrade of the terminal device.
  • the terminal device supports a first operating system and a second operating system; wherein the terminal device runs on the first operating system based on a first group of partitions among the N partitions, The terminal device runs the second operating system based on a second group of partitions among the N partitions, and the first group of partitions and the second group of partitions do not overlap.
  • the N partitions include a first group of partitions and a second group of partitions, wherein the terminal device is in the first operating system when the first group of partitions are run, and the terminal device is in the second operating system when the second group of partitions are run.
  • the first set of partitions is a partition on side A, and the terminal device is on side A when running the first set of partitions;
  • the second set of partitions is a partition on side B, and the terminal device is on side B when running the second set of partitions.
  • the N partitions may include partitions on side A or partitions on side B, and the first partition table includes information about at least one partition among the N partitions, then the first partition table may include A
  • the combination of surface partitioning and B-side partitioning is more flexible than the current partition table.
  • the first operating system and the second operating system correspond to different operating systems or different versions of the same operating system.
  • the first operation The system is for example Lower versions (e.g. 1.0)
  • the second operating system is for example higher versions (e.g. 2.0).
  • the first partition table includes information about at least one partition in the first group of partitions, and information about at least one partition in the second group of partitions. Therefore, continue to take the example that the first group of partitions is the partition of side A, and the second group of partitions is the partition of side B. That is, the N partitions include both the partitions of side A and the partitions of side B, and the first group of partitions is the partition of side B.
  • the partition table includes the partitions on side A and the partitions on side B.
  • the partition table on side A only includes information about side A partitions
  • the partition table on side B only includes information about side B partitions
  • the side A partition table Neither the partition table on side A nor the partition table on side B can be updated or edited.
  • the first partition table may include side A partitions and side B partitions to realize flexible combination of partitions in different operating systems. In this way, when the terminal device needs system upgrade, the upgrade efficiency can be improved.
  • a higher version operating system eg, side B
  • a lower version operating system eg, side A
  • the side A partition table and the side B partition table are independent and cannot be updated, even if only one partition of the side B partition table is upgraded compared to the side A partition table, it still needs to be upgraded from The side A partition table is completely switched to the side B partition table, which means that all partitions on side B need to be reloaded, which is inefficient.
  • the first partition table since the first partition table is updateable and editable, the first partition table can be composed of partitions on side A and partitions on side B (partitions upgraded relative to side A).
  • the first partition table includes the data storage address of each partition; the method also includes: downloading an upgrade package, the upgrade package being used to update the first partition among the N partitions Upgrade; store the upgrade package and record the storage address of the upgrade package; update the current storage address of the first partition in the first partition table according to the storage address. That is to say, in the embodiment of the present application, since the first partition table is updateable, when the terminal device upgrades the first partition, the current storage address of the first partition in the first partition table (updatable table) can be updated. is the storage address of the upgrade package (the upgrade package that upgrades the first partition). In this case, when the terminal device runs based on the updated first partition table, the first partition is upgraded. This upgrade method improves the system upgrade. the convenience.
  • the upgrade package includes an installation package of the first application; the method further includes: installing the first application based on the installation package, and setting an identifier for the first application, The mark is used to mark that the first application is an application installed when the first partition is upgraded; wherein the mark is used to delete the mark by identifying the mark on the application when the first partition is rolled back.
  • the first application that is to say, in this embodiment of the present application, when the terminal device upgrades the first partition, if an application is downloaded, a mark is set for the application.
  • the function of the mark is: if the first partition needs to be rolled back (for example, the upgrade fails or the user Actively triggering rollback), by identifying the mark, deleting the application can quickly restore it to its original state, that is, the rollback can be completed quickly, and during rollback, applications will not be missed or mistakenly deleted, and the accuracy is high. .
  • the method further includes: storing the rollback package of the first component in the free space corresponding to the second partition in the first partition table, and the first component is not one of the N partitions.
  • a component of any partition in the first partition table, and the second partition is a partition other than the first partition in the first partition table; wherein the rollback package of the first component is used to complete the upgrade of the terminal device. Then perform a rollback of the first component.
  • the terminal device can store the rollback package of the first component (for example, the component that does not support A/B upgrade) in the free storage of the partition that does not need to be upgraded (for example, the second partition) In the area, when the first component needs to be rolled back, the rollback package is read from the free storage space and rolled back. It should be noted that at present, when the system is upgraded, the rollback package of components that do not support A/B upgrade will be deleted. When rolling back, the rollback package is downloaded from the network, which is a waste of transmission resources.
  • the first component for example, the component that does not support A/B upgrade
  • the partition that does not need to be upgraded for example, the second partition
  • the free storage space of the partition that is not upgraded is utilized, that is, the rollback packages of these components are stored in the free storage area of the partition that is not upgraded, and the rollback package is read from the free storage space during rollback.
  • the rollback package is read from the free storage space during rollback.
  • the first partition table includes the data storage address of each partition; the method also includes: downloading an upgrade package, the upgrade package being used to update the third partition among the N partitions and the fourth partition are upgraded respectively, and the priority of the third partition is higher than that of the fourth partition; the upgrade package is stored, and the storage address of the upgrade package is recorded; according to the storage address, the third partition is upgraded.
  • the current storage address of the third partition in a partition table is updated.
  • N partitions include system partition 1 and system partition 2.
  • system partition 1 is version 1.0
  • system partition 2 is version 2.0.
  • the upgrade package includes the system partition of version 3.0. Then the terminal device can use the upgrade package to upgrade the partition with higher priority among system partition 1 and system partition 2.
  • the third partition has a higher priority than the fourth partition, including at least one of the following:
  • the fourth partition is in use; or,
  • the terminal device can use the upgrade package to upgrade the partition with higher priority among system partition 1 and system partition 2. Before that, it needs to determine which one of system partition 1 and system partition 2 has higher priority. For example, if system partition 1 is unused and system partition 2 is in use, system partition 1 has a higher priority. In this way, the unused partition can be upgraded first to avoid business interruption caused by upgrading the partition in use. . For another example, if the version of system partition 1 is lower than the version of system partition 2, the priority of system partition 1 is higher than that of system partition 2, that is, the partition with a lower version will be upgraded first to ensure that the lower version is updated in time. For another example, if the usage frequency of system partition 1 is lower than that of system partition 2, then the priority of system partition 1 is higher than that of system partition 2. That is, the partition with lower usage frequency will be upgraded first to increase the usage rate.
  • the first partition table is stored by default when the terminal device leaves the factory. It should be noted that the partition table configured when the terminal device leaves the factory is not updateable or editable. In the embodiment of the present application, the partition table configured when the terminal device leaves the factory is updateable and can include one or more of N partitions. Information from multiple partitions is more flexible.
  • the first partition table is stored in an application layer, a framework layer or a kernel layer in the terminal device.
  • the partition table (including side A partition table and side B partition table) is stored in the kernel layer of the terminal device and cannot be edited.
  • the first partition table can be stored in any layer among the application layer, framework layer, system layer or kernel layer, which is more flexible. Taking storage in the kernel layer as an example, generally the information in the kernel layer is not visible to the upper layers (application layer, system layer, framework layer, etc.), so when the first partition table is stored in the kernel layer, the confidentiality is better and the security is better. high.
  • the kernel layer Take storage on the upper side of the kernel layer (such as the application layer, framework layer, and system layer) as an example. Since the upper layer of the kernel layer has a higher business correlation with the terminal device (for example, the application layer includes various applications, when an application When running a certain business, the software module in the system layer is called through the API interface in the framework layer, and then the underlying hardware is called to implement the business). Therefore, the upper layer can update the first partition table according to business needs. In this way, the first partition table The flexibility is higher, and the updated first partition table is more suitable for users' business needs.
  • obtaining the first partition table includes: reading a second partition table, the second partition table is a partition table stored by default when the terminal device leaves the factory, and the second partition table The table cannot be edited, and the second partition table includes the current storage address of the data of the fifth partition; download an upgrade package, which is used to upgrade the fifth partition; record the third partition table, and the third The partition table includes the storage address of the upgrade package of the fifth partition; the first partition table is formed according to the combination of the third partition table and the second partition table, and the first partition table is in the The storage address of the upgrade package in the third partition table is superimposed on the current storage address of the fifth partition in the second partition table.
  • the terminal device is configured with the second partition table (ie, the A-side partition table and/or the B-side partition table described in the background art) when it leaves the factory, and the terminal device can combine the second partition table and the third partition table (record The storage address of the upgrade package) is combined to form a first partition table, and the first partition table is used to run the operating system. Since the first partition table can be updated, subsequent system upgrade or optimization of the terminal device is facilitated.
  • the second partition table ie, the A-side partition table and/or the B-side partition table described in the background art
  • superimposing the storage address of the upgrade package in the third partition table on the upper layer of the current storage address of the fifth partition in the second partition table includes: determining the third partition table.
  • the file node corresponding to the fifth partition in the second partition table, the file node can access the data stored in the current storage address of the fifth partition; establish the file node and the third partition table.
  • the association between the storage addresses of the upgrade package enables the upgrade package to be accessed through the file node. That is to say, the terminal device can establish an association between the file node corresponding to the fifth partition in the second partition table and the storage address of the upgrade package (upgrade package for upgrading the fifth partition) in the third partition table.
  • the second partition table and the third partition table are combined to form the first partition table. Since the first partition table can be updated, subsequent system upgrade or optimization of the terminal device is facilitated.
  • the method further includes: determining that a second application in the terminal device needs to access data stored in a sixth partition in the first partition table; determining whether the second application has the Access rights to the first partition table; when it is determined that the first application has access rights to the first partition table, allowing the second application to access data stored in the sixth partition based on the first partition table . That is to say, the first partition table is set with access permissions, and applications with access permissions can access the stored data in the partitions in the first partition table. Otherwise, access is inaccessible. In this way, data security can be improved and data in the partitions can be avoided from being leaked. .
  • the N partitions include: at least one of a system partition, a custom partition, a Version partition, a Product partition, and a Patch partition. It should be noted that several examples of partitions are listed here. In fact, other partitions can also be used, which are not limited by the embodiments of this application.
  • a terminal device including:
  • processor memory, and, one or more programs
  • the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the processor, cause the terminal device to execute the first aspect as described above. the method described.
  • a terminal device including:
  • An acquisition unit configured to acquire a first partition table, which includes information on at least one partition among the N partitions in the terminal device, and the first partition table is updateable; among the N partitions Different partitions are storage areas used to store different function data in the terminal device, and N is a positive integer;
  • a processing unit configured to read data stored in the at least one partition according to the latest first partition table, and run an operating system of the terminal device based on the data.
  • a computer-readable storage medium is also provided.
  • the computer-readable storage medium is used to store a computer program.
  • the computer program When the computer program is run on a computer, it causes the computer to execute as described in the first aspect. Methods.
  • a computer program product including a computer program, which when the computer program is run on a computer, causes the computer to execute the method described in the first aspect.
  • embodiments of the present application further provide a chip, which is coupled to a memory in an electronic device and used to call a computer program stored in the memory and execute the technical solution of the first aspect of the embodiment of the present application.
  • the present application implements In this example, "coupled” means that two components are combined with each other, either directly or indirectly.
  • Figure 1 is a schematic diagram of the hardware structure of a terminal device provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of the software structure of a terminal device provided by an embodiment of the present application.
  • Figure 3 is a schematic diagram of a system partition of a terminal device provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of an upgrade method provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of an upgrade method provided by an embodiment of the present application.
  • Figure 6 is a schematic diagram of another upgrade method provided by an embodiment of the present application.
  • Figure 7 is a schematic diagram of a combination of partition tables provided by an embodiment of the present application.
  • Figure 8 is a schematic comparison diagram before and after the upgrade provided by an embodiment of the present application.
  • FIGS. 9A to 9B are schematic diagrams of file nodes and partitions in a terminal device provided by an embodiment of the present application.
  • FIGS 10 to 11 are schematic diagrams of file nodes provided by an embodiment of the present application.
  • Figure 12 is a schematic diagram of a rollback process provided by an embodiment of the present application.
  • Figure 13 is a schematic diagram of a vehicle-machine system provided by an embodiment of the present application.
  • Figure 14 is a schematic diagram of the software structure of a vehicle engine provided by an embodiment of the present application.
  • Figures 15 to 16 are schematic diagrams of storing rollback packets in a partition provided by an embodiment of the present application.
  • Figure 17 is another schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the at least one involved in the embodiments of this application includes one or more; where multiple means greater than or equal to two.
  • words such as “first” and “second” are only used for the purpose of distinguishing the description, and cannot be understood to express or imply relative importance, nor can they be understood to express Or suggestive order.
  • the first device and the second device do not represent the importance of the two or the order of the two, but are only used to differentiate the description.
  • "and/or" only describes the association relationship, indicating that three relationships can exist, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone. these three situations.
  • the character "/" in this article generally indicates that the related objects are an "or” relationship.
  • the system operation method provided by the embodiment of the present application is suitable for terminal devices.
  • the terminal device includes a system, and the system can be any operating system, such as etc.
  • the terminal device may be a portable terminal device such as a mobile phone, a tablet computer, or a notebook computer.
  • the terminal device may also be a wearable device such as a watch or bracelet.
  • the terminal device may also be a smart home device such as a television or a refrigerator.
  • the terminal device may also be a vehicle, such as various types of vehicles.
  • the terminal device may also be a vehicle-mounted device, such as a vehicle machine, a smart cockpit, or various systems in the smart cockpit, such as an in-vehicle infotainment system IVI (In-Vehicle Infotainment) or other vehicle-mounted devices, such as a vehicle control domain controller (Vehicle Controller).
  • VDC Vehicle Control domain controller
  • CDC smart cockpit domain controller
  • ADAS/AD Domain Controller ADAS/AD Domain Controller
  • ADC mobile data center
  • MDC mobile Data Center
  • the vehicle-mounted device can be integrated with the vehicle (for example, installed inside the vehicle); or it can also be installed separately from the vehicle (for example, the vehicle-mounted device can be implemented in the form of a terminal device, etc.).
  • the terminal device here may be, for example, a vehicle-mounted device such as a car machine.
  • the terminal device can also be a processing device, such as a processing chip or a processor, which can be installed inside the vehicle-mounted equipment, such as the processor in the vehicle machine, or it can be installed outside the vehicle-mounted equipment and can communicate with the vehicle through wired or wireless means. Vehicle-mounted equipment communicates.
  • the vehicle can also be replaced by other vehicles or vehicles such as trains, aircraft, mobile platforms, etc.
  • the terminal device may also be a virtual reality (Virtual Reality, VR) device, an augmented reality (Augmented Reality, AR) device, a mixed reality technology (Mixed Reality, MR) device, etc.
  • VR Virtual Reality
  • AR Augmented Reality
  • MR Mixed reality technology
  • the embodiment of the present application is not limited to the terminal device.
  • the specific type of can be any device with at least two system partitions.
  • Figure 1 shows a schematic structural diagram of a terminal device.
  • the terminal device may be any one of the terminal devices listed above.
  • the terminal device may include a storage system 100 .
  • the storage system 100 may include a controller 105, a hard disk array 120, a power supply system 110, and a cooling system 115.
  • the terminal device in the embodiment of the present application may include more or fewer components than in Figure 1 .
  • the terminal device may also include a display screen, a camera, various sensors, a mobile communication module, a wireless communication module, an audio module, and other other components.
  • the embodiments of this application will not introduce them one by one.
  • the combination/connection relationship between the components in Figure 1 can also be adjusted and modified.
  • Controller 105 is the "brains" of storage system 100 .
  • the controller 105 includes a processor (processor) 118, a communication interface 112, a memory (memory) 122, a communication bus (referred to as the bus) 116, and a host bus adapter (Host Bus Adapter, HBA) 114.
  • the processor 118, the communication interface 112, the memory 122 and the HBA 114 complete communication with each other through the communication bus 116.
  • the communication interface 112 may be a service access interface of the controller 105, and the controller 105 may communicate with external devices such as the host and the storage array 120 through the communication interface 112. For example, the controller 105 may receive an access request from the host to the hard disk array 120 through the communication interface 112 .
  • the HBA 114 is a circuit board or integrated circuit adapter that provides input/output (I/O) processing and physical connections between the controller 100 and the hard disk array 120. It can be understood that in practical applications, in addition to using HBA, other communication interface devices can also be used to communicate between the controller 100 and the hard disk array 120. For example, the controller 100 and the hard disk array 120 can be directly connected through an Ethernet controller. communication.
  • Memory 122 is used to store programs 124.
  • the memory 122 may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory). It can be understood that the memory 122 can be a random access memory (Random-Access Memory, RAM), a magnetic disk, a hard disk, a USB flash drive, a mobile hard disk, an optical disk, a solid state disk (Solid State Disk, SSD) or other non-volatile memory.
  • RAM random access memory
  • RAM Random-Access Memory
  • magnetic disk a magnetic disk
  • hard disk a hard disk
  • a USB flash drive a mobile hard disk
  • an optical disk a solid state disk (Solid State Disk, SSD) or other non-volatile memory.
  • SSD Solid State Disk
  • Program 124 may include program code including computer operating instructions.
  • the processor 118 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits that can implement embodiments of the present application.
  • the processor 118 can implement different functions according to different software programs. For example, the processor 118 can process the data in the hard disk 130 according to the service request for accessing the hard disk 130 (for example, run an operating system according to the data in the hard disk 130), and so on.
  • the processor 118 is used to execute the program 124, and specifically may execute relevant steps in the following method embodiments.
  • controller 105 shown in FIG. 1 is located within the storage system 100, in some cases, the controller 105 may also be located outside the storage system or at a remote location from the storage system. Moreover, even though FIG. 1 only shows an example of one controller 105, in actual applications, there may be multiple controllers 105. For example, when there are multiple controllers 105 and one controller fails, other controllers can take over the work of the failed controller to control the hard disk array 120 and ensure that the storage system 100 of normal operation.
  • the hard disk array 120 is used to store data. It should be noted that the hard disk array 120 can also be replaced by one or more hard disks. For example, the terminal device has less data. In this case, only one or more hard disks can be used, without the need for a hard disk array. This article mainly takes the hard disk array 120 as an example for explanation. However, the terminal device is not limited to having a hard disk array. It is also possible if there are only one or more hard disks. Illustrative , the hard disk array 120 may include a redundant array of independent disks (Redundant Array of Independent Disks, RAID). In actual applications, there may be one or more hard disk arrays 120 .
  • RAID redundant array of independent disks
  • the hard disk array 120 may include one or more hard disk groups 125, and each hard disk group 125 is composed of one or more hard disk drives (Hard Disk Drive, HDD) 130. It should be noted that the hard disk 130 is only an example of the memory that constructs the hard disk array 120.
  • the memory in the embodiment of the present application may include solid state drives (SSD), a cabinet composed of multiple hard disks, or a server. , no limitation is made here.
  • the hard disk array 120 can be connected to the controller 105 through a bus interface (such as HBA 114).
  • the hard disk array 120 can be connected to the controller 105 through a SAS interface, a SCSI interface or a SATA interface, which is not limited here.
  • the hard disk array 120 may include a serial attached SCSI (Serial Attached SCSI, SAS) expander (Expander) and multiple hard disks 130 .
  • the HBA 114 in the controller 105 is connected to a SAS expander, and multiple hard disks 130 are connected through the SAS expander.
  • a SAS expander may include multiple ports and may be used to expand the capacity of the hard disk array 120 .
  • the SAS expander can be a 12-port, 28-port, or 36-port expander, which is not limited here.
  • the hard disk array 120 may include multiple SAS expanders, and the hard disks 130 in each hard disk group 125 may be connected through SAS expanders.
  • multiple hard disks 130 in the storage system 100 may be divided into multiple hard disk groups 125.
  • a hard disk group 125 includes at least one hard disk 130 .
  • the resources in the embodiment of this application refer to power supply, Heat dissipation, vibration and other factors that can affect the normal operation of the hard drive.
  • multiple hard disks 130 belonging to the same hard disk group 125 can work at the same time, and multiple hard disks 130 belonging to the same hard disk group 125 can be powered on or off at the same time.
  • hard disks 130 are scheduled in units of hard disk groups 125 .
  • a service request may be processed by one or more hard disks 130 in a hard disk group 125 .
  • multiple hard disks 130 in the same hard disk group 125 can form a redundant array of independent disks (Redundant Arrays of Independent Disks, RAID).
  • the multiple hard disks 130 in the hard disk group 125 can read a partition at the same time according to the received business request.
  • Data block of stripe Those skilled in the art will know that the stripe described in the embodiment of the present application refers to a collection of data blocks written in parallel on each hard disk 130 that constructs a RAID.
  • Each data block in a stripe has the same size, and the data blocks on the same stripe are located at the same offset position in each memory.
  • the data blocks on a stripe may also be called a strip.
  • a strip is a continuous address block on an extent. It should be noted that in this embodiment of the present application, one service request will not be processed cooperatively by multiple hard disk groups 125 .
  • the service requests in this embodiment of the present application may include read requests and write requests for data stored in the storage system 100 .
  • the power supply system 110 can power the controller 105 and the hard disk array 120 .
  • the heat dissipation system 115 can dissipate heat for the controller 105 and the hard disk array 120 .
  • the power supply system 110 may be composed of one or more power modules.
  • the heat dissipation system 115 can use an air conditioning system or a fan or other equipment to dissipate heat for the hard disk 130 and the controller 105 .
  • the specific types of the power supply system 110 and the heat dissipation system 115 are not limited here.
  • the controller 105 and the hard disk array 120 share a power supply system 110 and a heat dissipation system 115 as an example. In practical applications, the controller 105 and the hard disk array 120 may also use different power supply systems and cooling systems. No limitation is made here.
  • the terminal device may include N partitions, and the N partitions are storage areas respectively used to store different functional data in the terminal device.
  • the N partitions may be located in different hard disk groups in the hard disk array 120 in FIG. 1 or in different disks in the same disk group or in different areas of the same disk in the same disk group, and so on.
  • the controller 105 eg, the processor 118 in the controller 105
  • the first partition table includes data storage address 1 of partition 1 and data storage address 2 of partition 2.
  • the processor 118 sends a service request to the hard disk array 120 through the HBA 114.
  • the service request includes data storage address 1 and data storage address 2.
  • the hard disk array 120 reads data based on data storage address 1 and reads data based on data storage address 2, so that the processor 118 runs an operating system based on the read data.
  • the previous business request carries both the data storage address 1 of partition 1 and the data storage address 2 of partition 2. It can be understood that the data storage address 1 of partition 1 and the data storage address 2 of partition 2 can also correspond.
  • Two different business requests for example, business request 1 carries the data storage address 1 of partition 1, and business request 2 carries the data storage address 2 of partition 2.
  • the first partition table may be stored in the memory 122 or in a certain disk in the hard disk array 120, which is not limited in this embodiment of the present application.
  • FIG. 2 is a schematic diagram of the software structure of a terminal device provided by an embodiment of the present application.
  • the software structure of the terminal device may be a layered architecture.
  • the software may be divided into several layers, and each layer has a clear role and division of labor.
  • the layers communicate through software interfaces.
  • the electronic device may include an application layer (referred to as the application layer), an application framework layer (referred to as the framework layer) (framework, FWK), a hardware layer, and so on.
  • the application package can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
  • the application framework layer provides an application programming interface (API) and programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include window managers, content providers, view systems, phone managers, resource managers, notification managers, etc.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make this data accessible to applications. Said data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, etc.
  • a view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide communication functions of the electronic device 100 . For example, call status management (including connected, hung up, etc.).
  • the resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, and more.
  • the notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a beep sounds, the electronic device vibrates, the indicator light flashes, etc.
  • System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (Media Libraries), 3D graphics processing libraries (for example: OpenGL ES), 2D graphics engines (for example: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition, and layer processing.
  • 2D Graphics Engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the hardware layer includes various hardware in the terminal device, such as various sensors (acceleration sensor, gravity sensor, touch sensor), display, etc.
  • FIG. 2 is an exemplary introduction to the software structure of the terminal device.
  • the software structure of the terminal device may include more or fewer layers than in FIG. 2 , or each layer may include more than Figure 2 has more or less modules; or the positional relationship between layers can also be adjusted, etc.
  • the software structure shown in Figure 2 does not constitute a specific limitation on the software structure of the terminal device.
  • the first partition table in this embodiment of the present application can be stored in any layer among the multiple layers shown in Figure 2, for example, application layer, framework layer, system layer or kernel layer.
  • application layer for example, application layer, framework layer, system layer or kernel layer.
  • kernel layer generally the information in the kernel layer is not visible to the upper layers (application layer, system layer, framework layer, etc.), so when the first partition table is stored in the kernel layer, the confidentiality is better and the security is better. high.
  • the upper side of the kernel layer such as the application layer, framework layer, and system layer
  • the upper layer Since the upper layer has a higher business correlation with the terminal device (for example, the application layer includes various applications, when an application runs a certain business At this time, the software module in the system layer is called through the API interface in the framework layer, and then the underlying hardware is called to implement the business). Therefore, the upper layer can update the first partition table according to business needs (see the following introduction). In this way, the third The one-partition table is more flexible, and the updated first partition table is more suitable for users' business needs. Taking the first partition table stored in the kernel layer as an example, the system layer can obtain the latest first partition table, and then read the data stored in the partition based on the first partition table, and based on these data, run the operating system of the terminal device .
  • the terminal device may include two system partitions, namely a first system partition and a second system partition.
  • the first system partition is also called the A system partition or side A
  • the second system partition is also called the B system partition or side B, as shown in Figure 3.
  • side A and side B may correspond to different versions of the same operating system or may also correspond to different operating systems. Take for example that side A and side B correspond to different versions of the same operating system.
  • side A corresponds to The lower version, corresponding to side B higher version.
  • the terminal device is currently running on side A.
  • This upgrade method is also called A/B upgrade. If the upgrade fails, it can continue to run on side A without affecting the normal use of users, that is, seamless upgrade.
  • side A and side B may respectively include multiple partitions, and different partitions are used to store different functional data in the terminal device.
  • side A includes partition 1 to partition n
  • side B includes partition k to partition m.
  • the partitions on side A and the partitions on side B do not overlap.
  • side A and side B include the same number and type of partitions, namely the system partition, the customization (Cust) partition, the version (Version) partition, the product (Product) partition, and the patch (Patch) partition. types of partitions.
  • side A includes: A Side system (System_a) partition, Side A customization (Cust_a) partition, Side A version (Version_a) partition, Side A product (Product_a) partition, Side A patch (Patch_a) partition.
  • Side B includes: Side B system (System_b) partition, Side B customization (Cust_b) partition, Side B version (Version_b) partition, Side B product (Product_b) partition, Side B patch (Patch_b) partition.
  • Different partitions are used to store different functional data.
  • the System partition can be used to store system data, such as the entire operating system and pre-installed software.
  • the Product partition is used to store product data, such as operator-related information.
  • the user partition is used to store various user personalized data such as music, videos, pictures, etc.
  • the terminal device stores a partition table 1 on side A and a partition table 2 on side B.
  • the partition table can also have other names, such as a partition mapping relationship table.
  • the partition table stores information corresponding to all partitions in the plane.
  • side A corresponds to partition table 1, which stores information about all partitions in side A, such as the partition name and storage address (including the start address and end address) of each partition in side A.
  • side B corresponds to partition table 2, which stores information about all partitions in side B, such as the partition name and storage address (including start address and end address) of each partition in side B. In this way, the terminal device can read data based on the storage address of each partition in the partition table 2 to run on side B.
  • partition table 1 of area A and the partition table 2 of area B are written into the terminal device before the terminal device leaves the factory (written into the kernel layer as shown in Figure 2), and cannot be edited or changed. Since the partition table cannot be edited or changed, it will cause some problems. For example, when upgrading the terminal device, it is necessary to switch from side A to side B. Since the partition table 1 of side A and the partition table 2 of side B are both fixed, Partition table 1 on side A needs to be completely switched to partition table 2 on side B. However, there is a situation. For example, only some partitions on side B are upgraded compared to side A, and some partitions are not upgraded. Then these partitions that have not been upgraded need to be completely switched to partition table 2, which will obviously affect the upgrade efficiency. Moreover, since partition table 1 needs to be completely switched to partition table 2, it needs to be shut down and restarted to achieve the upgrade, which is not convenient enough.
  • FIG. 4 Side A is 1.0, corresponding to partition table 1; side B is 2.0, corresponding to partition table 2.
  • the Patch_a partition in partition table 1 is different from the Patch_b partition in partition table 2.
  • the Patch_a partition corresponds to the data storage address of version 1.0, such as /dev/block/sdd1.0.
  • the Patch_b partition corresponds to the data storage address of version 2.0, such as /dev/block/sdd2.0.
  • Partition table 1 is the same as other partitions in partition table 2.
  • the different partitions on sides A and B are marked with a dark background color, while the same partitions are not marked with a dark background color.
  • the terminal device Before the upgrade, the terminal device traverses partition table 1 to read data to run on side A. After the upgrade, the terminal device traverses partition table 2 to read data again to run on side B. Obviously, the same partitions in side A and side B need to be traversed again, which reduces the upgrade efficiency.
  • the terminal device includes N partitions, N is a positive integer, and the N partitions are storage areas for storing different functional data in the terminal device.
  • the terminal device obtains a first partition table, which includes information on at least one partition among the N partitions.
  • the first partition table may include partitions 1 to 2, or may also include partitions 3 to 4. More flexible.
  • the first partition table can be updated.
  • the first partition table was originally composed of some partitions among the N partitions. After the update, it is composed of other partitions among the N partitions, thereby realizing flexible combination of partitions.
  • the terminal device reads data to run the operating system based on the latest first partition table. Compared with the traditional method (that is, the A-side partition table and the B-side partition table cannot be updated), it is more flexible and provides certain convenience for system optimization and upgrade.
  • FIG. 5 is a schematic flowchart of a system operation method provided by an embodiment of the present application. This method can be applied to terminal devices. Please refer to the previous introduction for terminal devices. As shown in Figure 5, the process includes:
  • the first partition table includes information of at least one partition among the N partitions, and the first partition table can be updated.
  • a partition can be understood as a storage area in a terminal device used to store different functional data, for example, different disks (such as C drive, D drive, etc.), or different storage areas of a certain disk (such as C drive).
  • N N is a positive integer
  • partitions may include: System partition, Cust partition, Version partition, Product partition, Patch partition, and so on.
  • the System partition stores system data.
  • the System partition stores The underlying software of the system.
  • the product partition stores product data, such as operator-related information.
  • the user partition stores user data, such as user personalized data, such as applications downloaded by the user, images taken, instant messaging messages sent, etc.
  • the N partitions may not differentiate between side A and side B.
  • the terminal device includes 12 partitions, namely partition 1 to partition 12. These 12 partitions do not distinguish which is the partition on side A or which is the partition on side B.
  • the first partition table can include these 12 points At least one partition in the zone.
  • N partitions can also be used to distinguish side A and side B.
  • the terminal device includes 12 partitions, namely partition 1 to partition 12.
  • partitions 1 to 6 are partitions on side A
  • partitions 7 to 12 are partitions on side B.
  • the first partition table may include at least one partition among the 12 partitions, including a situation in which the first partition table includes at least one of all partitions on side A, and at least one of all partitions on side B. at least one of.
  • the first partition table is a combination of the partitions of side A and side B.
  • the first partition table includes the System_a partition, Cust_a partition, Version_a partition, Product_a partition, and Patch_b partition in side A. Among them, the first 4 partitions are the partitions of side A. The last partition is the partition on side B. Please compare Figure 6 with Figure 4. Different from the partition table in Figure 4, the partition table 1 on side A and the partition table 2 on side B in Figure 4 are written into the terminal device at the factory and cannot be edited, and Partition table 1 of side A only includes the information of the partitions of side A, and partition table 2 of side B only includes the information of side B. The two partition tables are independent of each other. There is no combination of the partitions of side A and the partitions of side B. However, in Figure 6, the first partition table can include partitions on side A and side B, which is more flexible.
  • the terminal device is divided into N partitions, which facilitates management and enables flexible combination of different partitions among the N partitions in the first partition table.
  • the terminal device can determine the data storage address of each partition in advance, such as the start address and the end address. When writing the data of each partition, it can start from Start writing at the starting address and stop writing at the ending address. This ensures that the data of each partition will not be written to the wrong area. Moreover, the written data can also be verified to ensure that the written data is reliable and complete.
  • the first partition table exists by default when the terminal device is shipped from the factory.
  • the first partition table may be stored in any of the application layer, framework layer, and kernel layer of the terminal device.
  • the partition table 1 on side A and the partition table 2 on side B are burned into the kernel layer when the terminal device leaves the factory.
  • the first partition The table can be in any layer among the application layer, framework layer, system layer, and kernel layer. Taking storage in the kernel layer as an example, generally the information in the kernel layer is not visible to the upper layers (application layer, system layer, framework layer, etc.), so when the first partition table is stored in the kernel layer, the confidentiality is better and the security is better. high.
  • the kernel layer such as the application layer, framework layer, and system layer
  • the upper layer has a higher business correlation with the terminal device (for example, the application layer includes various applications, when an application runs a certain business
  • the software module in the system layer is called through the API interface in the framework layer, and then the underlying hardware is called to implement the business). Therefore, the upper layer can flexibly and timely update the first partition table according to business needs. In this way, the first partition table The table is more flexible, and the updated first partition table is more suitable for users' business needs.
  • the upper layer can download the upgrade package for the service, record the storage address of the upgrade package, and update the system in the first partition table based on the storage address.
  • the current partition of the partition can download the upgrade package for the service, record the storage address of the upgrade package, and update the system in the first partition table based on the storage address.
  • the first partition table is set by the user. For example, the user can select which partitions among the N partitions are combined to generate the first partition table.
  • the first partition table may also be generated based on a mixture of the second partition table and the third partition table.
  • the second partition table is a non-editable partition table written when the terminal device leaves the factory, that is, the partition table 1 on side A and the partition table 2 on side B in FIG. 4 .
  • the third partition table is obtained based on the upgrade package.
  • the terminal device downloads the upgrade package.
  • the upgrade package is used to upgrade partition 1 among the N partitions.
  • the upgrade package includes a high-version installation package of partition 1.
  • the terminal device stores the higher version of partition 1 as an installation package at address 1, and records partition 1 and address 1 in the third partition table.
  • the third partition table can be understood as the partition targeted by the upgrade package and the storage address of the upgrade package.
  • the terminal device may mix the third partition table and the second partition table to obtain the first partition table.
  • the second partition table also includes address 2 of partition 1 (lower version installation package)
  • the third partition table also includes address 1 of partition 1 (higher version installation package).
  • One possible mixing method is to superimpose address 1 on top of address 2 of partition 1 in the second partition table to obtain the first partition table (for example, one possible implementation method is the process of Figure 9A and Figure 9B below, please refer to the following text description).
  • the first partition table may also include address 1 and address 2, and address 1 is marked with a higher priority than address 2.
  • the first partition table is represented by a mixed table (mixed_table)
  • the second partition table is represented by a fixed table (fixed_table), that is, an uneditable table written at the factory
  • the third partition table is represented by It is a dynamic table (dynamic_table), which is obtained based on the upgrade package.
  • mixed_table can be mixed with fixed_table and dynamic_table.
  • the patch_b partition in dynamic_table is superimposed on the upper layer of the patch_a partition in the second partition table to obtain the first partition table.
  • the first partition table can be updated.
  • the combination of partitions contained in the first partitioned table can be updated.
  • Example sexually the first partition table originally included partition 1 to partition 2 among N partitions. After the update, the first partition table included partition 3 to partition 4 among N partitions.
  • the first partition table before and after the update also Can be the same.
  • the first partition table is a flexible combination of different partitions among N partitions.
  • the original first partition table includes the partitions of side A. When it is determined that the patch_a partition of side A needs to be upgraded to the patch_b partition of side B, the first partition table is updated.
  • the original A in the updated first partition table The patch_a partition of surface is replaced with the patch_b partition of surface B, and other partitions do not need to be updated.
  • partition table 1 based on side A runs on side A before the upgrade. During the upgrade, it switches to side B.
  • Partition table 2 based on side B runs on side B. Since Partition table 1 and partition table 2 are independent and non-updatable tables. Even if there are the same partitions in the partition tables of side A and side B, they still need to be traversed again. However, in Figure 8, the first partition table is editable.
  • the terminal device can also download an upgrade package for the partition, and update the partition in the first partition table based on the upgrade package. For example, assume that the first partition table includes partition 1 to partition 3. The terminal device downloads the upgrade package, which is used to upgrade partition 1. For example, the upgrade package includes a higher version installation package for partition 1. The terminal device stores the higher version installation package of partition 1 at address 1, and updates the current storage address of partition 1 in the first partition table to address 1.
  • updating the current storage address of partition 1" to "address 1" can be understood as replacing the current storage address with address 1, or mounting address 1 on the current storage address.
  • the upgrade package downloaded by the terminal device can upgrade both partitions in the first partition table.
  • the first partition table includes partition 1 on side A and partition 2 on side B.
  • Partition 1 and partition 2 are the same partition on different sides.
  • partition 1 is patch_a
  • the version is Version 1.0
  • partition 2 is patch_b, version 2.0.
  • the upgrade package is version 3.0 of the patch partition, that is, the upgrade package can upgrade both partition 1 and partition 2.
  • the terminal device can upgrade both partition 1 and partition 2, or decide which one to upgrade based on priority. For example, in method 1, the priority of the partition in use is low.
  • partition 2 is upgraded first, that is, the data storage address of partition 2 in the first partition table is updated to the first storage address.
  • the first storage address is the storage address of the upgrade package.
  • Method 2 Partitions with lower versions have higher priority. For example, partition 1 is version 1.0 and partition 2 is version 2.0, that is, partition 1 has a higher priority than partition 2. Partition 1 can be upgraded first, that is, the current storage address of partition 1 in the first partition table is updated to the first storage address. The first storage address is the storage address of the upgrade package.
  • Method 3 Partitions with low usage frequency have high priority. For example, if the usage frequency of partition 1 is lower than that of partition 2, partition 1 will be upgraded first, that is, the current storage address of partition 1 in the first partition table will be updated to the first storage Address, the first storage address is the storage address of the upgrade package.
  • a hot upgrade or a cold upgrade may be used.
  • the difference between hot upgrade and cold upgrade is that there is no need to restart the device after hot upgrade and it does not affect normal operation, while after cold upgrade, you need to restart the device to take effect.
  • the terminal device can also determine whether the partition to be upgraded is suitable for hot upgrade or cold upgrade. If it is suitable for hot upgrade, you can use the hot upgrade method. If it is suitable for cold upgrade, you can use the cold upgrade method.
  • the way for the terminal device to determine whether the partition to be upgraded is suitable for cold upgrade or hot upgrade may include: judging whether the partition is suitable for cold upgrade or hot upgrade based on the attributes of the partition.
  • the attributes of the partition include: for a partition, each time a new version is put on the shelves, a label is set for the new version of the partition.
  • the label is used to indicate whether the partition is suitable for hot upgrade or cold upgrade, for example When the label is 1, it means that it is suitable for hot upgrade; when the label is 0, it means that it is suitable for cold upgrade. Among them, this article will not go into detail about the difference between hot upgrade and cold upgrade.
  • a partition (such as a certain storage area in the C drive) can include one or more storage areas.
  • a partition is a storage area with a capacity of 1G, which can be divided into multiple smaller-capacity storage areas (can be understood as substorage area). Different data can be stored in different storage areas within this partition.
  • the partition includes storage area 1 to storage area 3.
  • Storage area 1 stores data 1
  • storage area 2 stores data 2
  • storage area 3 stores data 3.
  • Each storage area stores different data
  • each Each storage area corresponds to a storage address.
  • the storage address of data 1 may be the start address and end address of storage area 1.
  • the terminal device (such as the kernel layer) needs to read data from the partition to run the operating system, so it needs to know the storage addresses of different data in the partition.
  • the kernel layer creates various file nodes, such as Patch nodes, Cust nodes, product nodes, etc.
  • the file node can be understood as a directory used to record the data storage address, and the corresponding data can be read through the directory.
  • the Patch node corresponds to the patch_a partition or the patch_b partition, that is, the storage address of the data in the patch_a partition in the Patch node, or the storage address of the data in the patch_b partition.
  • the Cust node corresponds to the Cust_a partition or the Cust_b partition.
  • the product node corresponds to the product_a partition or product_b partition.
  • the Patch node corresponds to the patch_a partition
  • the Cust node corresponds to the Cust_a partition
  • the product node corresponds to
  • the terminal device can run the system based on patch_a partition, Cust_a partition, and product_a partition, that is, it runs on side A.
  • the terminal device can run the system based on the patch_b partition, Cust_b partition, and product_b partition, that is, it runs on side B.
  • the Patch node when upgrading the patch partition, it can be understood that the Patch node originally corresponds to the patch_a partition and needs to be switched to the patch_b partition.
  • the upgrade of the patch partition can be understood as switching from patch_a to patch_b partition, so that the Patch node originally corresponding to the patch_a partition is switched to the corresponding patch_b partition.
  • the patch_a partition when the Patch node switches from the patch_a partition to the patch_b partition, the patch_a partition may be in a working state.
  • the patch_b partition can be directly mounted to the already working patch_a partition (for example, patch_b The data storage address of the partition is directly mounted to the directory of the patch_a partition), or you can also use the method of unmounting first and then mounting, for example, uninstalling the patch_a partition first, and then mounting the data storage address of the patch_b partition to the Patch node. This method is a hot upgrade, which can be completed without restarting the device and does not affect current work.
  • the patch_a partition includes three storage areas, for example, inode1_a, inode2_a, and inode3_a in Figure 10 (which can also be called storage nodes or actual nodes). Different data of the patch_a partition is stored in these three storage areas.
  • the Patch node in Figure 9B includes three file nodes, namely file node 1 to file node 3.
  • File node 1 corresponds to inode1_a, which is used to record the storage address of the data in inode1_a.
  • File node 2 corresponds to inode2_a, which is used to record the storage address of the data in inode2_a.
  • File node 3 corresponds to inode3_a, which is used to record the storage address of the data in inode3_a.
  • the kernel layer can read the data stored in the actual node inode1_a in the patch_a partition based on the data storage address recorded in file node 1; similarly, based on the data storage address recorded in file node 2, it can read patch_a The data stored in the actual node inode2_a in the partition, and based on the data storage address recorded in file node 3, read the data stored in the actual node inode3_a in the patch_a partition.
  • the file node can be identified using the virtual machine node of the corresponding node cache (inode_cache). For example, file node 1 is identified as inode_cache1, file node 2 is marked as inode_cache2, and file node 3 is marked as inode_cache3.
  • the file node can be understood as a directory used to record the data storage address.
  • the node cache corresponding to the file node can be understood as a cache used to store the directory, which can be a virtual machine or other forms, that is, different files.
  • Nodes correspond to different node caches (which can be different virtual machines), and virtual machine nodes have virtual machine node identifiers, which can be used to identify file nodes. Therefore, file node 1 to file node 3 in Figure 10 can be replaced by inode_cache1 to inode_cache3.
  • file nodes can also be marked in other ways, as long as different file nodes can be distinguished.
  • the identification of the file node may also be used to mark the file node as being hot-updateable.
  • the terminal device can use the following method to upgrade the Patch partition, that is, the Patch node switches from the patch_a partition to the patch_b partition.
  • the Patch node in Figure 9B switches the original corresponding patch_a partition to the corresponding patch_b partition.
  • the patch_b partition also includes three storage areas.
  • inode1_b, inode2_b, and inode3_b in Figure 11 are three storage areas (which can also be called storage nodes or actual nodes). Different data of the patch_b partition is stored in these three storage areas.
  • file node 1 to file node 3 need to be adjusted to correspond to patch_b Partitioned inode1_b, inode2_b, inode3_b.
  • file node 2 For ease of understanding, let's take the file node 2 being adjusted from originally corresponding to inode2_a to corresponding to inode2_b as an example for explanation.
  • file node 2 needs to establish an association relationship with inode2_b, and the implementation method may include multiple methods.
  • method 1 is a combination of inode2_b and inode2_a, that is, file node 2 corresponds to both inode2_a and inode2_b.
  • Method 2 replace inode2_a with inode2_b.
  • file node 2 originally corresponds to inode2_a, replace inode2_a with inode2_b.
  • Method 3 can be understood as a further refinement of method 1, that is, after inode2_b and inode2_a are combined, the priority between inode2_b and inode2_a can be set. For example, when the priority of inode2_a is high, the corresponding inode2_a and inode2_b have a high priority. When, corresponds to inode2_b. Among them, the priorities of inode2_a and inode2_b can be set by the user, or specified in the downloaded upgrade package, etc., and are not limited by this application. Alternatively, the terminal device may also preferentially select inode2_a or inode2_b according to the operating conditions.
  • Method 4 Create a new inode. For example, use any one of the previous methods 1 to 3 to create file node 2 and a new inode. The association between them, and then mount inode2_b to the new inode.
  • Method 5 Create a new file node, for example, create file node 4.
  • the new file node can correspond to a new identifier, for example, inode_cache4.
  • the association between file node 4 and file node 2 can be established by switching, inserting or combining file nodes. Taking switching as an example, file node 2 is switched (can be understood as replacement) to file node 4.
  • file node 2 and file node 4 can be combined, for example, into a larger file node (that is, into a new directory).
  • Figure 10 takes the file node 2 being adjusted from the original corresponding inode2_a to the corresponding inode2_b.
  • the file node 1 can also be adjusted from the original corresponding inode1_a to the corresponding inode1_b.
  • the file node 3 can also be adjusted from the original corresponding inode1_a to the corresponding inode1_b. corresponds to inode3_a, and is adjusted to correspond to inode3_b, see Figure 11.
  • the kernel layer reads the data stored in the actual node inode1_b in the patch_b partition; similarly, based on the data storage address recorded in file node 2, it reads the patch_b partition The data stored in the actual node inode2_b, and based on the data storage address recorded in file node 3, read the data stored in the actual node inode3_b in the patch_b partition.
  • the first partition table is updated accordingly.
  • the first partition table included: (System_a,Cust_a,Version_a,Product_a,Preload_a,Patch_a).
  • the first partition table became: (System_a,Cust_a,Version_a,Product_a,Preload_a,(Patch_a:Patch_b )).
  • (Patch_a:Patch_b) is used to indicate the upgrade from Patch_a partition to Patch_b partition.
  • the first partition table before the update includes: (System_a,Cust_a,Version_a,Product_a,Preload_a,Patch_a), and the first partition table after the update becomes: (System_a,Cust_a,Version_a,Product_a,Preload_a,Patch_b). That is, the first partition table after the update is flexibly combined with the partitions on side A and the partitions on side B.
  • the first partition table after the update can be expressed as: System_a, Cust_a, Version_a, Product_a, Preload_a, (Patch_a: Patch_b)).
  • (Patch_a:Patch_b) is used to indicate that the Patch node is combined due to the Patch_a partition and the Patch_b partition. It should be understood that if method 3 is used to set the priority between Patch_a partition and Patch_b partition, (Patch_a:Patch_b) can also be used to indicate which one has higher priority.
  • (Patch_a:Patch_b) means Patch_a comes first.
  • Patch_b comes later, indicating that Patch_a has a higher priority than Patch_b, or that Patch_a is the primary node and Patch_b is the secondary node; for another example, if it is (Patch_b:Patch_a), that is, Patch_b comes first and Patch_a comes later, it indicates that Patch_b has priority. Higher than Patch_a, or in other words, Patch_b is the primary node and Patch_a is the secondary node.
  • the first partition table after the update can be expressed as: (System_a, Cust_a, Version_a, Product_a, Preload_a, Patch_b).
  • the first partition table includes the data storage address (including the start address and the end address) of each partition, and the terminal device can read the data of each partition according to the storage address.
  • S503 The terminal device runs the operating system according to the data.
  • the upgrade may fail. If the upgrade fails, a rollback process can be performed.
  • the rollback process can be understood as an attempt to upgrade the old version of the partition to a new version, and when the upgrade fails, roll back to the old version.
  • rollback can also be replaced by other names, such as "rollback” and so on. For example, see Figure 12.
  • partition table 1 is updated to partition table 2.
  • the terminal device performs a rollback operation, just roll back partition table 2 to partition table 1.
  • the rollback process includes:
  • the terminal device determines that a rollback operation needs to be performed.
  • the conditions include, for example: failure to upgrade the partition or receipt of a rollback instruction input by the user, and so on.
  • the terminal device restores partition table 2 to partition table 1, which can be understood as deleting partition table 2 and replacing it with partition table 1.
  • partition table 2 the first partition table after the update
  • partition table 2 only updates the patch_a partition to the patch_b partition, and the other partitions.
  • the partitions have not been updated, so when partition table 2 is restored to partition table 1, only the patch_b partition can be restored to the patch_a partition, and other partitions do not need to be restored.
  • partition table 2 when the terminal device rolls back, it is not necessary to reload other partitions, and only the patch_a partition needs to be reloaded. In this way, the rollback efficiency can be improved.
  • the terminal device reads the storage data of each partition in the partition table 1 based on the partition table 1, and runs the system based on the read data.
  • the step may also be included: receiving a restart instruction from the terminal device.
  • the rollback process is executed.
  • the terminal device may automatically download and install a new version of the application. For example, before the upgrade, the terminal device has version 1 of the application, and after the upgrade, the terminal device has version 2 of the application installed. That is, when the patch_a partition is upgraded, the version of the application is upgraded accordingly. It is understandable that when the terminal device is rolled back, it needs to be completely restored to the previous state, that is, the version 2 application needs to be restored to the version 1 application.
  • One implementation method is that when upgrading the patch_a partition, if a new version of the application is installed, a flag is set for the new version of the application. The flag is used to indicate that the new version of the application was installed when the patch_a partition was upgraded.
  • the application in the terminal device is scanned and if the application is found to be marked, the new version of the application is deleted. If the old version of the application is deleted during the upgrade process, you can re-download the old version of the application to achieve system restore; if the old version of the application has not been deleted, use the old version of the application.
  • the information of the version 1 application is stored in partition 1, for example, the system partition (for example, the version 1 application is shipped with the terminal device when it leaves the factory).
  • the installation version 2 of the application is stored in partition 2, such as the user partition (for example, applications downloaded after leaving the factory are stored in this partition by default), and the application of version 2 is marked with The tag is used to mark that the application is downloaded when patch_a partition is upgraded.
  • the application version 1 is stored in partition 1
  • the application version 2 (with tags) is stored in partition 2.
  • scan partition 2 first to determine whether there is a marked application. If found, delete the application, and then use the version 1 application in partition 1.
  • version 2 of the application is installed, and the information of version 2 of the application is stored in partition 2.
  • no tag is set for the version 2 application. That is, partition 1 stores applications with version 1, and partition 2 stores applications with version 2 (without tags).
  • the terminal device still scans partition 2 first based on the priority rules. Obviously, no marked application is found when scanning partition 2. Then it scans partition 1 and compares the sizes of different versions of the same application in partition 1 and partition 2. , whichever partition has a larger version, delete the application in that partition and use the application with a lower version.
  • Embodiment 2 takes a vehicle engine as an example for explanation.
  • the vehicle engine includes various domains, such as IVI domain, MCU domain, etc.
  • the terminal device in the previous embodiment 1 may be the IVI domain in the vehicle.
  • the IVI domain includes side A and side B.
  • the IVI domain can be upgraded in the manner described in the first embodiment (updating the first partition table). It should be understood that in the vehicle machine, the IVI domain needs to communicate with other domains (such as the MCU domain).
  • other domains connected to the IVI domain may not be upgraded with the upgrade of the IVI domain, or in other words, they may not be upgraded with the IVI domain.
  • Other domains to which the domain is connected may not support A/B upgrades.
  • This second embodiment introduces the processing process for components in other domains when upgrading the entire vehicle machine.
  • FIG. 13 is a schematic diagram of the vehicle machine provided in the third embodiment.
  • the vehicle machine includes the first domain and the second domain.
  • the first domain and the second domain are two different domains in the vehicle.
  • the first domain is one of IVI, VDC, CDC, ADC, MDC, MCU, etc.
  • the second domain is a domain in IVI, VDC, CDC, ADC, MDC, MCU, etc. that is different from the first domain.
  • the first domain includes side A and side B, and the second domain includes other components, such as component J and combination K. These two components do not support A/B upgrades.
  • the general processing method is that the first domain uses the traditional upgrade method mentioned above (for example, switching from side A to side B), and the second domain also needs to be reset (restored). Factory settings), during reset, the rollback package of the components in the second domain is deleted, and then after the first domain is upgraded, the rollback package of the components in the second domain is downloaded from the network side, and the rollback package is restarted based on the rollback package. Load components from the second domain. Obviously, in this method, when the entire vehicle is upgraded, the rollback package in the second domain needs to be downloaded from the network side, which wastes transmission resources and is less efficient.
  • the rollback package of the component in the second domain can be stored in the free storage area of the partition in the first domain. In this case, there is no need to download the rollback package of the component in the second domain from the network side. Save transmission resources and improve efficiency.
  • the vehicle machine includes user space and bottom space.
  • user space can also be called upper space.
  • the ground floor space can also be called lower space, and this application does not limit this name.
  • the user space includes patch nodes, system nodes, product nodes, etc.
  • the ground floor space includes side A and side B.
  • the patch node corresponds to patch_a or patch_b.
  • the system node corresponds to system_a or system_b.
  • the product node corresponds to product_a or product_b.
  • patch_a as an example, before the partition is upgraded, the patch node corresponds to patch_a; the system node corresponds to system_a; and the product node corresponds to product_a.
  • the terminal device runs on side A based on the patch node, system node, and product node.
  • the patch node originally corresponding to patch_a is adjusted to correspond to patch_b; the system node corresponds to system_a; the product node corresponds to product_a. Then the terminal device runs the system based on the patch node, system node, and product node.
  • the underlying space includes MCU1 and MCU2. These two components do not support A/B upgrades.
  • the first domain uses the traditional upgrade method mentioned above (for example, switching from side A to side B), and in the second domain, MCU1 and MCU2 will be restored to factory settings.
  • the rollback package is deleted, and then after the first domain is upgraded, the rollback package is downloaded from the network side, and MCU1 and MCU2 are reloaded based on the rollback package.
  • MCU1’ and MCU2’ are created in the user space of the second domain. Among them, MCU1’ corresponds to MCU1, and MCU2’ corresponds to MCU2.
  • the terminal device creates other components, which are named /temp for ease of understanding, but this application does not limit this name.
  • This other component can access the free storage space of the partitions in side A and side B of the underlying layer.
  • the rollback packages for MCU1 and MCU2 in the second domain are stored in the free storage space of the partitions on sides A and B, and are recorded in /temp.
  • the rollback package of MCU1 recorded in /temp is stored in the free area of system_a
  • the rollback package of MCU2 is stored in the free area of product_a.
  • S1501. Determine the first component.
  • the first component is not included in side A and side B.
  • the first component may be any component in the second domain in Figure 14.
  • MCU1’ and MCU2’ can be created in the upper space.
  • MCU1’ can access MCU1 and can be used to display the rollback package in MCU1 to the user.
  • MCU2’ can access MCU2 and can be used to display the rollback package in MCU2 to the user.
  • S1502. Determine the free storage space of the partitions in side A and side B.
  • each partition in side A and side B corresponds to a storage space, and this storage space is used to store information of the corresponding partition.
  • the storage space corresponding to the Patch_a partition in side A stores Patch_a information.
  • the storage space may not be full, and there is still a certain amount of space left. Therefore, S1502 can determine the free storage areas of the partitions in side A and side B.
  • the free storage space of the system_a partition in side A and the free storage space of the product_a partition are determined.
  • the rollback package of MCU1 can be stored in the system_a partition.
  • the rollback package of MCU2 can be stored in the free storage space of the product_a partition, as shown in Figure 16.
  • the entire vehicle can be upgraded, for example, using the method of Embodiment 1 mentioned above.
  • the patch_a partition as an example, if during the upgrade process of this partition, other partitions such as system_a and product_a have not been upgraded, that is, the free storage space of system_a and product_a has not updated data, so after the patch_a partition is upgraded, you can start from system_a and product_a Read the rollback package of the first component from the free storage space, and restore the first component based on the rollback package, without downloading the rollback package of the third component from the network side.
  • the first component is stored in the free storage space of system_a and product_a
  • the upgrade partition is patch_a. That is, the upgrade partition is not the same storage partition (system_a and product_a) of the rollback package of the first component. , in this case, you can continue to store the rollback package of the first component in the free storage space of system_a and product_a.
  • the first component is stored after the free storage space of system_a and product_a.
  • the entire vehicle is upgraded, it may be necessary to upgrade either or both system_a and product_a.
  • the first component is stored in After a partition in side A is within the free storage area, the partition needs to be upgraded.
  • the rollback packages of MCU1 and MCU2 were originally stored in the free storage space of system_a and product_a. Since system_a and product_a need to be upgraded, The rollback packages of MCU1 and MCU2 are stored in the free storage space of other partitions such as version_a.
  • Figure 17 is a schematic structural diagram of a terminal device 1700 provided by an embodiment of the present application.
  • the terminal device 1700 may be the terminal device mentioned above.
  • the terminal device 1700 may include: one or more processors 1701; one or more memories 1702; a communication interface 1703, and one or more computer programs 1704. Each of the above devices can communicate through one or more Bus 1705 connection.
  • the one or more computer programs 1704 are stored in the memory 1702 and configured to be executed by the one or more processors 1701
  • the one or more computer programs 1704 include instructions.
  • the instruction can be used to perform the relevant steps of the terminal device in the above corresponding embodiment, for example, the steps of the terminal device in the embodiment shown in FIG. 5 .
  • the communication interface 1703 is used to implement communication between the terminal device 1700 and other devices.
  • the communication interface may be a transceiver.
  • the methods provided by the embodiments of the present application are introduced from the perspective of terminal devices (such as mobile phones and car machines) as execution subjects.
  • the electronic device may include a hardware structure and/or a software module to implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above functions is performed as a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
  • the terms “when” or “after” may be interpreted to mean “if" or “after” or “in response to determining" or “in response to detecting ...”.
  • the phrase “when determining" or “if (stated condition or event) is detected” may be interpreted to mean “if it is determined" or “in response to determining" or “on detecting (stated condition or event)” or “in response to detecting (stated condition or event)”.
  • relational terms such as first and second are used to distinguish one entity from another entity, without limiting any actual relationship and order between these entities.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated.
  • the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), etc.
  • SSD Solid State Disk

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

一种系统运行方法与终端装置。终端装置中包括N个分区,N为正整数,不同分区为用于存储所述终端装置中的不同功能数据的存储区,所述方法包括:获取第一分区表,所述第一分区表中包括所述N个分区中的至少一个分区的信息,且所述第一分区表可更新;根据最新的所述第一分区表,读取所述至少一个分区中存储的数据;基于所述数据运行电子设备的操作系统。通过这种方式,可以提升系统运行的灵活性以及系统升级的便捷性。

Description

一种系统运行方法与终端装置
相关申请的交叉引用
本申请要求在2022年07月28日提交中国专利局、申请号为202210898073.1、申请名称为“一种系统运行方法与终端装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子技术领域,尤其涉及一种系统运行方法与终端装置。
背景技术
A/B升级是为了实现无缝升级而提出的一种升级方式。简单来说,终端装置包括A面与B面,可以对应同一操作系统的不同版本,例如A面对应低版本,B面对应高版本。假设终端装置当前运行于A面,当需要升级到高版本时,从A面切换到B面,可以在不影响用户正常使用的情况下实现升级,即无缝升级。
一般,终端装置中存储有A面的分区表以及B面的分区表,A面分区表中存储有A面所包含分区的信息,B面分区表中存储有B面包含的分区的信息。A面的分区与B面的分区不重叠。终端装置基于A面分区表运行于A面,基于B面分区表运行于B面。然而,目前,A面分区表与B面分区表在终端装置出厂前就已写入终端装置中,是不可编辑、不可更改的,灵活性较差,不利于终端装置后续的软件升级与优化。
发明内容
本申请的目的在于提供了一种系统运行方法与终端装置,用以提升系统升级的便捷性与灵活性。
第一方面,提供一种系统运行方法,应用于终端装置,所述终端装置中包括N个分区,N为正整数,不同分区为用于存储所述终端装置中不同功能数据的存储区,所述方法包括:获取第一分区表,所述第一分区表中包括所述N个分区中至少一个分区的信息、且所述第一分区表可更新;根据最新的所述第一分区表,读取所述至少一个分区中存储的数据;基于所述数据,运行所述终端装置的操作系统。
因此,本申请实施例中,终端装置中具有可更新的分区表,且该分区表中包括N个分区中的至少一个分区的信息。例如,更新之前的分区表中包括分区1至分区3的信息,更新之后的分区表包括分区4-分区6的信息。换言之,分区表不是固定不可更新、不可编辑的,灵活性较高,有利于终端装置后续的软件升级与优化。
在一种可能的设计中,所述第一分区表可更新,包括:所述第一分区表在更新前和更新后所包含的分区是所述N个分区中不同分区的组合。也就是说,第一分区表可以灵活变化,可以是N个分区中不同分区的灵活组合。例如,N个分区包括分区1至分区6,更新前的第一分区表中包括分区1至分区3的信息,更新后的第一分区表包括分区4-分区6的信息。需要说明的是,如背景技术所述,目前终端装置中,分区表有A面与B面之分,A面的分区表中只包括A面的分区信息,B面的分区表中只包括B面的分区信息,而且A面分区表与B面分区表均不可更新、不可编辑,换言之,目前的终端装置中,分区表是固定不变的。但本申请实施例中,分区表可更新,且可以是N个分区中不同分区的组合,更为灵活,更加方便终端装置的后续系统优化与升级。
在一种可能的设计中,所述终端装置支持第一操作系统和第二操作系统;其中,所述终端装置基于所述N个分区中的第一组分区运行在所述第一操作系统,所述终端装置基于所述N个分区中的第二组分区运行在所述第二操作系统,所述第一组分区和所述第二组分区不重叠。也就是说,N个分区中包括第一组分区和第二组分区,其中,第一组分区被运行时终端装置处于第一操作系统,第二组分区被运行时终端装置处于第二操作系统。示例性的,第一组分区是A面的分区,终端装置运行第一组分区时处于A面;第二组分区是B面的分区,终端装置运行第二组分区时处于B面。换言之,N个分区中既可以包括A面的分区,也可以包括B面的分区,而第一分区表中包括N个分区中的至少一个分区的信息,那么第一分区表中有可能包括A面分区与B面分区的组合,相对于目前的分区表,更为灵活。
在一种可能的设计中,所述第一操作系统和所述第二操作系统对应不同的操作系统或者同一操作系统的不同版本。示例性的,以第一操作系统和第二操作系统是同一操作系统的不同版本为例,第一操作 系统例如是低版本(例如1.0),第二操作系统例如是高版本(例如2.0)。
在一种可能的设计中,所述第一分区表中包括所述第一组分区中的至少一个分区的信息,以及,所述第二组分区中的至少一个分区的信息。因此,继续以第一组分区是A面的分区,第二组分区是B面的分区为例,即,N个分区中既包括A面的分区,也包括B面的分区,而且,第一分区表中包括A面的分区,也包括B面的分区。需要说明的是,如背景技术所述,目前的终端装置中,A面的分区表中只包括A面分区的信息,B面的分区表中只包括B面分区的信息,而且A面分区表与B面分区表均不可更新、不可编辑,不存在A面的分区与B面的分区组合于同一分区表的情况。但是,本申请实施例中,第一分区表中可以包括A面分区与B面分区,实现不同操作系统中分区的灵活组合。这样的话,当终端装置需要系统升级时,可以提升升级效率。例如,假设相对于低版本操作系统(例如,A面)而言,高版本操作系统(例如,B面)升级了某个分区。这种情况下,按照目前的升级方式,由于A面分区表与B面分区表独立且不可更新,所以即便B面分区表相对于A面分区表而言只有某个分区升级了,也需要从A面分区表完全切换到B面分区表,即需要重新加载B面的所有分区,效率较低。而本申请中,由于第一分区表可更新、可编辑,第一分区表可以由A面的分区以及B面的分区(相对于A面升级的分区)组合而成,所以,当低版本操作系统(例如,A面)需要升级到高版本操作系统(例如,B面)时,只需要加载第一分区表即可,由于第一分区表中A面的分区已经加载所以不需要重新加载,只需要加载第一分区表中B面的分区即可,不需要加载B面的所有分区,提升了升级效率。
在一种可能的设计中,所述第一分区表中包括每个分区的数据存储地址;所述方法还包括:下载升级包,所述升级包用于对所述N个分区中第一分区升级;存储所述升级包,并记录所述升级包的存储地址;根据所述存储地址,对所述第一分区表中所述第一分区的当前存储地址更新。也就是说,本申请实施例中,由于第一分区表可更新,所以当终端装置对第一分区升级时,可以将第一分区表(可更新的表)中第一分区的当前存储地址更新为升级包(对第一分区进行升级的升级包)的存储地址,这样的话,终端装置基于更新后的第一分区表运行时,第一分区实现了升级,这种升级方式,提升了系统升级的便捷性。
在一种可能的设计中,所述升级包中包括第一应用的安装包;所述方法还包括:基于所述安装包,安装所述第一应用,并为所述第一应用设置标识,所述标记用于标记所述第一应用是所述第一分区升级时安装的应用;其中,所述标记用于在所述第一分区回滚时,通过识别所述应用上的标记,删除所述第一应用。也就是说,在本申请实施例中,终端装置对第一分区升级时,如果下载了应用,则为该应用设置标记,标记的作用为:如果第一分区需要回滚(例如升级失败或用户主动触发回滚),则通过识别该标记,删除该应用,便于快速的恢复到原本的状态,即快速完成回滚,而且在回滚时,不会漏删、错删应用,准确性较高。
在一种可能的设计中,所述方法还包括:在所述第一分区表中第二分区对应的空闲空间内存储第一组件的回滚包,所述第一组件不是所述N个分区内任一分区的组件,所述第二分区是所述第一分区表中所述第一分区以外的其它分区;其中,所述第一组件的回滚包用于在所述终端装置升级完后执行所述第一组件的回滚。
也就是说,在本申请实施例中,终端装置可以将第一组件(例如,不支持A/B升级的组件)的回滚包存储在不需要升级的分区(例如第二分区)的空闲存储区域内,当该第一组件需要回滚时,从该空闲存储空间内读取回滚包进行回滚。需要说明的是,目前,在系统升级时,对于不支持A/B升级的组件,其回滚包会被删除,当回滚时再从网络上下载回滚包,比较浪费传输资源,本申请实施例中,利用了不升级分区的空闲存储空间,即将这些组件的回滚包存储在不升级的分区的空闲存储区域内,在回滚时从该空闲存储空间内读取回滚包进行回滚,不需要从网络上下载回滚包,节省传输资源,提升效率。
在一种可能的设计中,所述第一分区表中包括每个分区的数据存储地址;所述方法还包括:下载升级包,所述升级包用于对所述N个分区中第三分区和第四分区分别进行升级,所述第三分区的优先级高于所述第四分区;存储所述升级包,并记录所述升级包的存储地址;根据所述存储地址,对所述第一分区表中所述第三分区的当前存储地址更新。
举例来说,N个分区中包括系统(system)分区1和system分区2,存在一种情况,system分区1是1.0版本,system分区2是2.0版本,升级包中包括3.0版本的system分区。那么终端装置可以利用升级包对system分区1和system分区2中优先级高的分区进行升级。
在一种可能的设计中,所述第三分区的优先级高于所述第四分区,包括如下至少一种:
若所述第三分区处于未使用状态,所述第四分区处于使用状态;或者,
若所述第三分区的版本低于所述第四分区的版本;或者,
若所述第三分区的使用频率低于所述第四分区的使用频率。
继续以上面的例子为,终端装置可以利用升级包对system分区1和system分区2中优先级高的分区进行升级,那么在此之前需要判断system分区1和system分区2哪一个优先级高。例如,system分区1处于未使用状态,system分区2处于使用状态,则system分区1的优先级高,如此,可以优先对处于未使用状态的分区进行升级,避免对正在使用的分区升级导致业务中断。再例如,system分区1的版本低于system分区2的版本,则system分区1的优先级高于system分区2,即优先对版本较低的分区升级,以保证低版本及时更新。再例如,system分区1的使用频率低于system分区2,则system分区1的优先级高于system分区2,即优先对使用频率较低的分区进行升级,提升使用率。
在一种可能的设计中,所述第一分区表是所述终端装置出厂时默认存储的。需要说明的是,目前的终端装置出厂时配置的分区表不可更新、不可编辑的,本申请实施例中,终端装置出厂时配置的分区表是可更新的,而且可以包括N个分区中一个或多个分区的信息,更加灵活。
在一种可能的设计中,所述第一分区表存储在所述终端装置中的应用层、框架层或内核层中。需要说明的是,目前,分区表(包括A面分区表、B面分区表)存储在终端装置的内核层中,且不可编辑。本申请实施例中,第一分区表可以存储在应用层、框架层、系统层或内核层中的任一层,更加灵活。以存储在内核层为例,一般内核层中的信息对于上层(应用层、系统层、框架层等)不可见,所以当第一分区表存储在内核层时,保密性较好,安全性较高。以存储在内核层的上侧(例如应用层、框架层、系统层)为例,由于内核层的上层与终端装置的业务关联度较高(例如,应用层中包括各种应用,当某应用运行某业务时,通过框架层中的API接口调用系统层中的软件模块,进而调用底层硬件实现该业务),所以,上层可以根据业务需求对第一分区表进行更新,这样,第一分区表的灵活度更高,而且更新的第一分区表更加适合用户的业务需求。
在一种可能的设计中,获取所述第一分区表,包括:读取第二分区表,所述第二分区表是所述终端装置出厂时默认存储的分区表,且所述第二分区表不可编辑,所述第二分区表中包括第五分区的数据的当前存储地址;下载升级包,所述升级包用于对所述第五分区升级;记录第三分区表,所述第三分区表中包括所述第五分区的升级包的存储地址;根据所述第三分区表和所述第二分区表,组合形成所述第一分区表,所述第一分区表是在所述第二分区表中所述第五分区的当前存储地址的上层叠加所述第三分区表中所述升级包的存储地址。也就是说,终端装置出厂时配置了第二分区表(即背景技术中所述的A面分区表和/或B面分区表),终端装置可以将第二分区表与第三分区表(记录有升级包的存储地址)组合形成第一分区表,利用第一分区表运行操作系统。由于第一分区表可更新,便于终端装置后续进行系统升级或优化。
在一种可能的设计智能锅,在所述第二分区表中所述第五分区的当前存储地址的上层叠加所述第三分区表中所述升级包的存储地址,包括:确定所述第二分区表中所述第五分区对应的文件节点,所述文件节点能够访问存储于所述第五分区的当前存储地址内的数据;建立所述文件节点与所述第三分区表中所述升级包的存储地址之间的关联关系,使得通过所述文件节点能够访问所述升级包。也就是说,终端装置可以通过建立第二分区表中第五分区对应的文件节点与第三分区表中升级包(用于升级第五分区的升级包)存储地址之间的关联关系,将第二分区表与第三分区表组合形成第一分区表。由于第一分区表可更新,便于终端装置后续进行系统升级或优化。
在一种可能的设计中,所述方法还包括:确定所述终端装置中第二应用需要访问所述第一分区表中第六分区中存储的数据;判断所述第二应用是否具有所述第一分区表的访问权限;当确定所述第一应用具有所述第一分区表的访问权限时,允许所述第二应用基于所述第一分区表访问所述第六分区中存储的数据。也就是说,第一分区表设置有访问权限,具有访问权限的应用可以访问第一分区表中分区的存储数据,否则,无法访问,这样,可以提升数据安全性,避免分区内的数据的泄露。
在一种可能的设计中,N个分区包括:系统(system)分区,定制(cust)分区,版本(Version)分区,产品(Product)分区,补丁(Patch)分区中的至少一种。需要说明的是,此处列举了分区的几种示例,实际上,还可以其它分区,本申请实施例不作限定。
第二方面,提供一种终端装置,包括:
处理器,存储器,以及,一个或多个程序;
其中,所述一个或多个程序被存储在所述存储器中,所述一个或多个程序包括指令,当所述指令被所述处理器执行时,使得所述终端装置执行如上述第一方面所述的方法。
第三方面,提供一种终端装置,包括:
获取单元,用于获取第一分区表,所述第一分区表中包括所述终端装置中N个分区中至少一个分区的信息、且所述第一分区表可更新;所述N个分区中不同分区为用于存储所述终端装置中不同功能数据的存储区,N为正整数;
处理单元,用于根据最新的所述第一分区表,读取所述至少一个分区中存储的数据,并基于所述数据,运行所述终端装置的操作系统。
第四方面,还提供一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如上述第一方面所述的方法。
第五方面,还提供一种计算机程序产品,包括计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如上述第一方面所述的方法。
第六方面,本申请实施例还提供一种芯片,所述芯片与电子设备中的存储器耦合,用于调用存储器中存储的计算机程序并执行本申请实施例第一方面的技术方案,本申请实施例中“耦合”是指两个部件彼此直接或间接地结合。
上述第二方面至第六方面的有益效果,参见第一方面的有益效果,不重复赘述。
附图说明
图1为本申请一实施例提供的终端装置的硬件结构的示意图;
图2为本申请一实施例提供的终端装置的软件结构的示意图;
图3为本申请一实施例提供的终端装置的系统分区的示意图;
图4为本申请一实施例提供的一种升级方式的示意图;
图5为本申请一实施例提供的一种升级方法的流程示意图;
图6为本申请一实施例提供的另一种升级方式的示意图;
图7为本申请一实施例提供的分区表组合形成的示意图;
图8为本申请一实施例提供的升级前后的对比示意图;
图9A至图9B为本申请一实施例提供的终端装置中文件节点与分区的示意图;
图10至图11为本申请一实施例提供的文件节点的示意图;
图12为本申请一实施例提供的回滚流程的示意图;
图13为本申请一实施例提供的车机系统的示意图;
图14为本申请一实施例提供的车机的软件结构的示意图;
图15至图16为本申请一实施例提供的在分区内存储回滚包的示意图;
图17为本申请一实施例提供的终端装置的另一种结构示意图。
具体实施方式
以下,对本申请实施例中的部分用语进行解释说明,以便于本领域技术人员理解。
本申请实施例涉及的至少一个,包括一个或者多个;其中,多个是指大于或者等于两个。另外,需要理解的是,在本说明书的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为明示或暗示相对重要性,也不能理解为明示或暗示顺序。例如,第一设备和第二设备并不代表二者的重要程度或者代表二者的顺序,仅仅是为了区分描述。在本申请实施例中,“和/或”,仅仅是描述关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本说明书的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
本申请实施例提供的系统运行方法适用于终端装置。终端装置中包括系统,所述系统可以是任意的操作系统,例如等等。示例性的,所述终端装置可以是手机、平板电脑、笔记本电脑等便捷式终端装置。或者,终端装置还可以是手表、手环等穿戴设备。或者,终端装置还可以是电视机、冰箱等智能家居设备。或者,终端装置还可以是交通工具,例如各种类型的车辆。或者,终端装置还可以是车载设备,例如,车机、智能座舱或者智能座舱中的各个系统,例如车载信息娱乐系统IVI(In-Vehicle Infotainment)或者其它车载装置,例如车控域控制器(Vehicle Domain Controller,VDC)、智能座舱域控制器(Cockpit Domain Controller,CDC)、智能驾驶域控制器(ADAS/AD DomainController,ADC)、移动数据中心(Mobile Data Center,MDC)等等。示例性的,车载设备可与车辆采用一体设置(比如,设置于车辆内部);或者,也可以与车辆采用分离式设置(例如,车载设备可通过终端设备等形式实现)。这里的终端设备例如可以是车机等车载设备。又或者,终端装置也可以是一种处理装置,例如处理芯片、处理器,可以设置于车载设备内部,如车机中的处理器,或者,设置在车载设备外部可通过有线或无线的方式与车载设备进行通信。此外,应理解,根据实际使用的需要,也可将车辆替换为火车、飞行器、移动平台等其他载具或交通工具,本申请对此不做限定。或者,终端装置还可以是虚拟现实(Virtual Reality,VR)设备、增强现实(Augmented Reality,AR)设备、混合现实技术(Mixed Reality,MR)设备,等等,总之本申请实施例不限定终端装置的具体类型,可以是具有至少两个系统分区的任意设备。
图1示出了终端装置的结构示意图。所述终端装置可以是上述列举的终端装置中的任意一种。如图1所示,终端装置可以包括存储系统100。存储系统100可以包括控制器105、硬盘阵列120、供电系统110以及散热系统115。可以理解的是,图1所示的部件并不构成对终端装置的具体限定。本申请实施例中的终端装置可以包括比图1中更多或更少的部件。例如,除了存储系统100以外,终端装置中还可以包括显示屏、摄像头、各种传感器、移动通信模块、无线通信模块、音频模块等等其它部件,本申请实施例不一一介绍。此外,图1中的部件之间的组合/连接关系也是可以调整修改的。
控制器105是存储系统100的“大脑”。控制器105中包括处理器(processor)118、通信接口112、存储器(memory)122、通信总线(简称总线)116以及主机总线适配器(Host Bus Adapter,HBA)114。处理器118、通信接口112、存储器122以及HBA 114通过通信总线116完成相互间的通信。
通信接口112可以是控制器105的业务访问接口,控制器105可以通过通信接口112与主机和存储阵列120等外部设备通信。例如,控制器105可以通过通信接口112接收主机对硬盘阵列120的访问请求。
HBA 114是一个在控制器100和硬盘阵列120间提供输入/输出(Input/Output,I/O)处理和物理连接的电路板或集成电路适配器。可以理解的是,实际应用中,除了采用HBA外,控制器100和硬盘阵列120之间还可以采用其他通信接口设备通信,例如,控制器100和硬盘阵列120之间可以直接通过以太网控制器通信。
存储器122,用于存放程序124。存储器122可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory)。可以理解的是,存储器122可以为随机存储器(Random-Access Memory,RAM)、磁碟、硬盘、U盘、移动硬盘、光盘、固态硬盘(Solid State Disk,SSD)或者其他非易失性存储器等各种可以存储程序代码的非短暂性的(non-transitory)机器可读介质。
程序124可以包括程序代码,所述程序代码包括计算机操作指令。
处理器118可能是一个中央处理器CPU,或者是特定集成电路(Application Specific Integrated Circuit,ASIC),或者是能实施本申请实施例的一个或多个集成电路。处理器118可以根据不同的软件程序实现不同的功能。例如,处理器118可以处理根据访问硬盘130的业务请求对硬盘130中的数据进行处理(例如根据硬盘130中的数据运行操作系统)等等。在本申请实施例中,处理器118用于执行程序124,具体可以执行下述方法实施例中的相关步骤。
尽管图1所示的控制器105位于存储系统100内,但在有些情况下,控制器105也可以位于存储系统外部或位于存储系统较远的位置。并且,即使图1只给出了一个控制器105的示例,但实际应用中,控制器105也可以有多个。例如,当有多个控制器105的情况下,在一个控制器出现故障时,可以由其他的控制器接管该有故障的控制器的工作,以实现对硬盘阵列120的控制,保证存储系统100的正常工作。
硬盘阵列120用于存储数据。需要说明的是,硬盘阵列120也可以替换为一个或多个硬盘,例如,终端装置的数据较少,此种情况下可以仅有一个或多个硬盘即可,无需硬盘阵列。本文主要以硬盘阵列120为例进行说明,但是不限定终端装置中一定有硬盘阵列,如果仅有一个或多个硬盘也是可以的。示例性 的,硬盘阵列120可以包括独立磁盘冗余阵列(Redundant Array of Independent Disks,RAID)。实际应用中,硬盘阵列120可以有一个或多个。硬盘阵列120中可以包括一个或多个硬盘组125,每个硬盘组125由一个或多个硬盘(Hard Disk Drive,HDD)130组成。需要说明的是,硬盘130仅仅是构建硬盘阵列120的存储器的一种示例,本申请实施例中的存储器可以包括固态硬盘(Solid State Drives,SSD)、由多个硬盘构成的机柜或服务器等装置,在此不做限定。
如图1所示,硬盘阵列120可以通过总线接口(例如HBA 114)与控制器105连接。例如,硬盘阵列120可以通过SAS接口、SCSI接口或SATA接口与控制器105连接,在此不做限定。以硬盘阵列120通过SAS接口与控制器105连接为例,硬盘阵列120可以包括串行连接SCSI(Serial Attached SCSI,SAS)扩展器(Expander)以及多个硬盘130。控制器105中的HBA 114连接SAS扩展器,并通过SAS扩展器连接多个硬盘130。本领域技术人员可以知道SAS扩展器可以包括多个端口,可以用来扩充硬盘阵列120的容量。例如,SAS扩展器可以是12端口、28端口或36端口的扩展器,在此不做限定。可以理解的是,硬盘阵列120中可以包括多个SAS扩展器,每个硬盘组125中的硬盘130均可以通过SAS扩展器连接。
在一些实施例中,为了便于对硬盘130进行管理,可以将存储系统100中的多个硬盘130分成多个硬盘组125。其中,一个硬盘组125中至少包括一个硬盘130。需要说明的是,当一个硬盘组125中包括多个硬盘130时,属于同一个硬盘组125中的多个硬盘130的资源均不冲突,其中,在本申请实施例中的资源是指供电、散热、振动等能够影响硬盘正常工作的因素。例如,属于同一个硬盘组125中的多个硬盘130可以同时工作,属于同一个硬盘组125中的多个硬盘130可以同时被上电或下电。在本申请实施例中,对硬盘130进行调度时是以硬盘组125为单位进行调度的。一个业务请求可以由一个硬盘组125中的一个或多个硬盘130进行处理。例如,同一个硬盘组125中的多个硬盘130可以构成独立磁盘冗余阵列(RedundantArrays of Independent Disks,RAID),该硬盘组125中的多个硬盘130能够根据接收的业务请求同时读取一个分条(stripe)的数据块。本领域技术人员可以知道,本申请实施例中描述的分条(stripe),是指并行写入构建RAID的各个硬盘130上的数据块的集合。其中,分条中的各个数据块的大小相同,且同一个分条上的数据块位于各个存储器中的偏移位置相同。分条上的数据块也可被称为条带(strip),条带是一个盘区上的连续地址块。需要说明的是,在本申请实施例中一个业务请求不会由多个硬盘组125协同处理。本申请实施例中的业务请求可以包括对存储于存储系统100中的数据的读请求和写请求。
供电系统110可以为控制器105和硬盘阵列120供电。散热系统115可以为控制器105和硬盘阵列120散热。具体的,供电系统110可以由一个或多个电源模块组成。散热系统115可以采用空调系统或风扇等设备为硬盘130和控制器105散热。在此不对供电系统110和散热系统115的具体类型进行限定。在图1所示的存储系统100中,以控制器105和硬盘阵列120共用一个供电系统110和一个散热系统115为例。在实际应用中,控制器105和硬盘阵列120也可以使用不同的供电系统和散热系统。在此不做限定。
在本申请实施例中,终端装置可以包括N个分区,N个分区是分别用于存储终端装置中不同功能数据的存储区域。N个分区可以位于图1中硬盘阵列120中的不同硬盘组内或者同一磁盘组内不同磁盘或同一磁盘组内相同磁盘的不同区域,等等。控制器105(例如,控制器105中的处理器118)可以基于第一分区表(记录有分区的数据存储地址)读取分区内的数据,以运行操作系统。例如,第一分区表中包括分区1的数据存储地址1和分区2的数据存储地址2。处理器118通过HBA 114向硬盘阵列120发送业务请求,该业务请求中包括数据存储地址1和数据存储地址2。硬盘阵列120基于数据存储地址1读取数据,基于数据存储地址2读取数据,以使处理器118基于读取到的数据运行操作系统。前面一条业务请求中既携带了分区1的数据存储地址1,也携带了分区2的数据存储地址2,可以理解的是,分区1的数据存储地址1和分区2的数据存储地址2也可以对应两条不同的业务请求,例如业务请求1中携带分区1的数据存储地址1,业务请求2中携带分区2的数据存储地址2。其中,第一分区表可以存储在存储器122中或者硬盘阵列120中某个磁盘中,本申请实施例不作限定。
图2为本申请一实施例提供的终端装置的软件结构的示意图。
示例性的,终端装置的软件结构可以是分层架构,例如可以将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。如图2,电子设备可包括应用程序层(简称应用层),应用程序框架层(简称框架层)(framework,FWK),硬件层等等。
其中,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。例如,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。其中,窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。资源管理器为应用程序提供各种资源,例如本地化字符串,图标,图片,布局文件,视频文件等等。通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。例如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
硬件层中包括终端装置中的各种硬件,例如各种传感器(加速度传感器、重力传感器、触摸传感器),显示器等等。
需要说明的是,图2是对终端装置的软件结构的示例性介绍,在实际应用中,终端装置的软件结构可以包括比图2更多或更少的层,或者,每一层中包括比图2更多或更少的模块;或者,层与层之间的位置关系也可以调整,等等,总之图2所示的软件结构并不构成对终端装置软件结构的具体限定。
本申请实施例的第一分区表可以存储在图2所示的多层中的任意一层,例如,应用层、框架层、系统层或内核层。以存储在内核层为例,一般内核层中的信息对于上层(应用层、系统层、框架层等)不可见,所以当第一分区表存储在内核层时,保密性较好,安全性较高。以存储在内核层的上侧(例如应用层、框架层、系统层)为例,由于上层与终端装置的业务关联度较高(例如,应用层中包括各种应用,当某应用运行某业务时,通过框架层中的API接口调用系统层中的软件模块,进而调用底层硬件实现该业务),所以,上层可以根据业务需求对第一分区表进行更新(参见后文介绍),这样,第一分区表的灵活度更高,而且更新的第一分区表更加适合用户的业务需求。以第一分区表存储在内核层为例,系统层可以获取到最新的第一分区表,然后根据该第一分区表,读取分区中存储的数据,基于这些数据,运行终端装置的操作系统。
下文结合附图对本申请的技术方案做详细介绍。
为了实现无缝升级,终端装置可以包括两个系统分区,分别为第一系统分区和第二系统分区。其中,第一系统分区也被称为A系统分区或A面,第二系统分区也被称为B系统分区或B面,如图3所示。其中,A面和B面可以对应同一操作系统的不同版本或者也可以对应不同操作系统。以A面和B面对应同一操作系统不同版本为例,例如,A面对应的低版本,B面对应的高版本。假设终端装置当前运行在A面,当需要升级到高版本时,可以从A面切换到B面,实现系统升级,这种升级方式也被称为A/B升级。如果升级失败还可以继续运行在A面,不影响用户正常使用,即无缝升级。
继续如图3所示,A面和B面可以分别包括多个分区,不同分区用于存储终端装置中不同功能数据。例如,A面包括分区1至分区n,B面包括分区k至分区m。其中,A面分区与B面分区不重叠。以A面和B面包括相同数量、相同类型的分区为例,分别为系统(System)分区,定制(Cust)分区,版本(Version)分区,产品(Product)分区,补丁(Patch)分区这五种类型的分区。为了方便区分A面与B面的分区,A面的分区的名称增加后缀“_a”,B面的分区名称增加后缀“_b”。例如,如图4所示,A面包括:A 面系统(System_a)分区、A面定制(Cust_a)分区、A面版本(Version_a)分区、A面产品(Product_a)分区、A面补丁(Patch_a)分区。B面包括:B面系统(System_b)分区、B面定制(Cust_b)分区、B面版本(Version_b)分区、B面产品(Product_b)分区、B面补丁(Patch_b)分区。其中,不同分区用于存储不同功能数据,例如System分区可以用于存储系统类数据,例如包含整个操作系统和预装软件。Product分区用于存储产品类数据,例如运营商的相关信息。用户分区用于存储音乐,视频,图片等各种用户个性化数据。
继续如图4所示,终端装置中存储有A面的分区表1和B面的分区表2,分区表还可以有其它名称,例如分区映射关系表。分区表中存储有对应面内所有分区的信息。例如,A面对应分区表1,其中存储有A面内所有分区的信息,例如,A面内每个分区的分区名与存储地址(包括起始地址与结束地址)。这样,终端装置可以基于分区表1中每个分区的存储地址读取数据以运行于A面。再例如,B面对应分区表2,其中存储有B面内所有分区的信息,例如,B面内每个分区的分区名以及存储地址(包括起始地址、结束地址)。这样,终端装置可以基于分区表2中每个分区的存储地址读取数据以运行于B面。
目前,A区的分区表1和B区的分区表2在终端装置出厂前就写入到终端装置中(写入如图2中的内核层),是不可编辑、不可更改的。由于分区表的不可编辑、不可更改,会导致一些问题,例如,终端装置升级时需要从A面切换到B面,由于A面的分区表1与B面的分区表2都是固定的,所以需要A面的分区表1完全切换到B面的分区表2。但是存在一种情况,例如B面相对于A面只有部分分区升级了,有些分区没有升级,那么对于没有升级的这些分区,也需要完全切换到分区表2,显然会影响升级效率。而且,由于需要将分区表1完全切换到分区表2,所以需要关机重启,才能实现升级,操作不够便捷。
为了方便理解,举一个例子,继续如图4所示,A面是1.0,对应分区表1;B面是2.0,对应分区表2。其中,分区表1中的Patch_a分区与分区表2中的Patch_b分区不同,例如,Patch_a分区对应1.0版本的数据存储地址,例如/dev/block/sdd1.0。Patch_b分区对应2.0版本的数据存储地址,例如/dev/block/sdd2.0。分区表1与分区表2中其它分区相同。为了方便理解,图4中A面与B面不同的分区使用暗底色标记,相同的分区则不使用暗底色标记。终端装置在升级之前,遍历分区表1读取数据以运行在A面,在升级后,重新遍历分区表2读取数据以运行在B面。显然,对于A面与B面中相同的分区,也需要重新遍历一次,降低了升级效率。
本申请实施例提供一种系统运行方法,该方法中,终端装置中包括N个分区,N为正整数,所述N个分区分别是用于存储终端装置中不同功能数据的存储区域。终端装置获取第一分区表,第一分区表中包括N个分区中至少一个分区的信息,例如,第一分区表中可以包括分区1至分区2,或者,也可以包括分区3至分区4,比较灵活。而且,第一分区表可更新,例如,第一分区表原本是N个分区中某些分区组成,在更新后,由N个分区中另一些分区组成,实现分区的灵活组合。终端装置基于最新的第一分区表,读取数据以运行操作系统。相对于传统方式(即A面分区表与B面分区表无法更新),更加灵活,对系统的优化与升级提供一定的便捷性。
实施例一
请参见图5,为本申请一实施例提供的系统运行方法的流程示意图。该方法可以适用于终端装置,终端装置请参见前文介绍。如图5所示,所述流程包括:
S501,获取第一分区表,第一分区表中包括N个分区中至少一个分区的信息,且第一分区表可更新。
分区可以理解为终端装置中用于存储不同功能数据的存储区域,例如,不同磁盘(如,C盘、D盘等),或者,某个磁盘(例如C盘上)的不同存储区域等。示例性的,N(N为正整数)个分区可以包括:System分区,Cust分区,Version分区,Product分区,Patch分区,等等。以其中的三个分区为例,System分区中存储有系统类数据,以系统为例,System分区中存储有系统的底层软件。product分区中存储有产品类数据,例如,运营商的相关信息。用户分区中存储有用户类数据,例如用户个性化数据,如用户自己下载的应用、拍摄的图像、发送的即时通信消息等等。这里是以System分区、product分区和用户分区三个分区为例的,对于其它分区不作详细介绍。此外,分区方式可以有多种,例如谷歌原生分区方式、鸿蒙固定分区表的分区方式,等等,本申请不作详细赘述。
在一些实施例中,N个分区可以不作A面与B面的区分。例如终端装置中包括12个分区,即分区1至分区12,这12个分区没有区分哪个是A面的分区或者哪个是B面的分区。第一分区表可以包括这12个分 区中的至少一个分区。
在另一些实施例中,N个分区也可以作A面与B面的区分。例如,终端装置中包括12个分区,即分区1至分区12,这12个分区中分区1至分区6是A面的分区,分区7-分区12是B面的分区。这种情况下,第一分区表可以包括这12个分区中的至少一个分区,包括一种情况,即,第一分区表中包括A面的所有分区中的至少一个,以及B面所有分区中的至少一个。换言之,第一分区表是A面和B面的分区的组合。为了方便理解,举一个例子,请参见图6,第一分区表中包括A面中的System_a分区,Cust_a分区,Version_a分区,Product_a分区,Patch_b分区,其中,前4个分区是A面的分区,最后一个分区是B面的分区。请对比图6与图4,与图4中的分区表不同的是,图4中A面的分区表1和B面的分区表2是出厂时就写入终端装置的且不可编辑的,而且A面的分区表1中只包括A面的分区的信息,B面的分区表2中只包括B面的信息,两个分区表彼此独立,不存在A面的分区与B面的分区组合的情况,而图6中,第一分区表中既可以包括A面的分区,也可以包括B面的分区,更为灵活。
总之,本申请实施例中,终端装置划分N个分区,可以方便管理,而且能够实现第一分区表由于N个分区中不同分区的灵活组合。此外,为了避免在每个分区中写入数据时出错,终端装置可以事先确定出每个分区的数据存储地址,例如起始地址和结束地址,在写入每个分区的数据时,可以从起始地址开始写,在结束地址时停止写。这样就可以保证每个分区的数据不会写错区域。而且,还可以对写入的数据作校验,以确定写入的数据可靠完整。
示例性的,S501中获取第一分区表可以有多种方式。
例如,第一分区表是终端装置出厂时默认存在的。示例性的,第一分区表可以存储在终端装置的应用层、框架层、内核层中的任一层。与前文所述的现有技术不同的是,现有技术中,终端装置中出厂时将A面的分区表1与B面的分区表2烧注于内核层,而本申请中,第一分区表可以在应用层、框架层、系统层、内核层中的任一层。以存储在内核层为例,一般内核层中的信息对于上层(应用层、系统层、框架层等)不可见,所以当第一分区表存储在内核层时,保密性较好,安全性较高。以存储在内核层的上侧(例如应用层、框架层、系统层)为例,由于上层与终端装置的业务关联度较高(例如,应用层中包括各种应用,当某应用运行某业务时,通过框架层中的API接口调用系统层中的软件模块,进而调用底层硬件实现该业务),所以,上层可以根据业务需求灵活、及时的对第一分区表进行更新,这样,第一分区表的灵活度更高,而且更新的第一分区表更加适合用户的业务需求。例如,当某业务需要升级时,支持该业务的分区包括system分区,那么上层可以下载针对该业务的升级包,并记录该升级包的存储地址,基于该存储地址更新第一分区表中的system分区的当前分区。
再例如,第一分区表是用户设置的,例如用户可以选择N个分区中哪几个分区组合生成第一分区表。
再例如,第一分区表还可以是基于第二分区表和第三分区表混合生成的。其中,第二分区表是终端装置出厂时写入的不可编辑的分区表,即前文图4中的A面的分区表1以及B面的分区表2。第三分区表是基于升级包得到的,例如,终端装置下载升级包,该升级包用于对N个分区中分区1进行升级,例如,升级包中包括分区1的高版本安装包。终端装置将该分区1的高版本按安装包存储在地址1,并在第三分区表中记录分区1以及地址1。简单来说,第三分区表可以理解为升级包所针对的分区以及升级包的存储地址。终端装置可以将第三分区表与第二分区表混合得到第一分区表。可以理解的是,第二分区表中也包括分区1的地址2(低版本的安装包),第三分区表中也包括分区1的地址1(高版本的安装包)。一种可能的混合方式为,在第二分区表中分区1的地址2上层叠加地址1得到第一分区表(例如,一种可实现方式为后文图9A和图9B的过程,请参见后文描述)。在一些实施例中,第一分区表中也可以包括地址1和地址2,且标记地址1的优先级高于地址2。示例性的,请参见图7所示,第一分区表表示为混合表(mixed_table),第二分区表表示为固定表(fixed_table),即出厂时写好的不可编辑表,第三分区表表示为动态表(dynamic_table),该表是基于升级包得到的。mixed_table可以由fixed_table与dynamic_table混合而成,例如,dynamic_table中的patch_b分区叠加于第二分区表中patch_a分区的上层,得到第一分区表。在一些实施例中,继续参见图7,dynamic_table中的patch_b分区叠加于第二分区表中patch_a分区的上层之后,被覆盖的patch_a分区叠加于第二分区表中的patch_b分区。由此可见,原本的A面分区表中的patch_a分区与B面分区表中patch_b分区实现交换,相对于传统分区表(A面分区表与B面分区表均不可更新),更为灵活。
在本申请实施例中,第一分区表可以更新。例如,第一分区表中所包含的分区组合可以更新。示例 性的,原本第一分区表中包括N个分区中分区1至分区2,更新之后,第一分区表中包括N个分区中的分区3至分区4,当然,更新前后的第一分区表也可以相同。换言之,第一分区表是N个分区中不同分区的灵活组合。例如,请参见图8,原本第一分区表包括A面的分区,确定A面的patch_a分区需要升级为B面的patch_b分区时,更新第一分区表,更新后的第一分区表中原来A面的patch_a分区替换为B面的patch_b分区,其它分区不需要更新。为了方便理解,请对比图8与图4,图4中,升级之前基于A面的分区表1运行在A面,升级时切换到B面,基于B面的分区表2运行在B面,由于分区表1和分区表2是独立且不可更新的表,即便A面与B面的分区表中有相同的分区,也需要重新遍历。但是图8中,第一分区表可编辑,当需要升级A面的某个分区时,只需要更新第一分区表中该分区即可,终端装置基于更新后的第一分区表运行。换言之,第一分区表中未被更新的分区不需要重新遍历,只有被更新的分区(例如patch_a分区更新为patch_b分区)需要重新加载即可,显然相比于图4中的升级方式效率更高。
再例如,在需要升级某个分区时,终端装置还可以下载对该分区的升级包,基于升级包对第一分区表中该分区进行更新。例如,假设第一分区表中包括分区1至分区3。终端装置下载升级包,该升级包用于对分区1进行升级。例如,升级包中包括分区1的高版本的安装包。终端装置将分区1的高版本安装包存储在地址1,并将第一分区表中分区1的当前存储地址更新为地址1。这里的“将分区1的当前存储地址”更新为“地址1”可以理解为将当前存储地址替换为地址1,或者,在当前存储地址上挂载地址1。
存在一种可能的情况,终端装置下载的升级包能够对第一分区表中两个分区都进行升级。示例性的,一种可能的场景为,第一分区表中包括A面的分区1以及B面的分区2,分区1和分区2是不同面的同一分区,例如,分区1是patch_a,版本为1.0版本,分区2是patch_b,版本为2.0版本。假设升级包是patch分区的3.0版本,即升级包既可以对分区1升级,也可以对分区2进行升级。这种情况下,终端装置可以对分区1和分区2均进行升级,或者,根据优先级决定升级哪一个。例如,方式1,正在使用的分区优先级低,例如,终端装置正在使用分区1,没有使用分区2,那么优先升级分区2,即将第一分区表中分区2的数据存储地址更新为第一存储地址,第一存储地址为升级包的存储地址。方式2,版本低的分区优先级高。例如,分区1是1.0版本,分区2是2.0版本,即分区1的优先级高于分区2,可以优先升级分区1,即将第一分区表中分区1的当前存储地址更新为第一存储地址,第一存储地址为升级包的存储地址。方式3,使用频率低的分区优先级高,例如,分区1的使用频率低于分区2的使用频率,则优先升级分区1,即将第一分区表中分区1的当前存储地址更新为第一存储地址,第一存储地址为升级包的存储地址。
在一些实施例中,终端装置对第一分区表中某个分区升级时,可以使用热升级或冷升级的方式。其中,热升级与冷升级的区别在于,热升级之后不需要重启设备,不影响正常运行,而冷升级之后需要重启设备才能生效。关于热升级与冷升级的具体方式,本申请不作详细介绍。在一些实施例中,终端装置还可以判断待升级的分区适用于热升级还是冷升级。如果适用于热升级,可以使用热升级的方式,如果适用于冷升级,则使用冷升级的方式进行升级。示例性的,终端装置判断待升级的分区适用于冷升级还是热升级的方式可以包括:根据所述分区的属性,判断其适用于冷升级还是热升级。示例性的,所述分区的属性,包括:对于一个分区,每次有新版本上架时,为该新版本的分区设置一个标签,该标签用于指示该分区适用于热升级还是冷升级,例如标签为1时,说明适用于热升级,标签为0时,说明适用于冷升级。其中,关于热升级与冷升级的区别本文不作详细的赘述。
下面以热升级为例,说明对分区的升级过程。为了方便理解,继续以分区patch分区为例。
一般,一个分区(例如C盘中某块存储区域)可以包括一个或多个存储区域,比如,一个分区是容量为1G的存储区域,可以划分为多个更小容量的存储区域(可以理解为子存储区域)。该分区内不同存储区域内可以存储不同数据。例如,该分区内包括存储区域1至存储区域3,存储区域1内存储数据1,存储区域2内存储数据2,存储区域3内存储数据3,每个存储区域内存储不同数据,而且,每个存储区域对应有存储地址,例如,数据1的存储地址可以是存储区域1的起始地址以及结束地址。
终端装置(例如内核层)需要从分区中读取数据来运行操作系统,所以需要知道分区内不同数据的存储地址。作为一种示例,如图9A,内核层创建了各个文件节点,例如Patch节点、Cust节点、product节点等。文件节点可以理解为用于记录数据存储地址的目录,通过目录可以读取到相应的数据。例如,Patch节点对应patch_a分区或patch_b分区,即Patch节点中存储patch_a分区内数据的存储地址,或者,patch_b分区内数据的存储地址。同理,Cust节点对应Cust_a分区或Cust_b分区。product节点对应product_a分区或product_b分区。当Patch节点对应patch_a分区、Cust节点对应Cust_a分区、product节点对应 product_a分区时,终端装置可以基于patch_a分区、Cust_a分区、product_a分区运行系统,即运行在A面。当Patch节点对应patch_b分区、Cust节点对应Cust_b分区、product节点对应product_b分区时,终端装置可以基于patch_b分区、Cust_b分区、product_b分区运行系统,即运行在B面。
以patch分区为例,对该patch分区升级,可以理解为,Patch节点原本对应的是patch_a分区需要切换为对应patch_b分区。为了方便理解,请参见图9B,patch分区的升级可以理解为,从patch_a切换到patch_b分区,以使Patch节点原本对应patch_a分区切换为对应patch_b分区。
在一些示例中,Patch节点从patch_a分区切换为patch_b分区时,patch_a分区可能处于工作状态,这种情况下,可以以直接挂载的方式将patch_b分区接入到已经工作的patch_a分区(例如,patch_b分区的数据存储地址直接挂载到patch_a分区的目录上),或者,也可以使用先卸载再挂载的方式,例如先卸载patch_a分区,然后将patch_b分区的数据存储地址挂载到Patch节点上。这种方式即热升级,无需重启设备即可完成升级,不影响当前工作。
下面结合图9B与图10,说明Patch节点对应的分区从patch_a分区切换为patch_b分区的具体实现原理。
假设patch_a分区中包括三个存储区域,例如,图10中的inode1_a,inode2_a,inode3_a三个存储区域(也可以称为存储节点或实际节点),这三个存储区域内存储patch_a分区的不同数据。为了记录这三个存储区域的数据的存储地址,图9B中Patch节点中包括三个文件节点,即文件节点1至文件节点3,文件节点1对应inode1_a,用于记录inode1_a内数据的存储地址,文件节点2对应inode2_a,用于记录inode2_a内数据的存储地址,文件节点3对应inode3_a,用于记录inode3_a内数据的存储地址,这种对应关系,请参见图10。这样的话,内核层可以基于文件节点1记录的数据存储地址,读取到patch_a分区中inode1_a这一实际节点中存储的数据;同理,基于文件节点2中记录的数据存储地址,读取到patch_a分区中inode2_a这一实际节点中存储的数据,以及基于文件节点3中记录的数据存储地址,读取到patch_a分区中inode3_a这一实际节点中存储的数据。
在一些示例中,文件节点可以使用对应的节点缓存(inode_cache)的虚拟机节点来标识,例如,文件节点1标识为inode_cache1,文件节点2被标记为inode_cache2,文件节点3被标记为inode_cache3。如前文所述,文件节点可以理解为用于记录数据存储地址的目录,那么,文件节点对应的节点缓存可以理解为用于存储所述目录的缓存,可以是虚拟机或者其它形式,即不同文件节点对应不同节点缓存(可以是不同的虚拟机),而虚拟机节点具有虚拟机节点标识,可以用于标识文件节点。因此,图10中的文件节点1至文件节点3可以替换为inode_cache1至inode_cache3。但应理解的是,文件节点还可以使用其它方式来标记,只要能够区分不同文件节点即可。
在一些示例中,文件节点的标识还可以用于标记该文件节点可以热更新。以Patch节点为例,其标记指示Patch节点可以热更新时,终端装置可以使用以下的方式进行Patch分区的升级,即Patch节点从patch_a分区切换为patch_b分区。
如前文所述,当Patch节点需要从patch_a分区切换为patch_b分区时,图9B中Patch节点将原本对应的patch_a分区切换为对应patch_b分区。假设patch_b分区也包括三个存储区域,例如,图11中的inode1_b,inode2_b,inode3_b三个存储区域(也可以称为存储节点或实际节点),这三个存储区域内存储patch_b分区的不同数据。由于原来图9B中Patch节点中的三个文件节点,即文件节点1至文件节点3,分别对应的是patch_a分区的inode1_a,inode2_a,inode3_a,所以需要将文件节点1至文件节点3调整为对应patch_b分区的inode1_b,inode2_b,inode3_b。
为了方便理解,先以文件节点2由原本的对应inode2_a,调整为对应inode2_b为例进行说明。示例性的,文件节点2需要与inode2_b建立关联关系,其实现方式可以包括多种,例如,方式1,inode2_b与inode2_a组合,即文件节点2既对应inode2_a,也对应inode2_b。方式2,由inode2_b替换inode2_a,例如文件节点2原本对应inode2_a,将inode2_a替换为inode2_b。方式3,方式3可以理解为方式1的进一步细化,即inode2_b与inode2_a组合之后,可以设置inode2_b与inode2_a之间的优先级,例如,inode2_a的优先级高时,对应inode2_a,inode2_b的优先级高时,对应inode2_b。其中,inode2_a与inode2_b的优先级可以是用户设置的,或者下载的升级包中规定的等等,本申请不限定。或者,终端装置还可以根据运行情况优先选择inode2_a还是inode2_b。例如,考虑到低版本的inode2_a耗电量比高版本的inode2_b,所以,在当前运行电量较低时,可以选择inode2_a,在当前运行电量较多时,可以选择inode2_b。这样的话,文件节点2与inode2_b建立了关联关系,如此,内核层通过文件节点2就可以访问inode_b分区中inode2_b的数据。方式4,创建新inode,例如,使用前面的方式1至方式3中的任意一种,建立文件节点2与新inode 之间的关联关系,然后将inode2_b挂载到新inode上。这样,内核层通过文件节点2、新inode就可以访问到inode2_b中的数据。方式5,创建新的文件节点,例如,创建文件节点4,该新的文件节点可以对应新的标识,例如,inode_cache4。文件节点4与inode2_b之间存在关联关系。因此,可以建立文件节点4与文件节点2之间的关联关系,这样就可以建立文件节点2与inode2_b之间的关联关系。其中,建立文件节点4与文件节点2之间的关联关系,可以采用文件节点的切换、插入或者组合的方式。以切换为例,文件节点2切换(可以理解为替换)为文件节点4,以插入为例,原本包括文件节点1至文件节点3,在其中插入文件节点4,且文件节点4与文件节点2存在关联。以组合为例,文件节点2与文件节点4可以组合,例如组合为一个更大的文件节点(即组合为一个新的目录)。
图10是以文件节点2由原本的对应inode2_a,调整为对应inode2_b为例,示例性的,文件节点1还可以由原本的对应inode1_a,调整为对应inode1_b,同理,文件节点3还可以由原本的对应inode3_a,调整为对应inode3_b,请参见图11。这样的话,内核层基于文件节点1记录的数据存储地址,读取到patch_b分区中inode1_b这一实际节点中存储的数据;同理,基于文件节点2中记录的数据存储地址,读取到patch_b分区中inode2_b这一实际节点中存储的数据,以及基于文件节点3中记录的数据存储地址,读取到patch_b分区中inode3_b这一实际节点中存储的数据。
当patch节点从原本对应的patch_a分区切换为对应patch_b分区之后,第一分区表对应更新。例如,更新之前第一分区表中包括:(System_a,Cust_a,Version_a,Product_a,Preload_a,Patch_a),更新之后第一分区表变成了:(System_a,Cust_a,Version_a,Product_a,Preload_a,(Patch_a:Patch_b))。其中,(Patch_a:Patch_b)用于指示由Patch_a分区升级为Patch_b分区。或者,更新之前的第一分区表包括:(System_a,Cust_a,Version_a,Product_a,Preload_a,Patch_a),更新之后的第一分区表变成了:(System_a,Cust_a,Version_a,Product_a,Preload_a,Patch_b)。即,更新之后的第一分区表由A面的分区与B面的分区灵活组合了。
在一些示例中,如果终端装置使用前面的方式1或方式3(inode2_b与inode2_a组合的方式),那么更新之后的第一分区表可以表示为:System_a,Cust_a,Version_a,Product_a,Preload_a,(Patch_a:Patch_b))。其中,(Patch_a:Patch_b)用于指示Patch节点由于Patch_a分区和Patch_b分区共同组合。应理解,如果是使用了方式3设置了Patch_a分区和Patch_b分区之间的优先级,(Patch_a:Patch_b)还可以用于指示哪一个优先级高,例如,(Patch_a:Patch_b)是Patch_a在前,Patch_b在后,则指示Patch_a优先级高于Patch_b,或者说,Patch_a是主节点,Patch_b是辅助节点;再例如,如果是(Patch_b:Patch_a)即Patch_b在前,Patch_a在后,则指示Patch_b优先级高于Patch_a,或者说,Patch_b是主节点,Patch_a是辅助节点。如果终端装置使用前面的方式2(inode2_b替换inode2_a的方式),那么更新之后的第一分区表可以表示为:(System_a,Cust_a,Version_a,Product_a,Preload_a,Patch_b)。
以上是以patch节点从原本对应的patch_a分区切换为对应patch_b分区为例的,应理解,图9A中,Cust节点从原本对应的Cust_a分区切换为对应Cust_b分区,Cust节点从原本对应的Cust_a分区切换为对应Cust_b分区也是同样原理,不重复赘述。
S502,基于最新的第一分区表,读取所述至少一个分区中存储的数据。
第一分区表中包括每个分区的数据存储地址(包括起始地址和结束地址),终端装置可以根据存储地址读取每个分区的数据。
S503,终端装置根据所述数据,运行操作系统。
可以理解的是,终端装置对第一分区表中某个分区升级时,可能会出现升级失败的情况,如果升级失败,可以执行回滚流程。所述回滚流程可以理解为分区的旧版本尝试升级为新版本,在升级失败时,回滚到旧版本。其中,“回滚”还可以有其它名称代替,例如“回退”等等。示例性的,请参见图12,终端装置系统升级时,分区表1更新为分区表2。当终端装置执行回滚操作时,将分区表2回滚到分区表1即可。如图12,所述回滚流程包括:
S1201,确定执行回滚操作。
示例性的,当满足如下条件中的至少一种时,终端装置确定需要执行回滚操作。所述条件例如包括:分区升级失败或者接收到用户输入的回滚指令等等。
S1202,将分区表2还原为分区表1。
示例性的,终端装置将分区表2还原为分区表1,可以理解为,将分区表2删除重新替换为分区表1。 可以理解的是,以图7为例,分区表2(更新后的第一分区表)相对于分区表1(更新之前的第一分区表)而言,只将patch_a分区更新为patch_b分区,其它分区并未更新,所以分区表2还原为分区表1时,可以只将patch_b分区还原到patch_a分区,其它分区不需要还原。这样终端装置回滚时,也可以不需要重新加载其它分区,只需要重新加载patch_a分区即可,采用这种方式,可以提升回滚效率。
S1203,基于分区表1运行系统。
即,终端装置基于分区表1读取分区表1中各个分区的存储数据,基于读取的数据运行系统。
可选的,在S1202之前,还可以包括步骤:接收到终端装置的重启指令。也就是说,终端装置重启时,执行回滚流程。
为了方便理解,下面以patch_a分区为例说明回滚原理。
在patch_a分区升级过程中,终端装置有可能会自动下载并安装新版本的应用。例如,升级之前,终端装置有版本1的应用,在升级后,终端装置安装了版本2的该应用。即,在patch_a分区升级时,该应用的版本对应升级了。可以理解的是,终端装置回滚时,需要完全还原到之前的状态,即需要将版本2的应用还原到版本1的应用。一种实现方式为,在升级patch_a分区时,若安装应用的新版本,为该应用的新版本设置标记,该标记用于指示该应用的新版本是patch_a分区升级时安装的。终端装置执行回滚操作时,扫描终端装置中的应用,发现该应用有标记,则删除该应用的新版本。如果在升级过程中,该应用的旧版本被删除了,可以重新下载该应用的旧版本,以实现系统还原;如果该应用的旧版本没有被删除,使用该应用的旧版本。
存在一种情况,在patch_a分区升级之前,版本1的应用的信息存储在分区1,例如,system分区(例如,版本1的应用是终端装置出厂时自带的),在patch_a分区升级之后,安装了版本2的该应用,但是版本2的该应用的信息存储在分区2,例如用户分区(例如,出厂之后下载的应用默认存储在该分区),而且,该版本2的应用带有标记,该标记用于标记该应用是patch_a分区升级时下载的。这样的话,分区1中存储版本1的应用,分区2中存储有版本2的应用(带有标记)。终端装置在回滚时,可以基于优先级进行扫描,例如,先扫描分区2,判断是否存在带有标记的应用,如果发现有,则删除该应用,然后使用分区1内的版本1的应用。再假设在patch_a分区升级之后,安装了版本2的该应用,并将版本2的该应用的信息存储在分区2,但是,没有为该版本2的应用设置标记。即,分区1中存储版本1的应用,分区2中存储带有版本2的应用(没有带标记)。这种情况下,终端装置还是基于优先级规则先扫描分区2,显然扫描分区2时,没有发现带有标记的应用,然后扫描分区1,比较分区1和分区2内同一应用的不同版本的大小,哪个分区内的版本大,则删除哪个分区内的应用,使用低版本的应用。
实施例二
本实施例二以车机为例进行说明,如前文所述,车机内包括各种域,例如IVI域、MCU域等等。前面的实施例一中的终端装置可以是车机中的IVI域。IVI域中包括A面与B面,在车机整机升级时,IVI域可以采用前面实施例一的方式(更新第一分区表)进行升级。应理解,车机内,IVI域需要与其它域(例如MCU域)通信,在车机整机升级时,与IVI域连接的其它域可以不随着IVI域的升级而升级,或者说,与IVI域连接的其它域可能不支持A/B升级。本实施例二介绍车机整机升级时,对于其它域中的组件的处理过程。
示例性的,请参见图13,为本实施例三提供的车机的一种示意图。车机中包括第一域和第二域。示例性的,第一域和第二域是车机内的两个不同的域,例如,第一域是IVI、VDC、CDC、ADC、MDC、MCU等等中的一种。第二域是IVI、VDC、CDC、ADC、MDC、MCU等中与第一域不同的域。第一域中包括A面和B面,第二域中包括其它组件,例如,组件J和组合K。这两个组件不支持A/B升级。
需要说明的是,在车机整机升级时,一般的处理方式为,第一域使用前文所述的传统升级方式(例如,A面切换到B面),第二域也需要重置(恢复出厂设置),重置时,第二域中的组件的回滚包被删除,然后在第一域升级后,从网络侧下载第二域中的组件的回滚包,基于该回滚包重新加载第二域中的组件。显然,这种方式中,车机整机升级时,需要从网络侧下载第二域中的回滚包,浪费传输资源,而且效率较低。本实施例二,可以将第二域中的组件的回滚包存储在第一域中分区的空闲存储区域内,这样的话,就不需要从网络侧下载第二域中组件的回滚包,节省传输资源,提升效率。
示例性的,如图14所示,车机中包括用户空间和底层空间。其中,用户空间还可以称为上层空间, 底层空间还可以称为下层空间,本申请对此名称不作限定。
对于第一域,用户空间中包括patch节点、system节点、product节点等。底层空间包括A面和B面。例如,patch节点对应patch_a或patch_b。system节点对应system_a或system_b。product节点对应product_a或product_b。以patch_a为例,在该分区升级之前,patch节点对应patch_a;system节点对应system_a;product节点对应product_a。那么终端装置基于patch节点、system节点、product节点运行在A面。在patch_a升级为patch_b之后,patch节点原本对应patch_a调整为对应patch_b;system节点对应system_a;product节点对应product_a。那么终端装置基于patch节点、system节点、product节点运行系统。
对于第二域,底层空间中包括MCU1和MCU2。这两个组件不支持A/B升级。换言之,在传统的车机整机升级过程中,第一域使用前文所述的传统升级方式(例如,A面切换到B面),第二域中MCU1和MCU2会恢复出厂设置,MCU1和MCU2的回滚包被删除,然后在第一域升级后,从网络侧下载回滚包,基于该回滚包重新加载MCU1和MCU2。在本申请实施例中,第二域的用户空间中创建MCU1’和MCU2’。其中,MCU1’对应MCU1,MCU2’对应MCU2。终端装置创建其它组件,为了方便理解命名为/temp,但是本申请对此名称不作限定。该其它组件可以访问底层中A面和B面中分区的空闲存储空间。例如,第二域中MCU1和MCU2的回滚包存储于A面和B面中分区的空闲存储空间内,并在/temp中记录。示例性的,/temp中记录有MCU1的回滚包存储在system_a的空闲区域内、MCU2的回滚包存储在product_a的空闲区域内。
下面结合图15说明第二域中组件的回滚包的存储过程。如图15,所述流程包括:
S1501,确定第一组件,第一组件为不包含于A面和B面中。
示例性的,第一组件可以是图14中第二域中的任一组件。
可选的,在S1501之前、之后或同时,还可以执行步骤:在上层空间中创建第一组件对应的节点。以图14为例,假设第一组件包括MCU1和MCU2,那么可以在上层空间中创建MCU1’与MCU2’。MCU1’可以访问MCU1,可用于将MCU1中的回滚包展示给用户,MCU2’可以访问MCU2,可用于将MCU2中的回滚包展示给用户。
S1502,确定A面和B面中分区的空闲存储空间。
如前文所述,A面和B面中每个分区对应一个存储空间,该存储空间用于存储对应分区的信息。例如,A面中的Patch_a分区对应的存储空间内存储有Patch_a的信息,当然该存储空间可能并未被占满,还有一定的空余量。因此,S1502可以确定A面和B面中分区的空闲存储区域。
S1503,将第一组件的回滚包存储在空闲存储空间内。
假设S1502中,确定了A面中system_a分区的空闲存储空间,以及product_a分区的空闲存储空间,以第一组件包括MCU1和MCU2为例,示例性的,MCU1的回滚包可以存储在system_a分区的空闲存储空间内,MCU2的回滚包可以存储在product_a分区的空闲存储空间内,如图16所示。
S1504,在/temp空间内记录第一组件与存储第一组件的空闲空间的对应关系。
示例性的,以图16为例,在/temp空间中记录下表;
当第一组件的回滚包存储好之后,可以进行车机的整机升级,例如,使用前文实施例一的方式进行升级。以patch_a分区为例,如果对该分区升级过程中,其它分区例如system_a和product_a并未升级,即system_a和product_a的空闲存储空间并未更新数据,所以在patch_a分区升级完之后,可以从system_a和product_a的空闲存储空间内读取第一组件的回滚包,基于该回滚包恢复第一组件,不需要从网络侧下载第三组件的回滚包。
上面的例子中,以第一组件存储在system_a和product_a的空闲存储空间为例,而升级分区是patch_a,即,升级的分区与第一组件回滚包的存储分区(system_a和product_a)不是同一个,这种情况下,可以继续将第一组件的回滚包存储在system_a和product_a的空闲存储空间中。存在一种情况:第一组件存储在system_a和product_a的空闲存储空间之后,在车机整机升级时,可能需要对system_a和product_a中的任一个或两个进行升级,换言之,第一组件存储在A面中某个分区的空闲存储区域内之后,该分区需要升级。这种情况下,可以寻找新的存储空间用于存储第一组件回滚包。例如,请参见16,MCU1和MCU2的回滚包原本存储在system_a和product_a的空闲存储空间内,由于system_a和product_a需要升级,所以 MCU1和MCU2的回滚包又存储到了其它分区例如version_a的空闲存储空间内。
图17为本申请实施例提供的终端装置1700的结构示意图。终端装置1700可以是前文中的终端装置。如图17所示,终端装置1700可以包括:一个或多个处理器1701;一个或多个存储器1702;通信接口1703,以及一个或多个计算机程序1704,上述各器件可以通过一个或多个通信总线1705连接。其中该一个或多个计算机程序1704被存储在上述存储器1702中并被配置为被该一个或多个处理器1701执行,该一个或多个计算机程序1704包括指令。比如,当终端装置1700是前文中的终端装置时,该指令可以用于执行如上面相应实施例中终端装置的相关步骤,例如,图5所示的实施例中终端装置的步骤。通信接口1703用于实现终端装置1700与其他设备的通信,比如通信接口可以是收发器。
上述本申请提供的实施例中,从终端装置(例如手机、车机)作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,电子设备可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。
以上实施例中所用,根据上下文,术语“当…时”或“当…后”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。另外,在上述实施例中,使用诸如第一、第二之类的关系术语来区份一个实体和另一个实体,而并不限制这些实体之间的任何实际的关系和顺序。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。在不冲突的情况下,以上各实施例的方案都可以组合使用。
需要指出的是,本专利申请文件的一部分包含受著作权保护的内容。除了对专利局的专利文件或记录的专利文档内容制作副本以外,著作权人保留著作权。

Claims (18)

  1. 一种系统运行方法,其特征在于,应用于终端装置,所述终端装置中包括N个分区,N为正整数,不同分区为用于存储所述终端装置中不同功能数据的存储区,所述方法包括:
    获取第一分区表,所述第一分区表中包括所述N个分区中至少一个分区的信息、且所述第一分区表可更新;
    根据最新的所述第一分区表,读取所述至少一个分区中存储的数据;
    基于所述数据,运行所述终端装置的操作系统。
  2. 根据权利要求1所述的方法,其特征在于,所述第一分区表可更新,包括:
    所述第一分区表在更新前和更新后所包含的分区是所述N个分区中不同分区的组合。
  3. 根据权利要求1或2所述的方法,其特征在于,所述终端装置支持第一操作系统和第二操作系统;其中,所述终端装置基于所述N个分区中的第一组分区运行于所述第一操作系统,所述终端装置基于所述N个分区中的第二组分区运行于所述第二操作系统,所述第一组分区和所述第二组分区不重叠。
  4. 根据权利要求3所述的方法,其特征在于,所述第一操作系统和所述第二操作系统对应不同的操作系统或者同一操作系统的不同版本。
  5. 根据权利要求3或4所述的方法,其特征在于,所述第一分区表中包括所述第一组分区中的至少一个分区的信息,以及,所述第二组分区中的至少一个分区的信息。
  6. 根据权利要求1-5任一所述的方法,其特征在于,所述第一分区表中包括每个分区的数据存储地址;所述方法还包括:
    下载升级包,所述升级包用于对所述N个分区中第一分区升级;
    存储所述升级包,并记录所述升级包的存储地址;
    根据所述存储地址,对所述第一分区表中所述第一分区的当前存储地址更新。
  7. 根据权利要求6所述的方法,其特征在于,所述升级包中包括第一应用的安装包;所述方法还包括:
    基于所述安装包,安装所述第一应用,并为所述第一应用设置标识,所述标记用于标记所述第一应用是所述第一分区升级时安装的应用;其中,所述标记用于在所述第一分区回滚时,通过识别所述应用上的标记,删除所述第一应用。
  8. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    在所述第一分区表中第二分区对应的空闲空间内存储第一组件的回滚包,所述第一组件不是所述N个分区内任一分区的组件,所述第二分区是所述第一分区表中所述第一分区以外的其它分区;其中,所述第一组件的回滚包用于在所述终端装置升级完后执行所述第一组件的回滚。
  9. 根据权利要求1-5任一所述的方法,其特征在于,所述第一分区表中包括每个分区的数据存储地址;所述方法还包括:
    下载升级包,所述升级包用于对所述N个分区中第三分区和第四分区分别进行升级,所述第三分区的优先级高于所述第四分区;
    存储所述升级包,并记录所述升级包的存储地址;根据所述存储地址,对所述第一分区表中所述第三分区的当前存储地址更新。
  10. 根据权利要求9所述的方法,其特征在于,所述第三分区的优先级高于所述第四分区,包括如下至少一种:
    所述第三分区处于未使用状态,所述第四分区处于使用状态;或者,
    所述第三分区的版本低于所述第四分区的版本;或者,
    所述第三分区的使用频率低于所述第四分区的使用频率。
  11. 根据权利要求1-10任一所述的方法,其特征在于,所述第一分区表是所述终端装置出厂时默认存储的。
  12. 根据权利要求1-11任一所述的方法,其特征在于,所述第一分区表存储在所述终端装置中的应用层、框架层、系统层或内核层中。
  13. 根据权利要求1-12任一所述的方法,其特征在于,获取所述第一分区表,包括:
    读取第二分区表,所述第二分区表是所述终端装置出厂时默认存储的分区表,且所述第二分区表不可编辑,所述第二分区表中包括第五分区的数据的当前存储地址;
    下载升级包,所述升级包用于对所述第五分区升级;
    记录第三分区表,所述第三分区表中包括所述第五分区的升级包的存储地址;
    根据所述第三分区表和所述第二分区表,组合形成所述第一分区表,所述第一分区表是在所述第二分区表中所述第五分区的当前存储地址的上层叠加所述第三分区表中所述升级包的存储地址。
  14. 根据权利要求13所述的方法,其特征在于,在所述第二分区表中所述第五分区的当前存储地址的上层叠加所述第三分区表中所述升级包的存储地址,包括:
    确定所述第二分区表中所述第五分区对应的文件节点,所述文件节点能够访问存储于所述第五分区的当前存储地址内的数据;
    建立所述文件节点与所述第三分区表中所述升级包的存储地址之间的关联关系,使得通过所述文件节点能够访问所述升级包。
  15. 根据权利要求1-14任一所述的方法,其特征在于,所述方法还包括:
    确定所述终端装置中第二应用需要访问所述第一分区表中第六分区中存储的数据;
    判断所述第二应用是否具有所述第一分区表的访问权限;
    当确定所述第一应用具有所述第一分区表的访问权限时,允许所述第二应用基于所述第一分区表访问所述第六分区中存储的数据。
  16. 一种终端装置,其特征在于,包括:
    处理器,存储器,以及,一个或多个程序;
    其中,所述一个或多个程序被存储在所述存储器中,所述一个或多个程序包括指令,当所述指令被所述处理器执行时,使得所述终端装置执行如权利要求1-15任一项所述的方法。
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1-15任一项所述的方法。
  18. 一种计算机程序产品,其特征在于,包括计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如上述权利要求1-15中任意一项所述的方法。
PCT/CN2023/107987 2022-07-28 2023-07-18 一种系统运行方法与终端装置 WO2024022176A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210898073.1 2022-07-28
CN202210898073.1A CN117519569A (zh) 2022-07-28 2022-07-28 一种系统运行方法与终端装置

Publications (1)

Publication Number Publication Date
WO2024022176A1 true WO2024022176A1 (zh) 2024-02-01

Family

ID=89705385

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/107987 WO2024022176A1 (zh) 2022-07-28 2023-07-18 一种系统运行方法与终端装置

Country Status (2)

Country Link
CN (1) CN117519569A (zh)
WO (1) WO2024022176A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102469207A (zh) * 2010-11-19 2012-05-23 希姆通信息技术(上海)有限公司 多操作系统手机及其实现方法
US20150113261A1 (en) * 2013-10-18 2015-04-23 Google Inc. User initiated data rollback using operating system partitions
CN105786569A (zh) * 2016-02-26 2016-07-20 联想(北京)有限公司 一种信息处理方法及电子设备
CN106325872A (zh) * 2016-08-26 2017-01-11 武汉噢易云计算股份有限公司 支持Macintosh电脑的多操作系统管理方法及装置
CN114780120A (zh) * 2022-04-02 2022-07-22 荣耀终端有限公司 升级方法、设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102469207A (zh) * 2010-11-19 2012-05-23 希姆通信息技术(上海)有限公司 多操作系统手机及其实现方法
US20150113261A1 (en) * 2013-10-18 2015-04-23 Google Inc. User initiated data rollback using operating system partitions
CN105786569A (zh) * 2016-02-26 2016-07-20 联想(北京)有限公司 一种信息处理方法及电子设备
CN106325872A (zh) * 2016-08-26 2017-01-11 武汉噢易云计算股份有限公司 支持Macintosh电脑的多操作系统管理方法及装置
CN114780120A (zh) * 2022-04-02 2022-07-22 荣耀终端有限公司 升级方法、设备及存储介质

Also Published As

Publication number Publication date
CN117519569A (zh) 2024-02-06

Similar Documents

Publication Publication Date Title
KR101644666B1 (ko) 장치와 웹 서비스 간에 브라우저 캐시를 동기화하는 프로그래밍 모델
JP4663878B2 (ja) 記憶媒体内のファイルを管理する方法および装置
US10552384B2 (en) Synchronizing media files available from multiple sources
EP2120165B1 (en) Systems and methods for space management in file systems
US8015157B2 (en) File sharing system, file server, and method for managing files
US9483492B2 (en) Terminal and method for providing application-related data
JP2006195949A (ja) コンピュータオペレーティングシステムに渡ってコンピュータファイルへのアクセスを行うシステムおよび方法
US9449021B2 (en) Use of long file names in data storage systems
JP5445463B2 (ja) 計算機システム、データ保存方法およびプログラム
EP3885903A1 (en) Cloud desktop upgrade method, device, cloud server, and storage medium
CN100585595C (zh) 使用数据库管理系统管理文件系统的数据的方法
CN100530190C (zh) 用于处理信息的装置和方法
WO2015051641A1 (zh) 一种磁盘镜像空间回收的方法及装置
US20120221609A1 (en) Data Storage System and Method
CN102760131A (zh) 一种网络相册的展示方法及系统
WO2022156484A1 (zh) 媒体数据处理方法、装置及终端设备
KR101512296B1 (ko) 어플리케이션 연관 파일 처리 단말 및 단말의 어플리케이션 연관 파일 처리 방법
WO2024022176A1 (zh) 一种系统运行方法与终端装置
US10776261B2 (en) Storage apparatus managing system and storage apparatus managing method for increasing data reading speed
US20110106861A1 (en) Interface Techniques Providing Contiguous Storage For Files
CN116010364B (zh) 网盘文件状态的更新方法、装置、网盘及存储介质
CN118120212A (zh) 一种文件去重方法、装置和设备
US20210141771A1 (en) Method of managing files by mobile device and mobile device for implementing the same
JPH06214839A (ja) ファイル管理方式
AU2012200108B2 (en) Synchronizing media files available from multiple sources

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23845388

Country of ref document: EP

Kind code of ref document: A1