WO2021185352A1 - Procédé de mise à niveau de version et appareil associé - Google Patents
Procédé de mise à niveau de version et appareil associé Download PDFInfo
- Publication number
- WO2021185352A1 WO2021185352A1 PCT/CN2021/081796 CN2021081796W WO2021185352A1 WO 2021185352 A1 WO2021185352 A1 WO 2021185352A1 CN 2021081796 W CN2021081796 W CN 2021081796W WO 2021185352 A1 WO2021185352 A1 WO 2021185352A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- space
- data
- user data
- capacity
- electronic device
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/654—Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
Definitions
- This application relates to the field of electronic technology, and in particular to a version upgrade method and related devices.
- the storage space of a mobile phone includes system software space and user data space.
- the user data space is used to store user data, such as videos, music, cache files, etc.
- the system software space is used to store installation data of the mobile phone operating system.
- the metadata storage area at the head of the user data space is used to store the file number, location, creation/modification time and other information in the user data.
- the block addresses of all data blocks in the user data area of the user data space are relative metadata storage The offset address of the start address of the area.
- the user data space can be reduced, thereby releasing part of the user data space for the system software space.
- shrinking the user data space requires moving the metadata storage area, that is, changing the starting address of the metadata storage area. Therefore, the above solution needs to modify the block addresses of all data blocks in the user data area, resulting in the above solution version
- the upgrade is very slow.
- the embodiments of the present application provide a version upgrade method and related devices, which can effectively reduce the duration of the version upgrade.
- this application provides a version upgrade method, including: the electronic device receives update information, the update information includes the capacity of the system software space of the new version of the operating system; wherein the storage space of the electronic device includes the system software space and the user Data space.
- the user data space includes a first user data space and a second user data space.
- the second user data space in the physical space is adjacent to the system software space.
- the first user data space includes a metadata storage area and a data area. Metadata
- Metadata The metadata in the storage area is used to manage data in the first user data space and the second user data space.
- the second user data space includes the first space, the start address of the first space and the start address of the second user data space.
- the first data block of the second user data space is the next data block of the last data block of the first user data space;
- the capacity of the new version of the system software space is greater than the current capacity of the system software space, and the user data space
- the electronic device upgrades the operating system to the above-mentioned new version;
- the upgraded system software space includes the first space, and the first difference is equal to the capacity of the new version of the system software space minus the system
- the current capacity of the software space, the capacity of the first space is equal to the first difference, the first data block of the second space after the upgrade is the next data block of the last data block of the first user data space, and the second space is the upgrade The remaining space in the previous second user data space except the first space.
- the user data space includes a first user data space and a second user data space
- the first user data space includes a metadata storage area
- the block address of a data block in the user data space is a relative metadata storage area
- the offset address of the start address, and the first data block of the second user data space on the logical address is the next data block of the last data block of the first user data space.
- the system software space includes a third space, and the last data block of the third space is the last data block of the system software space.
- the electronic device After the above-mentioned electronic device receives the update information, it also includes: a new version of the system software space When the capacity of the system software space is less than the current capacity of the system software space, the electronic device upgrades the operating system to the above-mentioned new version; the upgraded second user data space includes the third space, and the capacity of the third space is equal to the current capacity of the system software space minus the new The capacity of the system software space of the version, the first data block of the third space after the upgrade is the next data block of the last data block of the first user data space.
- the free space of the system software space can be allocated to the second user data space. Since the starting address of the metadata storage area remains unchanged during the above version upgrade process, the block address of the data block in the first user data space does not need to be changed.
- the implementation of the embodiments of this application can effectively reduce the duration of version upgrades and improve user experience.
- the data area of the first user data space includes a fourth space, the fourth space does not occupy physical space, the last data block of the fourth space is the last data block of the first user data space, and the metadata
- the storage area includes a first parameter, the first parameter is used to characterize the capacity of the fourth space, and the capacity of the fourth space is smaller than the current capacity of the system software space.
- the electronic device before the above electronic device upgrades the operating system to the new version, it further includes: the electronic device increases the fourth space and the system software space; the increased system software space includes the first space, and the fourth space increases.
- the larger capacity is equal to the capacity of the first space, the fifth space is the increased fourth space, and the last data block of the first user data space after the fourth space is increased is the last data block of the fifth space.
- the first space of the second user data space can be divided into the system software space, and the fourth space in the first user data space can be increased at the same time .
- the fourth space does not occupy the actual physical space and can be understood as a virtual space. Since the increased capacity of the fourth space is equal to the capacity of the first space, the offset addresses of data blocks in the second space other than the first space in the second user data space relative to the metadata storage area will not change, so there is no need Modify the block address of the second space. It can be understood that moving the metadata storage area and modifying the block address of the data block in the user data space may cause the risk of losing all or part of the user data.
- the implementation of the embodiments of the present application can further reduce the duration of version upgrades, reduce the risk of data loss, and improve user experience.
- the electronic device after the above-mentioned electronic device receives the update information, it further includes: the electronic device reduces the fourth space and the system software space; the reduced system software space does not include the third space, and the reduced capacity of the fourth space is equal to the third space.
- the capacity of the space, the sixth space is the reduced fourth space, and the last data block of the first user data space after the fourth space is reduced is the last data block of the sixth space.
- the free space of the system software space can be divided into the second user data space, and at the same time, the first user data space in the first user data space can be reduced.
- the reduced capacity of the fourth space is equal to the capacity of the aforementioned free space
- the offset address of the data block in the original second user data space relative to the metadata storage area will not change. Therefore, there is no need to modify the data in the original second user data space.
- the block address of the block can further reduce the duration of version upgrades, reduce the risk of data loss, and improve user experience.
- increasing the fourth space by the above electronic device includes: the electronic device modifies the first parameter to the capacity of the fifth space.
- the capacity of the fourth space can be increased by modifying the first parameter, and the increased capacity of the fourth space is equal to the capacity of the first space, thereby ensuring that the block address of the data block in the second space will not change .
- reducing the fourth space by the above electronic device includes: the electronic device modifies the first parameter to the capacity of the sixth space.
- the capacity of the fourth space can be reduced by modifying the first parameter, and the reduced capacity of the fourth space is equal to the capacity of the third space, thereby ensuring that the block address of the data block of the original second user data space will not occur Variety.
- the metadata storage area includes data items S 1 to S r, S 1 to S r above in S 1 of S y to the validity of the data blocks for identifying the data region, S 1 to S r the S x + 1 to S y for the validity of the data block identifier of the fourth space, S 1 to S r in S y + 1 to S r validity of the data blocks for identifying the second user data space , S y+1 to S z in the above S 1 to S r are used to identify the validity of the data block in the first space; where S i is equal to 1 to indicate that the data block identified by S i is an invalid block, and S i is equal to 0
- the data block represented by S i is a valid block, i is a positive integer greater than zero and less than or equal to r, the above S x+1 to Sy are all equal to 1, x, y, z, and r are all positive integers, and x is greater than 1, y is greater than x, z is
- the method further includes: the electronic device determines that the above-mentioned Sy+1 to S z are all 1, and the above-mentioned Sy+1 to S z are used to characterize the fourth space. The validity of the new data block.
- the data items Sy+1 to S z are used to identify the validity of the data block in the first space.
- the electronic device increases the capacity of the fourth space.
- the electronic device modifies the data items Sy+1 to S z to 1 and the newly added data blocks used to identify the fourth space are all Invalid data block.
- the third space includes a data blocks.
- the method further includes: the electronic device determines that the above-mentioned Sy-a+1 to Sy are all 0, and the above-mentioned Sy-a +1 to Sy are used to characterize the validity of the data block in the third space.
- the data items Sy-a+1 to Sy used to identify the data blocks in the fourth space are all invalid data blocks.
- the electronic device upgrades the operating system to the new version and reduces the system software space, in order to ensure that the block address of the data block in the original second user data space remains unchanged, the electronic device reduces the capacity of the fourth space.
- the electronic device items S y + 1 to S z are modified to 0, the data blocks for identifying the third space are Valid data block.
- the aforementioned update information further includes the start address of the new version of the second user data space and the capacity of the new version of the second user data space.
- the storage space of the electronic device also includes a partition table, and the partition table includes The first address parameter, the first capacity parameter and the second capacity parameter, where the first address parameter is used to characterize the start address of the second user data space, and the first capacity parameter and the second capacity parameter are used to characterize the system software space and The capacity of the second user data space.
- the electronic device before the above-mentioned electronic device upgrades the operating system to the new version, it further includes that the electronic device modifies the first capacity parameter to the first capacity, and the second capacity parameter to the new version of the second user data space. Capacity, the first address parameter is modified to the start address of the second user data space of the new version, and the start address of the second user data space of the new version is the same as the start address of the second space.
- the electronic device after the above-mentioned electronic device receives the update information, it further includes: the electronic device modifies the first capacity parameter to the first capacity, and modifies the second capacity parameter to the capacity of the new version of the second user data space, and the first The address parameter is modified to the start address of the second user data space of the new version, and the start address of the second user data space of the new version is the same as the start address of the third space.
- an embodiment of the present application provides an electronic device, including: one or more processors, a memory, a touch screen, one or more keys; the memory, a touch screen, the above one or more keys and the above one or more
- the processors are coupled, and the memory is used to store computer program codes.
- the computer program codes include computer instructions.
- One or more of the above-mentioned processors execute the computer instructions to execute:
- the update information includes the capacity of the system software space of the new version of the operating system; wherein the storage space of the electronic device includes the system software space and the user data space, and the user data space includes the first user data space and the second user data space ,
- the second user data space in the physical space is adjacent to the system software space, the first user data space includes a metadata storage area and a data area, and the metadata in the metadata storage area is used to manage the first user data space and the second user Data in the data space
- the second user data space includes the first space, the start address of the first space is the same as the start address of the second user data space, and the first data block of the second user data space is the first user data
- the next data block of the last data block of the space when the capacity of the new version of the system software space is greater than the current capacity of the system software space, and the free space of the data area of the user data space is greater than the first difference, upgrade the operating system to the above New version; the upgraded system software space includes the first space, the first difference is equal to
- the system software space includes a third space
- the last data block of the third space is the last data block of the system software space.
- the processor is also used for: a new version of the system software When the capacity of the space is less than the current capacity of the system software space, upgrade the operating system to the above-mentioned new version; the upgraded second user data space includes the third space, and the capacity of the third space is equal to the current capacity of the system software space minus the new version
- the first data block of the third space is the next data block of the last data block of the first user data space.
- the data area of the first user data space includes a fourth space, the fourth space does not occupy physical space, the last data block of the fourth space is the last data block of the first user data space, and the metadata
- the storage area includes a first parameter, the first parameter is used to characterize the capacity of the fourth space, and the capacity of the fourth space is smaller than the current capacity of the system software space.
- the processor before upgrading the operating system to the new version, is also used to: increase the fourth space and the system software space; the increased system software space includes the first space, and the fourth space is increased The capacity of is equal to the capacity of the first space, the fifth space is the increased fourth space, and the last data block of the first user data space after the fourth space is increased is the last data block of the fifth space.
- the processor is further used to: reduce the fourth space and the system software space; the reduced system software space does not include the third space, and the reduced capacity of the fourth space is equal to the third space
- the sixth space is the reduced fourth space, and the last data block of the first user data space after the fourth space is reduced is the last data block of the sixth space.
- the above-mentioned increasing the fourth space includes: modifying the first parameter to the capacity of the fifth space.
- the aforementioned reduction of the fourth space includes: modifying the first parameter to the capacity of the sixth space.
- the metadata storage area includes data items S 1 to S r, S 1 to S r above in S 1 of S y to the validity of the data blocks for identifying the data region, S 1 to S r the S x + 1 to S y for the validity of the data block identifier of the fourth space, S 1 to S r in S y + 1 to S r validity of the data blocks for identifying the second user data space , S y+1 to S z in the above S 1 to S r are used to identify the validity of the data block in the first space; where S i is equal to 1 to indicate that the data block identified by S i is an invalid block, and S i is equal to 0
- the data block represented by S i is a valid block, i is a positive integer greater than zero and less than or equal to r, the above S x+1 to Sy are all equal to 1, x, y, z, and r are all positive integers, and x is greater than 1, y is greater than x, z is
- the processor is further configured to: determine that the above Sy+1 to S z are all 1, and the above Sy+1 to S z are used to characterize the newness of the fourth space. Increase the effectiveness of the data block.
- the third space includes a data blocks
- the processor is further configured to: determine that the above Sy-a+1 to Sy are all 0, and the above Sy-a+ 1 to Sy are used to characterize the validity of the data block in the third space.
- the aforementioned update information further includes the start address of the new version of the second user data space and the capacity of the new version of the second user data space.
- the storage space of the electronic device also includes a partition table, and the partition table includes The first address parameter, the first capacity parameter and the second capacity parameter, where the first address parameter is used to characterize the start address of the second user data space, and the first capacity parameter and the second capacity parameter are used to characterize the system software space and The capacity of the second user data space.
- the processor before upgrading the operating system to the new version, is further used to: modify the first capacity parameter to the first capacity, and modify the second capacity parameter to the capacity of the second user data space of the new version ,
- the first address parameter is modified to the start address of the second user data space of the new version, and the start address of the second user data space of the new version is the same as the start address of the second space.
- the processor is further configured to: modify the first capacity parameter to the first capacity, and modify the second capacity parameter to the capacity of the new version of the second user data space, and the first address The parameter is modified to the start address of the second user data space of the new version, and the start address of the second user data space of the new version is the same as the start address of the third space.
- an embodiment of the present application provides a computer storage medium, including computer instructions.
- the computer instruction runs on an electronic device, the electronic device executes any one of the implementation methods of the first aspect of the embodiments of the present application. Version upgrade method.
- the embodiments of the present application provide a computer program product, which when the computer program product runs on an electronic device, causes the electronic device to perform the version upgrade provided by any one of the implementation methods of the first aspect of the embodiments of the present application method.
- the electronic equipment provided in the second aspect, the computer storage medium provided in the third aspect, and the computer program product provided in the fourth aspect are all used to execute the version upgrade method provided in the second aspect. Therefore, The beneficial effects that can be achieved can refer to the beneficial effects in the version upgrade method provided in the first aspect, which will not be repeated here.
- FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of this application.
- FIG. 2 is a schematic structural diagram of another electronic device provided by an embodiment of the application.
- Figures 3 to 5 are exemplary graphical user interfaces provided by embodiments of this application.
- FIG. 6 is a schematic structural diagram of a storage space provided by an embodiment of this application.
- FIG. 7 is a schematic structural diagram of a user data space provided by an embodiment of this application.
- FIG. 8 is a schematic structural diagram of another user data space provided by an embodiment of this application.
- FIG. 9 is a schematic structural diagram of a storage space during a version upgrade process provided by an embodiment of the application.
- FIG. 10 is a schematic diagram of the structure of storage space in another version upgrade process provided by an embodiment of the application.
- FIG. 11 is a schematic structural diagram of another storage space provided by an embodiment of this application.
- FIG. 12 is a schematic structural diagram of another user data space provided by an embodiment of this application.
- FIG. 13 is a schematic diagram of the structure of storage space in another version upgrade process provided by an embodiment of the application.
- FIG. 14 is a schematic diagram of the structure of storage space in another version upgrade process provided by an embodiment of the application.
- FIG. 15 is a schematic flowchart of a version upgrade method provided by an embodiment of the application.
- Figures 16 to 17 are exemplary graphical user interfaces for version upgrades provided by embodiments of the application.
- FIG. 18 is a schematic diagram of the structure of storage space in another version upgrade process provided by an embodiment of the application.
- FIG. 19 is an exemplary graphical user interface for version upgrade provided by an embodiment of the application.
- FIG. 20 is a schematic diagram of the structure of storage space in another version upgrade process provided by an embodiment of the application.
- FIG. 21 is a schematic structural diagram of another storage space provided by an embodiment of this application.
- FIG. 22 is a schematic flowchart of another version upgrade method provided by an embodiment of the application.
- FIG. 23 is a schematic diagram of the structure of storage space in another version upgrade process provided by an embodiment of the application.
- FIG. 24 is a schematic diagram of the structure of storage space in another version upgrade process provided by an embodiment of the application.
- first and second are only used for descriptive purposes, and cannot be understood as implying or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, “multiple” The meaning is two or more.
- the electronic device 100 can be a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer and other portable electronic devices. equipment.
- portable electronic devices include, but are not limited to, portable electronic devices equipped with iOS, android, microsoft or other operating systems.
- the aforementioned portable electronic device may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (such as a touch panel).
- the electronic device may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (such as a touch panel), or a smart TV.
- FIG. 1 shows a schematic structural diagram of an exemplary electronic device 100 provided in an embodiment of the present application.
- the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2.
- Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
- SIM Subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
- the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
- the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange different components.
- the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units.
- the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
- AP application processor
- modem processor modem processor
- GPU graphics processing unit
- image signal processor image signal processor
- ISP image signal processor
- controller memory
- video codec digital signal processor
- DSP digital signal processor
- NPU neural-network processing unit
- the different processing units may be independent devices or integrated in one or more processors.
- the controller may be the nerve center and command center of the electronic device 100.
- the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
- NPU can use convolutional neural network (Convolutional Neural Networks, CNN) processing for artificial intelligence operations. For example, using the CNN model to do a lot of information recognition and information screening can realize the training and recognition of scene intelligence.
- CNN convolutional Neural Networks
- a memory may also be provided in the processor 110 to store instructions and data.
- the memory in the processor 110 is a cache memory.
- the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
- the processor 110 may include one or more interfaces.
- the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter/receiver (universal asynchronous) interface.
- I2C integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- PCM pulse code modulation
- UART universal asynchronous transmitter/receiver
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB Universal Serial Bus
- the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
- the processor 110 may include multiple sets of I2C buses.
- the processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively through different I2C bus interfaces.
- the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device 100.
- the I2S interface can be used for audio communication.
- the processor 110 may include multiple sets of I2S buses.
- the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
- the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
- the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
- the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
- the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
- the UART interface is a universal serial data bus used for asynchronous communication.
- the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
- the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
- the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
- the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
- the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
- the MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on.
- the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100.
- the processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the electronic device 100.
- the GPIO interface can be configured through software.
- the GPIO interface can be configured as a control signal or as a data signal.
- the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
- the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
- the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
- the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect earphones and play audio through earphones. This interface can also be used to connect other electronic devices, such as AR devices.
- the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100.
- the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
- the charging management module 140 is used to receive charging input from the charger.
- the charger can be a wireless charger or a wired charger.
- the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
- the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
- the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
- the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
- the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
- the power management module 141 may also be provided in the processor 110.
- the power management module 141 and the charging management module 140 may also be provided in the same device.
- the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
- the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
- Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
- the antenna can be used in combination with a tuning switch.
- the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
- the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like.
- the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
- the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1.
- at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
- at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
- the modem processor may include a modulator and a demodulator.
- the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
- the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
- the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
- the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
- the modem processor may be an independent device.
- the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
- the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
- the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
- the wireless communication module 160 can also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves through the antenna 2 and radiate it out.
- the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
- the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
- the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- BDS Beidou navigation satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite-based augmentation systems
- the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
- the GPU is an image processing microprocessor, which is connected to the display screen 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
- the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
- the display screen 194 is used to display images, videos, and the like.
- the display screen 194 includes a display panel.
- the display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
- LCD liquid crystal display
- OLED organic light-emitting diode
- active-matrix organic light-emitting diode active-matrix organic light-emitting diode
- AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
- the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
- the display screen 194 displays the interface content currently output by the system.
- the interface content is an interface provided by an instant messaging application.
- the electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
- the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
- ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
- the ISP may be provided in the camera 193.
- the camera 193 is used to capture still images or videos.
- the object generates an optical image through the lens and is projected to the photosensitive element.
- the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
- CMOS complementary metal-oxide-semiconductor
- the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
- ISP outputs digital image signals to DSP for processing.
- DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
- the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
- Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
- Video codecs are used to compress or decompress digital video.
- the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
- MPEG moving picture experts group
- MPEG2 MPEG2, MPEG3, MPEG4, and so on.
- NPU is a neural-network (NN) computing processor.
- NN neural-network
- applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, and so on.
- the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
- the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
- the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
- the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121.
- the internal memory 121 may include a storage program area and a storage data area.
- the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like.
- the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
- the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
- UFS universal flash storage
- the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
- the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
- the audio module 170 can also be used to encode and decode audio signals.
- the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
- the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
- the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
- the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
- the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
- the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
- the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C.
- the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
- the earphone interface 170D is used to connect wired earphones.
- the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, and a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
- OMTP open mobile terminal platform
- CTIA cellular telecommunications industry association of the USA, CTIA
- the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
- the pressure sensor 180A may be provided on the display screen 194.
- the pressure sensor 180A may be used to capture the pressure value generated when the user's finger part touches the display screen, and transmit the pressure value to the processor, so that the processor can recognize which finger part the user inputs through User operation.
- the capacitive pressure sensor may include at least two parallel plates with conductive materials.
- the electronic device 100 determines the intensity of the pressure according to the change in capacitance.
- the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
- the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
- touch operations that act on the same touch position but have different touch operation strengths may correspond to different operation instructions.
- the pressure sensor 180A may transmit the detected capacitance value to the processor, so that the processor recognizes which finger part (knuckle or finger pad, etc.) the user inputs the user operation through.
- the pressure sensor 180A may also calculate the number of touch points according to the detected signal, and transmit the calculated value to the processor, so that the processor recognizes the user inputting the user through a single finger or multiple fingers. operate.
- the gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
- the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
- the gyro sensor 180B can be used for image stabilization.
- the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement to achieve anti-shake.
- the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
- the air pressure sensor 180C is used to measure air pressure.
- the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
- the magnetic sensor 180D includes a Hall sensor.
- the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip holster.
- the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D.
- features such as automatic unlocking of the flip cover are set.
- the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and apply to applications such as horizontal and vertical screen switching, pedometers, and so on. In some optional embodiments of the present application, the acceleration sensor 180E may be used to capture the acceleration value generated when the user's finger part touches the display screen, and transmit the acceleration value to the processor, so that the processor can recognize which finger part the user inputs through User operation.
- the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
- the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
- the light emitting diode may be an infrared light emitting diode.
- the electronic device 100 emits infrared light to the outside through the light emitting diode.
- the electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
- the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the display screen to save power.
- the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
- the ambient light sensor 180L is used to sense the brightness of the ambient light.
- the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light.
- the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
- the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.
- the fingerprint sensor 180H is used to collect fingerprints.
- the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
- the temperature sensor 180J is used to detect temperature.
- the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
- the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature.
- the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
- Touch sensor 180K also called “touch panel”.
- the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
- the touch sensor 180K is used to detect a touch operation acting on or near it, and the touch touch operation refers to an operation in which a user's hand, elbow, or stylus touches the display screen 194.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- the visual output related to the touch operation can be provided through the display screen 194.
- the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
- the bone conduction sensor 180M can acquire vibration signals.
- the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice.
- the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal.
- the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone.
- the audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function.
- the application processor can analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
- the button 190 includes a power-on button, a volume button, and so on.
- the button 190 may be a mechanical button. It can also be a touch button.
- the electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
- the motor 191 can generate vibration prompts.
- the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
- touch operations applied to different applications can correspond to different vibration feedback effects.
- Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
- Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
- the touch vibration feedback effect can also support customization.
- the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
- the SIM card interface 195 is used to connect to the SIM card.
- the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
- the electronic device 100 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
- the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
- the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different.
- the SIM card interface 195 can also be compatible with different types of SIM cards.
- the SIM card interface 195 may also be compatible with external memory cards.
- the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
- the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
- the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
- the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
- the embodiment of the present application takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 by way of example.
- FIG. 2 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.
- the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
- the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
- the application layer can include a series of application packages.
- the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
- a floating launcher can also be added to the application layer, which is used as a default display application in the above-mentioned floating window and provides users with an entrance to other applications.
- the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
- the application framework layer includes some predefined functions.
- the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, an activity manager, etc.
- the window manager is used to manage window programs.
- the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the display screen, and intercept the display screen.
- a FloatingWindow can be extended based on Android's native PhoneWindow, which is specifically used to display the above-mentioned floating window to distinguish it from ordinary windows.
- the window has the attribute of being displayed floating at the top of the series of windows.
- the window size can be given an appropriate value according to the size of the actual screen and the optimal display algorithm.
- the aspect ratio of the window may default to the screen aspect ratio of a conventional mainstream mobile phone.
- an additional close button and a minimize button can be drawn in the upper right corner.
- the content provider is used to store and retrieve data and make these data accessible to applications.
- the data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
- the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
- the view system can be used to build applications.
- the display interface can be composed of one or more views.
- a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
- button views for closing, minimizing and other operations on the floating window can be added accordingly, and bound to the FloatingWindow in the above-mentioned window manager.
- the phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.).
- the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
- the notification manager enables the application to display notification information in the status bar 207, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
- the notification manager is used to notify download completion, message reminders, and so on.
- the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the display screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
- the activity manager is used to manage the running activities in the system, including process, application, service, task information, etc.
- a motion detector can be added to the application framework layer, which is used to make logical judgments on the acquired input events and identify the type of the input event. For example, based on the touch coordinates included in the input event, the time stamp of the touch operation, and other information, it is determined that the input event is a knuckle touch event or a finger pad touch event.
- the motion detection component can also record the trajectory of the input event, determine the gesture pattern of the input event, and respond to different operations according to different gestures.
- Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
- the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
- the application layer and application framework layer run in a virtual machine.
- the virtual machine executes the java files of the application layer and the application framework layer as binary files.
- the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
- the system library can include multiple functional modules. For example: input manager, input dispatcher, surface manager, media libraries, 3D graphics processing libraries (such as OpenGL ES), 2D graphics engines (such as : SGL) and so on.
- input manager input dispatcher
- surface manager media libraries
- 3D graphics processing libraries such as OpenGL ES
- 2D graphics engines such as : SGL
- the input manager is responsible for obtaining event data from the underlying input driver, parsed and encapsulated, and passed to the input dispatch manager.
- the input scheduling manager is used to store window information. After receiving an input event from the input manager, it will look for a suitable window in the window it keeps, and dispatch the event to this window.
- the surface manager is used to manage the display subsystem and provides a combination 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 still image files.
- the media library can support multiple 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, synthesis, and layer processing.
- the 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 corresponding hardware interrupt is sent to the kernel layer.
- the kernel layer processes touch operations into original input events (including touch coordinates, time stamps of touch operations, etc.).
- the original input events are stored in the kernel layer.
- the application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
- the camera 193 captures still images or videos.
- FIG. 3 exemplarily shows an exemplary user interface 10 on the electronic device 100 for displaying an application program installed by the electronic device 100.
- the user interface 10 may include: a status bar 201, a calendar indicator 202, a weather indicator 203, a tray 204 with commonly used application icons, a navigation bar 205, and other application icons. in:
- the status bar 201 may include: one or more signal strength indicators 201A of mobile communication signals (also called cellular signals), the name of the operator (such as "China Mobile") 201B, and wireless fidelity (Wi-Fi) )
- One or more signal strength indicators 201C, battery status indicator 201D, and time indicator 201E of the signal are included in the signal.
- the calendar indicator 202 can be used to indicate the current time, such as date, day of the week, hour and minute information, and so on.
- the weather indicator 203 can be used to indicate the type of weather, such as cloudy to clear, light rain, etc., and can also be used to indicate information such as temperature.
- the tray 204 with icons of commonly used application programs can display: a phone icon 204A, a contact icon 204B, a short message icon 204C, and a camera icon 204D.
- the navigation bar 205 may include system navigation keys such as a return key 205A, a home screen key 205B, and a multi-task key 205C.
- system navigation keys such as a return key 205A, a home screen key 205B, and a multi-task key 205C.
- the electronic device 100 may display the previous page of the current page.
- the electronic device 100 may display the home interface.
- the electronic device 100 may display the task recently opened by the user.
- the naming of each navigation key can also be other, which is not limited in this application. Not limited to virtual keys, each navigation key in the navigation bar 205 can also be implemented as a physical key.
- Other application icons may include, for example, an icon 206 for mutual transfer, an icon 207 for a gallery, an icon 208 for music, an icon 209 for applications, an icon 210 for mailboxes, an icon 211 for cloud sharing, an icon 212 for memos, and an icon 213 for settings.
- the user interface 10 may also include a page indicator 214.
- the icons of other applications may be distributed on multiple pages, and the page indicator 216 may be used to indicate the application in which page the user is currently browsing. The user can swipe the area of other application icons left and right to browse application icons in other pages.
- the user interface 10 exemplarily shown in FIG. 3 may be a home screen. It can be understood that FIG. 3 only exemplarily shows the user interface on the electronic device 100, and should not constitute a limitation to the embodiment of the present application.
- the user can click on an icon set on the user interface 10
- the electronic device 100 detects the above-mentioned user operation, and in response to the above-mentioned user operation, the electronic device 100 displays the set user interface 11.
- the user interface 11 may include: a status bar 301, a navigation bar 302, an application title bar 303, a search box 304, an entry 305 for "Login to Huawei account", an entry 306 for "Wireless and network”, an entry 307 for "device connection”, and an entry for "application and “Notification” entry 308, "Battery” entry 309, "Display” entry 310, "Sound” entry 311, “Storage” entry 312, “Security and privacy” entry 313, “Users and accounts” entry 314, “System update” entry 315. in:
- the application title bar 303 may be used to indicate that the current page is used to display the setting interface of the electronic device 100.
- the presentation form of the application title bar 303 can be text information "settings", icons or other forms.
- the search box 304 can be used to search for a setting item matching the character according to the character input by the user.
- the entry 305 of "log in to a Huawei account” may receive a user operation (for example, a touch operation), and in response to the detected user operation, the electronic device 100 may display a user interface for logging in to a Huawei account.
- a user operation for example, a touch operation
- the electronic device 100 may display the setting interface of the item.
- the setting interface of the entry may include one or more setting items.
- the "system update" item 315 may receive a user operation (for example, a touch operation), and in response to the detected user operation, the electronic device 100 may display a setting interface of the system update.
- a user operation for example, a touch operation
- the user may click on the "system update” item 315, and in response to the detected user operation, the electronic device 100 displays the set user interface 12.
- the user interface 12 may include: a status bar 401, an application title bar 402, a check update control 403, a “new version” entry 405, and a “current version” entry 405. in:
- the check update control 403 may receive a user operation (such as a touch operation), and in response to the detected user operation, if the current operating system version is not a new version, the electronic device 100 may update the current version to the new version.
- a user operation such as a touch operation
- the "new version" entry 404 may receive a user operation (for example, a touch operation), and in response to the detected user operation, the electronic device 100 may display detailed information of the new version, for example, the version number, which functions are optimized by the version, and so on.
- a user operation for example, a touch operation
- the electronic device 100 may display detailed information of the new version, for example, the version number, which functions are optimized by the version, and so on.
- the "current version" entry 405 may receive a user operation (for example, a touch operation), and in response to the detected user operation, the electronic device 100 may display detailed information of the current version.
- a user operation for example, a touch operation
- the version go up of the operating system refers to the improvement of the vulnerabilities of the operating system or the addition of new application functions to the operating system to make the operating system more perfect and easy to use.
- the success of the version upgrade is inseparable from the support of the hardware.
- the hardware must have enough storage space to accommodate the new version of the operating system.
- the storage space of an electronic device mainly includes system software space and user data space.
- a partition table is also included before the system software space.
- the partition table is used to store some partition parameters of the storage space, including the starting address of the system software space and user data space, and the size of the system software space and user data space.
- the system software space is used to store the relevant data of the operating system installed on the electronic device.
- the user data space is used to store user data, such as applications, videos, and cache files.
- the size of the system software space and the user data space are 6GB and 128GB, respectively.
- the storage space of the electronic device may be divided into multiple areas, and the partition table is used to record the starting position of each area in the multiple areas and the space size of each area.
- the user data space adopts a novel open source flash file system (flash friendly file system, F2FS).
- F2FS flash friendly file system
- FIG. 7 it is a schematic structural diagram of an F2FS provided by an embodiment of the present application.
- F2FS divides the entire volume into a large number of segments (Segments), each segment includes 512 consecutive blocks (Blocks), the size of each Blocks is fixed at 4KB, and the size of each Segment is fixed at 2MB.
- Each segment contains a segment summary block (Segment Summary Block) metadata structure, which describes the owner of each block in the segment, that is, the file to which the block belongs and the offset of the block in the file to which it belongs.
- One segment summary block can completely store the summary information of 512 Blocks.
- the user data space mainly includes a metadata storage area and a data area.
- the data area is used to store files and directory structures and their index data.
- the metadata storage area is used to store information data for managing the data in the data area, such as file unique number, location, creation/modification time, etc. These data can be called metadata (Metadata).
- the metadata storage area includes the following five parts: superblock (superblock, SB), checkpoint (CP), segment information table (segment information table, SIT), node address table (node address table, NAT), and segment summary Area (segment summary area, SSA).
- SB describes the size of the file system, Block and Segment, the Root number (the Node Number of the root directory file, the fixed value is 3), and how much space is allocated to SB, CP, SIT, NAT, SSA, etc. .
- the CP contains writable information, which is used to store the total amount of free space, the total amount of stored user data, the address of the next segment where data will be written, and other changeable information.
- SIT is mainly used to track whether the data block in the data area is valid (including the number of valid blocks in each segment and the validity of the data block). Every 4k size SIT Blcok represents the effective status of 55 2M segment areas. If according to the information in the SIT, it is determined that there is no valid data in a segment, the segment can be recycled, or cleaning can be performed when there are few valid data in the segment.
- a data block has stored valid user data, or the data block is a damaged data block, the data block is an invalid block and cannot be written with new data; if a data block does not store user data and has not been If damaged, the data block is a valid block and new data can be written.
- the SIT includes data items S 1 to S n .
- items 8 S i for identifying the validity of the data blocks Di, i is greater than zero and less than equal to a positive integer n. If the data item SIT S i is equal to 1, it indicates that the data block Di as an invalid block; if the data item SIT S i is equal to 0, it indicates that the data block D i is a valid block.
- the block address of the data block refers to the offset address of the data block relative to the start address of the metadata storage area. Therefore, there are two types of data blocks for storing the file in the data area, one type of data block is used to store the attributes of the file, and the other type of data block is used to store the content of the file.
- NAT records the block address table of data blocks corresponding to all nodes in the data area (for ease of description, hereinafter referred to as node blocks for short).
- Each file stored in the data area has a unique node number (Node number) and node block, and the node block is used to store the attributes of the file.
- Each entry in the NAT is called Natentry, and each Natentry contains a node number and the block address of the node block of the file corresponding to the node number.
- the block address table of all node blocks is mapped by NAT, which means that the location of each node is translated by the NAT table. Every 4K NAT Blcok can record the address block information of 455 nodes. It can be understood that the block address of the node block is an offset address relative to the start address of the metadata storage area.
- the SSA contains all the data stored in the data area and the owner information of the node block, and records the offset of each block in the managed segment relative to the node block of the file to which it belongs.
- the size of a data block is 4KB, that is, the length of the data block can be expressed as 0x1000. If the block number of a data block relative to the starting block of the metadata storage area is 0x00009100, the block address of the data block is 0x009100000. In the embodiments of the present application, for ease of description, the block address of the data block can refer to the offset block number relative to the start block of the metadata storage area, or it can be the offset address relative to the start address of the metadata storage area. There is no specific limitation.
- the size of the storage space occupied by the new version is usually enlarged or reduced relative to the current installed version of the mobile phone.
- a certain amount of free space is usually reserved in the system software space to cope with scenarios where subsequent versions increase.
- the expansion of the new version exceeds the reserved space, that is When the storage space occupied by the new version is larger than the system software space, it will cause the problem that it cannot be upgraded.
- Defect 1 At present, the user data space is large (for example, 128GB, 256GB) and contains a lot of data. Since shrinking or expanding the user data space needs to modify the block addresses of all data blocks in the data area recorded in the NAT, the above solution is very time-consuming. For example, the version upgrade may take as long as several hours.
- Defect 2 If there are critical abnormal bad blocks in the user data space, there is a risk of losing all or part of the user data if the metadata is moved and the block addresses of all data blocks are modified.
- an embodiment of the present application provides a version upgrade method.
- the structure of the storage space applied by the version upgrade method provided by the embodiment of the present application is introduced.
- the user data space is divided into two areas, namely, user data space 1 and user data space 2.
- the user data space 2 is located between the system software space and the user data space 1, that is, the user data space 2 is adjacent to the system software space.
- user data space 2 is located after user data space 1, that is, the first data block of user data space 2 is the next data block of the last data block of user data space 1.
- the user data space 1 and the user data space 2 are uniformly managed by one file system, and the upper-layer application only sees one file system, that is, there is only one user data space for the upper-layer application.
- the user data space 1 includes a metadata storage area and a data area.
- the metadata storage area at the header of the user data space 1 uniformly manages the user data in the user data space 1 and the user data space 2.
- the user data space 1 may also be referred to as the first user data space
- the user data space 2 may also be referred to as the second user data space, which is not specifically limited here.
- the structure diagram of the user data space is shown in FIG. 12. It can be seen from Fig. 12 that if the user data space 1 contains data blocks D 1 to D x , the SIT contains data items S1 to S x corresponding to the data blocks D 1 to D x respectively, wherein the data item Si can be used to identify data Whether the block Di is valid, i is a positive integer greater than zero and less than or equal to x. If the user data space 2 includes data blocks D x+1 to D n , the SIT includes data items S x+1 to S n corresponding to the data blocks D x+1 to D n , respectively. It can be seen from FIG.
- the block address of the last data block of user data space 1 and the first data block of user data space 2 are continuous. For example, if the block address of the last data block of user data space 1 is block 1000, the block address of the first data block of user data space 2 is block 1001.
- the parameters stored in the partition table stored before the system software space include the starting addresses of the system software space, user data space 1 and user data space 2, as well as the system software space and user data space 1. And the capacity of user data space 2.
- the version upgrade method based on the user data space structure shown in FIG. 12, when the version upgrade is performed, if the storage space occupied by the new version is larger than the system software space, the user data space 2 to the second space can be reduced , Release the first space of the user data space 2 header to the system software space, as shown in Figure 13. If the storage space occupied by the new version is less than the system software space, the system software space can also be reduced, and the third space at the end of the system software space is released to the user data space 2, as shown in Figure 14.
- FIG. 15 is a schematic flowchart of a version update method provided by an embodiment of the present application.
- the version update method provided by the embodiment of the present application includes but is not limited to steps S201 to S205. The possible implementation of this method embodiment will be further described below.
- the electronic device receives an update instruction, where the update instruction is used to instruct to update the current version of the operating system to a new version.
- the electronic device before the electronic device receives the update instruction from the user, it receives the update information of the new version sent by the server, and the update information of the new version may include the capacity of the system software space of the new version.
- the update information of the new version may include the capacity of the system software space of the new version, the capacity of the user data space 1 of the new version, the capacity of the user data space 2 of the new version, and the system of the new version.
- the update information of the new version may include the version number of the new version.
- the update information of the new version may refer to the installation package of the new version of the operating system.
- the installation package can include all files installed by the new version. Compared with the current version, the installation package may also include all patch packages installed by the new version, that is, some files installed by the new version.
- the user triggers the update instruction by clicking the update control.
- the user can trigger an update instruction through gestures.
- the first user operation may also be for the user to make a specific gesture within the collection range of the camera.
- the above gesture is "V-shaped by the user's hand".
- the electronic device 100 can collect the gesture input by the user through the camera, and compare the collected gesture with the pre-stored gesture. If the collected gesture is consistent with the pre-stored gesture shape, step S202 is executed.
- the user can trigger an update instruction through voice.
- the electronic device 100 may collect the voice input by the user through a microphone. If the specific content of the voice is "please upgrade the operating system", the specific content of the collected voice “please upgrade the operating system” and the pre-stored voice keyword " If the keywords are consistent and the matching degree of the voice feature exceeds a certain threshold, step S202 is executed.
- the user can pre-set the version of the operating system to be automatically upgraded, that is, when the electronic device receives the update information of the new version sent by the server, the electronic device executes step S202.
- the electronic device judges whether the capacity of the system software space of the new version is greater than the current capacity of the system software space.
- the "capacity of the space” refers to the size of the space occupied by the space.
- step S203 When the capacity of the new version of the system software space is greater than the current capacity of the system software space, the electronic device determines whether the total amount of free space in the data area of the user data space is greater than the first difference, and the first difference is the new version of the system The difference between the capacity of the software space and the current capacity of the system software space; if it is greater than, step S204 is performed; if it is less than or equal, a first prompt message is generated, and the first prompt message is used to remind the user that the storage space is insufficient and the system update fails.
- the electronic device can release part of the space at the header of the user data space (ie, the first space) to the system software space. Before the release, the electronic device needs to move the valid data in the first space to the remaining data area of the user data space except the first space.
- the remaining data area of the user data space includes the data area of the user data space 2 except the first space and the data area of the user data space 1.
- the electronic device determines that the capacity of the new version of the system software space is greater than the current capacity of the system software space, it must also determine whether the total amount of free space in the data area excluding the user data space is greater than or equal to the first difference, that is, the user data space Whether there is enough space in the data area to be released to the system software space, so that the electronic device can update the system.
- the electronic device determines the first space to be released to the software space according to the first difference, and the capacity of the first space is equal to the first difference.
- the electronic device may obtain the total amount of free space in the data area of the user data space according to the total amount of free space recorded in the CP.
- the first prompt information may be displayed in the form of text, image, animation, voice, etc.
- the electronic device displays a prompt window 406, and the prompt window 406 may include a control 407 And the first prompt message.
- the first prompt information is displayed in the form of text, and the content of the first prompt information may include "Insufficient storage space, system update failed!”.
- the control 407 may receive a user operation (for example, a touch operation), and in response to the detected user operation, the electronic device 100 may close the window 406.
- a user operation for example, a touch operation
- step S204 when the capacity of the new version of the system software space is greater than the current capacity of the system software space, and whether the total amount of free space in the data area of the user data space is greater than the first difference, the electronic device executes step S204.
- the electronic device moves the valid user data in the first space of the user data space 2 header to the remaining data area, where the capacity of the first space is equal to the first difference, and the remaining data area is users other than the first space.
- the remaining data area of the data space is a configurable unit.
- the electronic device moving the valid user data in the first space to the remaining data area includes: the electronic device determines the first data block according to the information in the SIT, and the first data block is the remaining data area The first free data block in the first space; the electronic device writes the data of the second data block in the first space to the first data block; the electronic device changes the block address of the data block storing the first data from that of the second data block The block address is modified to the block address of the first data block.
- the electronic device writes the data of the second data block to the first data block, that is, the electronic device determines the physical address of the first data block according to the block address of the first data block, and writes the data of the second data block Go to the storage location corresponding to the above physical address.
- the above-mentioned second data block may be a node block storing file attributes, or a data block storing file content.
- the electronic device modifies the block address of the data block storing the first data from the block address of the second data block to the first data block.
- the block address of the block includes: the electronic device queries the first file number of the file to which the first data in the second data block belongs in the SSA according to the block address of the second data block; the electronic device queries the first file number in the NAT that records the first data The first entry of the file number, the block address of the node block of the file to which the first data belongs is recorded in the first entry; since the block address of the node block is the same as the block address of the second data block, the electronic device determines the first entry The second data block is a node block; the electronic device modifies the block address of the node block in the first entry to the block land of the first data block.
- the electronic device modifies the block address of the data block storing the first data from the block address of the second data block to the first block address.
- the block address of the data block includes: the electronic device queries the first file number of the file belonging to the first data in the second data block in the SSA according to the block address of the second data block; the electronic device queries the first file number of the file to which the first data in the second data block belongs; The first entry of a file number, the block address of the node block of the file to which the first data belongs is recorded in the first entry, the block address of the node block is different from the block address of the second data block, the first data For the file content, the block address of the data block storing the first data is recorded in the node block; the electronic device modifies the block address of the data block storing the first data in the node block to the block address of the first data block.
- the electronic device releases the first space to the system software space.
- releasing the first space for the system software space by the above electronic device includes: the electronic device modifies the first capacity parameter in the partition table to the capacity of the new version of the system software space, and the second capacity parameter modification Is the capacity of the new version of user data space 2, the first address parameter is modified to the start address of the new version of user data space 2 in user data space 2; the start address of the new version of user data space 2 is equal to the second space
- the capacity of the system software space of the new version is equal to the space capacity of the original software version plus the capacity of the first space, and the capacity of the user data space 2 of the new version is equal to the capacity of the second space.
- the second space is the remaining space in the user data space 2 after the first space is removed.
- the first capacity parameter in the partition table is used to indicate the capacity of the system software space
- the second capacity parameter is used to indicate the capacity of the user data space 2
- the second address parameter is used to indicate the start address of the user data space 2.
- the electronic device modifies the block address of the data block in the second space, where the second space is the remaining space in the user data space 2 except for the first space.
- the user data space 2 includes a first space and a second space
- the first space includes user data blocks D x+1 to D y
- the second space includes user data blocks D y + 1 to D n, SIT data items S x + 1 to S y for the validity of the identification data block D x + 1 to D y of.
- the data items S x+1 to Sy are no longer used to indicate the data in the first space.
- Validity of data blocks D x+1 to D y are used to indicate the validity of D y+1
- the data item S x+2 is used to indicate the validity of D y+2
- the electronic device also needs to modify the corresponding SIT data item according to the validity of the data block in the second space.
- the electronic device modifies the block address of the data block in the second space, as shown in FIG. 18, the first ny data items among the data items S x+1 to S n are used to identify the data in the second space The validity of the block , the last yx data items of the data items S x+1 to S n are in an idle state, and the validity of the data block is no longer indicated, and the electronic device can delete the aforementioned last yx data items.
- the block addresses of data blocks in the user data space are all offset addresses relative to the start address of the metadata storage area.
- the data blocks in the first space no longer belong to user data.
- Space 2 The first data block in the second space becomes the first data block of user data space 2
- the first data block in the second space on the logical address becomes the next data block of the last data block of user data space 1. . Therefore, after releasing the first space to the system software space, the block address of the data block in the second space recorded in the NAT needs to be modified.
- the physical storage location of the data does not change. Modifying the block address of the first data block can satisfy the requirement that the data block is released after the first space is released.
- the first space includes F data blocks
- the above modification of the block address of the data block in the second space recorded in the NAT includes: the electronic device queries the third data of the second space in the SSA The second file number of the file to which the second data in the block belongs; the electronic device searches the NAT for the second entry that records the second file number, and the second entry records the node block of the file to which the third data block belongs If the block address of the aforementioned node block is the same as the block address of the third data block, the third data block is determined to be a node block, and the electronic device shifts the block address of the node block in the second table entry forward by F block ; If the block address of the node block is different from the block address of the third data block, the block address of the data block storing the second data is recorded in the node block, and the electronic device queries the node block according to the block address of the node block , And offset the block address of the data block of the second data stored in the node block forward
- the electronic device modifies the block address of the data block in the second space recorded in the NAT, that is, traverses and modifies the block address of the data block containing valid data in the second space.
- the electronic device upgrades the current version of the operating system to a new version, and the upgraded system software space includes the first space.
- a window 408 is displayed, and the window 408 includes second prompt information.
- the content of the second prompt information may include "system update successful". Because the version upgrade method proposed in the embodiment of the present application greatly reduces the length of the version upgrade.
- the version upgrade process shown in Figure 19 may only take a few tens of seconds.
- the version update method provided in the embodiment of the present application may further include step S208 to step S210.
- the electronic device releases the third space at the end of the system software space to the user data space 2.
- the upgraded user data space 2 includes a third space.
- the capacity of the third space is equal to the capacity of the original system software space minus the capacity of the system software space of the new version.
- a data block is the next data block of the last data block of user data space 2.
- the electronic device releasing the third space at the end of the system software space to the user data space includes: the electronic device modifies the first capacity parameter in the partition table to the capacity of the new version of the system software space, and The second capacity parameter is modified to the capacity of the new version of user data space 2, and the second address parameter is modified to the start address of the new version of user data space 2, and the start address of the new version of user data space 2 is equal to the start of the third space Starting address, the capacity of the user data space 2 of the new version is equal to the capacity of the original user data space 2 plus the capacity of the third space.
- the third space does not store valid software version installation data. Therefore, the electronic device can directly release the third space at the end of the system software space to the user data space without clearing the data in the third space.
- the electronic device when the capacity of the system software space of the new version is less than the current capacity of the system software space, the electronic device can immediately release the free space in the free system software space to the user data space after the version is upgraded; The device may also release the free space of the free system software space to the user data space after the electronic device can be upgraded in the version and the available space of the user data space is insufficient.
- the embodiments of the present application do not specifically limit this.
- the electronic device modifies the block addresses of the data blocks in the first space and the second space.
- the user data space 2 includes user data blocks D x+1 to D y . If the space required for the software version upgrade is less than the current system software space, after the version upgrade, the third space in the system software space can be released to the user data space 2. If the third space includes data blocks Dg to Dg+a, the new user data space 2 will include D x+1 to D y , and Dg to Dg +a , and the electronics needs to modify the original user data space recorded in the NAT The block address of the data block in 2, the original user data space 2 includes the first space and the second space.
- the first block of the third space becomes the first block of the expanded user data space 2
- the logical address is in the third space
- the first data block becomes the next data block after the last data block in user data space 1.
- the offset address of the data block in the original user data space 2 needs to be added to the total amount of data blocks in the third space. Therefore, the first space and the first space recorded in the NAT should be modified.
- the third space contains a data blocks
- the original block address of the first data block in the first space of user data space 2 is 1000 blocks offset from the start block of the metadata storage area, then Modify the block address of the first data block in the above first space to 1000+a blocks.
- the above modification of the block addresses of the data blocks in the first space and the second space recorded in the NAT may refer to the modification of the data blocks in the second space recorded in the NAT in the foregoing embodiment.
- Block address, I won’t repeat it here.
- user data space 2 includes a first space and a second space
- the first space includes user data blocks D x+1 to D y
- the second space includes user data blocks D y + 1 to D n, SIT data items S x + 1 to S y for the validity of the identification data block D x + 1 to D y of.
- the data items S x+1 to S x+a are no longer used to indicate The validity of the data blocks D x+1 to D x+a , and the data items S x+1 to S x+a will be used to indicate the validity of the data blocks D g to D g+a of the third space.
- the data item S x+a+1 will be used to indicate the validity of the data block D x+1
- the data item S x+a+2 will be used to indicate the validity of the data block D x+2
- the electronic device also needs to modify the corresponding SIT data items according to the validity of the data blocks in the first space and the second space.
- the data item S n will be used to indicate the validity of the data block D na .
- data items S n+1 to S n+a and data items S n+1 to S need to be added.
- n+a is used to indicate the validity of the data blocks D n-a+1 to D n.
- the version upgrade method shown in FIG. 13 does not need to move the metadata storage area, and does not need to modify the offset address of the data block in the user data space 1, which can reduce the duration of the version upgrade and reduce the risk of data loss.
- the block address of the data block in the original user data space 2 needs to be modified. This is because user data space 2 and user data space 1 are logically continuous in terms of logical locations.
- an embodiment of the present application also provides a version upgrade method.
- a virtual invalid data area is added to the user data space.
- the virtual invalid data area is a virtual logical space and does not occupy actual physical space.
- the virtual invalid data area contains virtual data blocks, and the virtual invalid data area on the logical address is after user data space 1 and before user data space 2.
- user data space 1 contains user data blocks D 1 to D x , and the corresponding block addresses of data blocks D 1 to D x are d 1 to d x respectively ;
- the virtual invalid data area includes virtual data blocks D x+1 to D y , the block addresses corresponding to the data blocks D x+1 to D y are respectively d x+1 to d y ;
- the user data space 2 contains user data blocks D y+1 to D r , data blocks The corresponding block addresses of D y+1 to Dr are d y+1 to dr respectively .
- the SIT will also contain data items S x+1 to Sy corresponding to the virtual data blocks D x+1 to D y , and the data items S x+1 to Sy are all marked as invalid. .
- the start address of the virtual invalid data area and the virtual space capacity may be recorded in the SB or CP.
- the space capacity of the virtual invalid data area recorded in the SB or CP the size of the virtual invalid data area can be changed.
- the virtual invalid data area since the data blocks in the virtual invalid data area are all identified as invalid data blocks, the virtual invalid data area will not be written.
- the virtual invalid data area is a virtual logical space and does not occupy actual physical space, the virtual invalid data area cannot store data, and the virtual invalid data area cannot be read. Therefore, the space used for the user data returned from the upper layer needs to be reduced by the space size of the virtual invalid data area.
- the initial space size of the virtual invalid data area is usually less than or equal to the initial size of the system software space.
- FIG. 22 is a schematic flowchart of another version update method provided by an embodiment of the present application.
- the version update method provided by the embodiment of the present application includes but is not limited to steps S301 to S307. The possible implementation of this method embodiment will be further described below.
- the electronic device receives an update instruction, where the update instruction is used to instruct to update the current version of the operating system to a new version.
- the electronic device judges whether the capacity of the system software space of the new version is greater than the current capacity of the system software space.
- the electronic device determines whether the total amount of free space in the data area of the user data space is greater than the first difference, and the first difference is the new version of the system The difference between the capacity of the software space and the current capacity of the system software space; if it is greater than, step S204 is performed; if it is less than or equal, a first prompt message is generated, and the first prompt message is used to remind the user that the storage space is insufficient and the system update fails.
- the electronic device moves the valid user data in the first space of the user data space 2 header to the remaining data area, where the capacity of the first space is equal to the first difference, and the remaining data area is users other than the first space.
- the remaining data area of the data space is a configurable unit.
- the electronic device releases the first space to the system software space.
- S306. Increase the virtual invalid data area, and set the data item used to identify the validity of the first space data block as an invalid flag, and the increased capacity of the virtual invalid data area is equal to the capacity of the first space.
- the user data space 2 includes a first space and a second space
- the first space includes user data blocks D y+1 to D z
- the second space includes user data blocks D z+1 to D r
- the data items S y+1 to S z in the SIT are used to identify the validity of the data blocks D y+1 to D z. If the space required for the software version upgrade is greater than the current system software space, during the version upgrade process, the electronic device can release the first space of the user data space 2 to the system software space. After releasing the first space to the system software space, the electronic device increases the space capacity of the virtual invalid data area. The increased space capacity of the virtual invalid data area is equal to the capacity of the first space.
- the data blocks in the first space D y+1 to D z corresponding data item SIT S y + 1 to S z are set to 1.
- the data items S x+1 to Sy are no longer used to indicate the validity of the data block in the first space, and the data items Sy+1 to S z can be used to indicate the validity of the newly added data block in the virtual invalid data area.
- the block addresses of data blocks in the user data space are all offset addresses relative to the start address of the metadata storage area. After the first space is released to the system software space, the data blocks in the first space no longer belong to user data. Space 2.
- the first data block in the second space becomes the first data block of user data space 2
- the first data block in the second space on the logical address becomes the next data block of the last data block in the virtual invalid data area .
- the electronic device In order not to change the offset address of the data block in the second space relative to the start address of the metadata storage area, the electronic device increases the space capacity of the virtual invalid data area, and the increased space capacity of the virtual invalid data area is equal to the capacity of the first space , That is, the total amount of virtual data blocks added in the virtual invalid data area is equal to the total amount of data blocks in the first space. In this way, it can be ensured that the block address of the data block in the second space will not change. After the electronic device releases the first space to the system software space, there is no need to modify the block address of the data block in the second space.
- Sy+1 to S z are all 1, and Sy+1 to S z can be used to characterize the validity of the newly added data block in the virtual invalid data area.
- the electronic device upgrades the current version of the operating system to a new version, and the upgraded system software space includes the first space.
- the virtual invalid data area can also be understood as a part of user data space 1, and the last data block of the virtual invalid data area is the last data block of user data space 1, and the capacity of user data space 1 is less than The current capacity of the system software space.
- the virtual invalid data area may also be referred to as the fourth space at the end of the user data space 1.
- the electronic device before the electronic device updates the current version of the operating system to the new version, the electronic device increases the virtual invalid data area and the system software space, and the increased system software space includes the first space, The increased capacity of the virtual invalid data area is equal to the first difference; the fifth space is the increased virtual invalid data area, and the last data block of user data space 1 after the increased virtual invalid data area is the last of the fifth space data block.
- the virtual invalid data area is increased, that is, the space capacity of the virtual invalid data area recorded in the metadata storage area is modified to the capacity of the fifth space.
- steps S301 to S305 can refer to the optional embodiments of steps S201 to S205, which will not be repeated here.
- the version update method provided in the embodiment of the present application may further include step S308 to step S309.
- the electronic device releases the third space at the end of the software version to the user data space 2 and shrinks the virtual invalid data area.
- the reduced capacity of the virtual invalid data area is equal to the capacity of the third space.
- the electronic device in the virtual data block SIT 24 corresponding to the data item 1 to S x + S y in a term (i.e., S y- a+1 to Sy ) data items are set as valid flags, and the data items Sy-a+1 to Sy will be used to identify the validity of the data blocks D g to D g+1.
- the user data space 2 includes user data blocks D y+1 to Dr. If the space required for the software version upgrade is less than the current system software space, after the version upgrade, the third space in the system software space can be released to the user data space 2. If the third space includes data blocks D g to D g+a , the new user data space 2 will include D y+1 to Dr and D g to D g+a .
- the electronic device After releasing the third space in the system software space to user data space 2, the electronic device reduces the space capacity of the virtual invalid data area, and the reduced space capacity of the virtual invalid data area is equal to the capacity of the third space, and the last a in the virtual invalid data area SIT data blocks corresponding to the data item S y-a + 1 to S y are set to 0.
- the data items S y-a + 1 to be used for S y Indicates the validity of the data block in the third space.
- the electronic device releases the third space in the system software space to the user data space 2
- the first block of the third space becomes the first block of the expanded user data space 2
- the logical address is in the third space
- the first data in the virtual invalid data area becomes the next data block of the last data block.
- the electronic device reduces the space capacity of the virtual invalid data area, and the reduced space capacity of the virtual invalid data area is equal to the capacity of the third space , That is, the total amount of virtual data blocks reduced in the virtual invalid data area is equal to the total amount of data blocks in the third space.
- the original user data space 2 refers to the original user data space 2 before release.
- Sy-a+1 to Sy are all 1, and Sy-a+1 to Sy can be used to characterize the validity of the data block in the third space.
- the virtual invalid data area can also be understood as a part of user data space 1, and the last data block of the virtual invalid data area is the last data block of user data space 1, and the capacity of user data space 1 is less than The current capacity of the system software space.
- the electronic device after the electronic device receives the update information, the electronic device reduces the virtual invalid data area and the system software space.
- the reduced system software space does not include the third space, and the reduced capacity of the virtual invalid data area is equal to the third space.
- the sixth space is the reduced virtual invalid data area, and the last data block of the first user data space after the virtual invalid data area is reduced is the last data block of the sixth space.
- the virtual invalid data area is reduced, that is, the space capacity of the virtual invalid data area recorded in the metadata storage area is modified to the capacity of the sixth space.
- the functional units in the various embodiments of the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
- the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
- the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the computer software products are stored in a storage
- the medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage media include: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
L'invention divulgue un procédé de mise à niveau de version. Le procédé consiste à : recevoir des informations de mise à jour, les informations de mise à jour comprenant la capacité d'un espace de logiciel système d'une nouvelle version, un espace de données d'utilisateur comprenant un premier espace de données d'utilisateur et un second espace de données d'utilisateur, le second espace de données d'utilisateur dans un espace physique est adjacent à l'espace de logiciel système, le premier espace de données d'utilisateur comprend une zone de stockage de métadonnées et une zone de données et le premier bloc de données dans le second espace de données d'utilisateur est un bloc de données suivant le bloc de données de queue dans le premier espace de données d'utilisateur ; et lorsque l'espace de logiciel système de la nouvelle version est supérieur à l'espace de logiciel système actuel et un espace de données libre dans un espace de données d'utilisateur est supérieur à la différence de capacité avant et après que l'espace de logiciel système a été mis à niveau, mettre à niveau un système d'exploitation dans la nouvelle version, l'espace de logiciel système mis à niveau comprenant un premier espace au niveau de la tête du second espace de données d'utilisateur d'origine, la capacité du premier espace est une première valeur de différence et le second espace de données d'utilisateur mis à niveau est l'espace restant, à l'exclusion du premier espace, dans le second espace de données d'utilisateur d'origine. Par conséquent, la durée requise pour une mise à niveau de version peut être réduite.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010198332.0 | 2020-03-19 | ||
CN202010198332.0A CN113495744B (zh) | 2020-03-19 | 2020-03-19 | 一种版本升级方法及相关装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021185352A1 true WO2021185352A1 (fr) | 2021-09-23 |
Family
ID=77770498
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/081796 WO2021185352A1 (fr) | 2020-03-19 | 2021-03-19 | Procédé de mise à niveau de version et appareil associé |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113495744B (fr) |
WO (1) | WO2021185352A1 (fr) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114217838A (zh) * | 2022-02-22 | 2022-03-22 | 深圳市微克科技有限公司 | 一种智能穿戴的表盘更新方法及系统 |
CN117177246A (zh) * | 2023-10-25 | 2023-12-05 | 荣耀终端有限公司 | 一种用于锁死电子设备的方法、电子设备及服务器 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114185587B (zh) * | 2021-12-13 | 2023-08-25 | 平安壹账通云科技(深圳)有限公司 | 微码升级方法、装置、设备及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080270994A1 (en) * | 2007-04-27 | 2008-10-30 | Ying Li | Method and apparatus of partitioned memory dump in a software system |
CN106383666A (zh) * | 2016-09-07 | 2017-02-08 | 东信和平科技股份有限公司 | 一种数据存储方法及装置 |
CN109656603A (zh) * | 2019-01-15 | 2019-04-19 | Oppo广东移动通信有限公司 | 系统升级方法、装置、存储介质及电子设备 |
CN110321148A (zh) * | 2019-07-12 | 2019-10-11 | Oppo广东移动通信有限公司 | 系统升级方法及相关装置 |
CN110781030A (zh) * | 2019-09-09 | 2020-02-11 | 晶晨半导体(深圳)有限公司 | 一种android系统升级过程中用户数据的备份方法 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1956482B1 (fr) * | 2007-02-09 | 2011-08-17 | Telefonaktiebolaget LM Ericsson | Génération de mises à jour delta pour dispositif de traitement |
CN109710286B (zh) * | 2018-11-30 | 2022-11-15 | 歌尔光学科技有限公司 | 系统升级方法、装置、设备和存储介质 |
CN110134416A (zh) * | 2019-04-12 | 2019-08-16 | 平安普惠企业管理有限公司 | 软件更新方法、装置及计算机可读存储介质 |
-
2020
- 2020-03-19 CN CN202010198332.0A patent/CN113495744B/zh active Active
-
2021
- 2021-03-19 WO PCT/CN2021/081796 patent/WO2021185352A1/fr active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080270994A1 (en) * | 2007-04-27 | 2008-10-30 | Ying Li | Method and apparatus of partitioned memory dump in a software system |
CN106383666A (zh) * | 2016-09-07 | 2017-02-08 | 东信和平科技股份有限公司 | 一种数据存储方法及装置 |
CN109656603A (zh) * | 2019-01-15 | 2019-04-19 | Oppo广东移动通信有限公司 | 系统升级方法、装置、存储介质及电子设备 |
CN110321148A (zh) * | 2019-07-12 | 2019-10-11 | Oppo广东移动通信有限公司 | 系统升级方法及相关装置 |
CN110781030A (zh) * | 2019-09-09 | 2020-02-11 | 晶晨半导体(深圳)有限公司 | 一种android系统升级过程中用户数据的备份方法 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114217838A (zh) * | 2022-02-22 | 2022-03-22 | 深圳市微克科技有限公司 | 一种智能穿戴的表盘更新方法及系统 |
CN117177246A (zh) * | 2023-10-25 | 2023-12-05 | 荣耀终端有限公司 | 一种用于锁死电子设备的方法、电子设备及服务器 |
CN117177246B (zh) * | 2023-10-25 | 2024-04-12 | 荣耀终端有限公司 | 一种用于锁死电子设备的方法、电子设备及服务器 |
Also Published As
Publication number | Publication date |
---|---|
CN113495744B (zh) | 2024-08-27 |
CN113495744A (zh) | 2021-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021083378A1 (fr) | Procédé pour accélérer le démarrage d'une application et dispositif électronique | |
WO2020108356A1 (fr) | Procédé d'affichage d'application et dispositif électronique | |
WO2021082835A1 (fr) | Procédé d'activation de fonction et dispositif électronique | |
CN112148400B (zh) | 锁定状态下的显示方法及装置 | |
CN114327666B (zh) | 应用启动方法、装置和电子设备 | |
CN114153356A (zh) | 消息处理方法及电子设备 | |
WO2021185352A1 (fr) | Procédé de mise à niveau de version et appareil associé | |
WO2021159746A1 (fr) | Procédé et système de partage de fichiers et dispositif associé | |
CN113961157B (zh) | 显示交互系统、显示方法及设备 | |
CN113805797B (zh) | 网络资源的处理方法、电子设备及计算机可读存储介质 | |
WO2021190524A1 (fr) | Procédé de traitement de capture d'écran, interface utilisateur graphique et terminal | |
WO2021218429A1 (fr) | Procédé de gestion d'une fenêtre d'application, dispositif terminal et support de stockage lisible par ordinateur | |
US12032938B2 (en) | Plug-in installation method, apparatus, and storage medium | |
CN112783418B (zh) | 一种存储应用程序数据的方法及移动终端 | |
CN114489469B (zh) | 一种数据读取方法、电子设备及存储介质 | |
CN116709609B (zh) | 消息传递方法、电子设备及存储介质 | |
CN117009023B (zh) | 显示通知信息的方法及相关装置 | |
CN116662150B (zh) | 应用启动耗时检测方法及相关装置 | |
WO2024046010A1 (fr) | Procédé d'affichage d'interface, ainsi que dispositif et système | |
CN117707562B (zh) | 参数更新方法和终端设备 | |
CN116795476B (zh) | 一种删除壁纸的方法及电子设备 | |
WO2023179682A1 (fr) | Procédé de collaboration de dispositif | |
WO2024012398A1 (fr) | Procédé de partage de messages et dispositif associé | |
CN117675881A (zh) | 一种应用数据保存方法及电子设备 | |
CN118613782A (zh) | 应用组件管理方法及相关设备 |
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: 21770446 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21770446 Country of ref document: EP Kind code of ref document: A1 |