Processor Memory Compression for Background Application Switching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for reducing memory occupancy in terminal devices, such as mobile phones, when switching applications from foreground to background, often require disabling applications, leading to inefficient memory usage and the need for re-enabling when the application is reused, resulting in suboptimal memory management.

Innovation Solution

A method that compresses and decompresses physical memory pages using predefined algorithms, such as ARM frame buffer compression (AFBC) or LZ4, by determining virtual and physical memory pages, creating compression/decompression index tables, and setting flag bits to efficiently manage memory when switching applications between foreground and background modes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If an application is disabled to reduce memory occupied by the processor when the terminal device is not running an application in the foreground, then memory occupancy is reduced, but the application needs to be re-enabled when the user reuses it, resulting in loss of time and reduced productivity

Engineering Contradiction:
Improvememory occupancyVSAvoidtime for re-enabling application
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent changes the state parameter of application memory from uncompressed to compressed form. When an application moves to background, its memory pages are compressed using algorithms like LZ4 or GZIP, reducing memory occupancy while preserving the application's executable state. This allows the application to remain active without full memory allocation, eliminating the need for re-enabling.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent implements dynamic memory management where the compression state of application memory is adjusted based on application activity state. Memory pages are compressed when applications transition to background and decompressed when brought to foreground, creating a dynamic system that adapts memory allocation to actual usage needs without requiring application re-enabling.

Inventive Principle:
Principle #15Dynamics

2Quantity of substance

If an application is disabled to reduce memory occupied by the processor, then memory occupancy is reduced, but the operation complexity increases due to the need for re-enabling applications

Engineering Contradiction:
Improvememory occupancyVSAvoidoperation complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The system changes memory state from uncompressed to compressed based on application state, managed automatically by the operating system's memory management unit. This automated parameter change eliminates the need for manual or complex re-enabling operations, reducing operational complexity while maintaining low memory occupancy.

Inventive Principle:
Principle #35Parameter changes

3Quantity of substance

If memory is reduced by disabling applications, then memory occupancy is reduced, but productivity decreases due to the need for re-enabling applications

Engineering Contradiction:
Improvememory occupancyVSAvoidapplication switching efficiency
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent creates a dynamic memory management system where applications remain in a compressed suspended state in background, allowing instant resumption when brought to foreground. This dynamic state transition maintains both low memory occupancy and high productivity, as applications can be restored immediately without re-enabling overhead.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system performs preliminary compression of application memory when transitioning to background state, preparing the application for quick resumption. This preliminary action ensures that when the user switches back to the application, it can be decompressed and restored rapidly, maintaining high productivity while keeping memory occupancy low during background periods.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP3674846B1Method and apparatus for compressing and decompressing memory occupied by processor
Publication Date: 2023.12.06 HUAWEI TECH CO LTD
  • EP3674846B1 patent drawingFigure 1
  • EP3674846B1 patent drawingFigure 2
  • EP3674846B1 patent drawingFigure 3

AI summary

This application provides a method for compressing memory occupied by a processor (10), a method for decompressing memory occupied by a processor (10), and an apparatus, and relates to the field of terminal technologies, so that when a terminal device runs an application in a background, memory occupied by a processor (10) of the terminal device can be reduced. The method for compressing memory occupied by a processor (10) is applied to a scenario in which a first application run by a terminal device is switched from a foreground to a background, and includes: determining a virtual memory address range (S101), where the virtual memory address range is a range of all or some of virtual memory addresses occupied by a processor (10) of the terminal device when the terminal device runs the first application in the foreground, and the virtual memory address range includes at least one virtual memory page; determining, in a first page table based on the at least one virtual memory page, each physical memory page corresponding to each virtual memory page (S102), where the first page table is a page table of a process of the first application; and compressing each physical memory page by using a predefined compression algorithm (S103).