CN116700602B - Method and equipment for inquiring and expanding service life of memory - Google Patents
Method and equipment for inquiring and expanding service life of memory Download PDFInfo
- Publication number
- CN116700602B CN116700602B CN202211571442.2A CN202211571442A CN116700602B CN 116700602 B CN116700602 B CN 116700602B CN 202211571442 A CN202211571442 A CN 202211571442A CN 116700602 B CN116700602 B CN 116700602B
- Authority
- CN
- China
- Prior art keywords
- memory
- extended memory
- service life
- ufs
- query frequency
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9038—Presentation of query results
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
- G06F3/0605—Improving or facilitating administration, e.g. storage management by facilitating the interaction with a user or administrator
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The embodiment of the application provides a method and equipment for inquiring and expanding the service life of a memory, and relates to the technical field of electronics. The method comprises the following steps: after the electronic equipment starts the memory expansion function, the query frequency of the service life of the expansion memory is determined according to the use information of the expansion memory. And then, the electronic equipment inquires the service life of the extended memory based on the inquiry frequency. The usage information of the extended memory comprises one or more of the service life of the extended memory, the consumption rate of the extended memory, the accumulated usage duration of the extended memory, or the usage scene of the extended memory. According to the use information of the extended memory, the query frequency of the service life of the extended memory can be dynamically set. Therefore, the dynamic inquiry of the service life of the extended memory can be realized, the use power consumption of the extended memory and the whole power consumption of the electronic equipment are reduced, and the use experience of a user is improved.
Description
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a method and apparatus for querying and extending the lifetime of a memory.
Background
Universal flash storage (Universal Flash Storage, UFS) is a new generation of embedded flash technology that represents both a storage standard and a class of storage devices that use the storage standard. The UFS storage device has significant advantages and wide application in electronic devices such as cell phones, tablets, and the like. Of course, UFS storage devices have a certain lifetime. For example, UFS storage devices exist for a limited number of P/es (programmable/erased times). UFS storage devices are continuously worn out with use, and after wearing out to a certain extent, the entire UFS storage device is not available, and even data loss and other serious consequences are caused. Therefore, it is necessary to periodically query the UFS storage device for its lifetime.
In the process of querying the service life of the UFS storage device, a preset process is usually pulled up periodically at regular time to query the UFS storage device. Each query takes several seconds or even tens of seconds. After the inquiry of day and day, a large amount of power consumption of the background of the electronic equipment can be caused, the power consumption of the electronic equipment is increased, and the use experience of a user is further reduced.
Disclosure of Invention
In view of this, the present application provides a method and apparatus for querying the lifetime of an extended memory, by dynamically setting the query frequency of the lifetime of the extended memory according to the usage information of the extended memory. Therefore, the dynamic inquiry of the service life of the extended memory can be realized, the use power consumption of the extended memory and the whole power consumption of the electronic equipment are reduced, and the use experience of a user is improved.
In a first aspect, the present application provides a method for querying an extended memory lifetime, applied to an electronic device, the method including:
after the electronic equipment starts the memory expansion function, the query frequency of the service life of the expansion memory is determined according to the use information of the expansion memory. And then, the electronic equipment inquires the service life of the extended memory based on the inquiry frequency. The usage information of the extended memory comprises one or more of the service life of the extended memory, the consumption rate of the extended memory, the accumulated usage duration of the extended memory, or the usage scene of the extended memory.
Therefore, the embodiment of the application can dynamically determine the query frequency of the service life of the extended memory according to the change of the use information of the extended memory. For example, a lower query frequency is employed when extended memory has a lower lifetime. When the service life of the extended memory is longer and the service life of the extended memory is close to the service life limit, the query frequency of the service life of the extended memory can be accelerated. Therefore, the dynamic inquiry of the service life of the extended memory can be realized, and the use power consumption of the extended memory is reduced. Meanwhile, the overall power consumption of the electronic equipment can be reduced, the waste of system resources is avoided, and the use experience of a user is improved.
In a possible implementation manner of the first aspect, the usage information of the extended memory includes a usage parameter, where the usage parameter includes a used lifetime of the extended memory, or a consumption rate of the extended memory, or a usage accumulated duration of the extended memory; the extended memory use accumulated time length comprises the accumulated time length after the electronic equipment is activated, or the startup accumulated time length of the electronic equipment, or the bright screen accumulated time length of the electronic equipment.
In the process that the electronic equipment determines the query frequency of the service life of the extended memory according to the use information of the extended memory; comprising the following steps: under the condition that the use parameter is smaller than or equal to a first threshold value, determining a first query frequency for expanding the service life of the memory; under the condition that the use parameter is larger than the first threshold value and smaller than or equal to the second threshold value, determining a second query frequency of the service life of the extended memory; wherein the second query frequency is greater than the first query frequency.
Therefore, when the service life of the extended memory is lower, the embodiment of the application adopts lower query frequency. And as the service life of the extended memory is increased, the frequency of inquiring the service life of the extended memory can be increased, so that the dynamic inquiring of the service life of the extended memory is realized. Unnecessary resource waste caused by expanding the memory is avoided. And meanwhile, the power consumption of the extended memory can be reduced, and the CPU use efficiency is improved. Meanwhile, the method can avoid the situation that the whole query process keeps higher frequency to query the service life of the extended memory, and reduces the power consumption of the mobile phone.
In a possible implementation manner of the first aspect, the method further includes:
determining a third query frequency for expanding the service life of the memory when the usage parameter is greater than the second threshold and less than or equal to the memory threshold; the third query frequency is greater than the second query frequency, the second query frequency is generated by the first query frequency according to the first proportion, the third query frequency is generated by the second query frequency according to the second proportion, and the second proportion is smaller than the first proportion.
Therefore, when the service life of the extended memory is lower, the embodiment of the application adopts lower query frequency. And when the service life of the extended memory is longer and the service life is close to the service life limit, the frequency of inquiring the service life of the extended memory is higher and higher. Furthermore, whether the service life of the extended memory reaches the service life period can be accurately inquired. The mobile phone is prevented from executing subsequent tasks when the service life of the extended memory is close to or reaches the lifetime limit, and the stable operation of the mobile phone is prevented from being influenced.
In a possible implementation manner of the first aspect, the usage scenario of the extended memory includes a bright screen scenario and an off screen scenario. The process of determining the query frequency of the service life of the extended memory by the electronic equipment according to the use information of the extended memory comprises the following steps: and under the bright screen scene, the electronic equipment determines a fourth query frequency of the service life of the extended memory. Under the screen-off scene, the electronic equipment determines a fifth query frequency of the service life of the extended memory; the fourth query frequency is greater than the fifth query frequency.
It can be seen that when the electronic device is in a bright screen scene state, a user can operate an application program in the electronic device. If the user frequently operates the application program, the service life of the extended memory will be longer. And further, a lower query frequency is required in the off-screen scene, and a higher query frequency is required in the on-screen scene. By dynamically executing the query process, the power consumption of the expansion memory and the mobile phone can be reduced, and the resources of the CPU can be saved.
In a possible implementation manner of the first aspect, the process of determining, by the electronic device, a query frequency of a service life of the extended memory according to usage information of the extended memory includes: the electronic equipment determines the query frequency of the service life of the extended memory according to the service life of the extended memory and the service information of the extended memory; wherein, the query frequency is inversely related to the lifetime of the extended memory. I.e., the smaller the lifetime of the extended memory, the greater the frequency of queries for the lifetime of the extended memory.
It can be seen that extended memory due to the short life span is easier to reach. Further, more query frequencies are required for extended memories with short life span. And for extended memories with long life span, a lower query frequency is required. Whether for the extended memory with short service life or the extended memory with long service life, the corresponding query frequency can be determined according to the use information of the extended memory. However, under the condition that the usage information of the extended memory is the same (for example, the current P/E times are the same), the query frequency corresponding to the extended memory with short life is less than the query frequency corresponding to the extended memory with long life. Therefore, by setting different dynamic query frequencies for the extended memories with different life spans, the power consumption of the extended memories and the electronic equipment can be reduced without keeping the fixed and higher frequency in the whole query process.
In a possible implementation manner of the first aspect, the method further includes: the electronic equipment responds to the query operation input by the user and outputs prompt information; the prompt message is used for indicating the service life of the extended memory.
Therefore, the embodiment of the application can respond to the query operation input by the user, provide the user with humanized functions such as the service life of the queried memory device, improve the interactivity between the user and the mobile phone and improve the use experience of the user.
In a possible implementation manner of the first aspect, in a process of determining, by the electronic device, a query frequency of a service life of the extended memory according to usage information of the extended memory, the method includes:
under the condition that the service life of the extended memory is smaller than or equal to a memory threshold value and the user transfer capacity is larger than a dump threshold value, determining the query frequency of the service life of the extended memory according to the use information of the extended memory; the user transfer volume is used for representing the corresponding data volume in the process of dumping the extended memory;
and closing the memory expansion function for a preset duration or limiting the user transfer volume to be less than the limit threshold value under the condition that the service life of the expanded memory is less than or equal to the memory threshold value and the user transfer volume is greater than the dump threshold value; wherein the limit threshold is less than the dump threshold.
Therefore, according to the embodiment of the application, on the basis that the service life of the extended memory is smaller than or equal to the memory threshold, the dump threshold can be utilized to control the user transfer volume in the memory dump process, or the memory extension function is temporarily closed. The electronic device is prevented from excessively consuming the extended memory in the process of starting the memory extension function, and the stability of the operation of the extended memory is prevented from being influenced.
In a possible implementation manner of the first aspect, the method includes: and closing the memory expansion function under the condition that the service life of the expansion memory is longer than the memory threshold value.
Therefore, the embodiment of the application can timely inquire that the service life of the extended memory is longer than the memory threshold value, and close the memory extended function; and the situation that data is lost when the corresponding task is continuously executed after the service life of the extended memory is longer than the memory threshold value is avoided. And the extended service life of the memory is close to the service life period, so that the realization of the memory extended function is influenced. The stable operation of the mobile phone is ensured, and the use experience of a user is improved.
In a possible implementation manner of the first aspect, in a process of determining, by the electronic device, a query frequency of a service life of the extended memory according to usage information of the extended memory, the method includes:
If the opening time of the memory expansion function is longer than or equal to the preset duration under the condition that the service life of the expanded memory is smaller than or equal to the memory threshold and the user transfer capacity is smaller than or equal to the dump threshold, determining a first overrun of the expanded memory in a first duration after the current time; the first overrun is used for representing the degree of difference between the number of times the user's transfer volume is greater than the dump threshold value and the rated overrun number of times in the first duration. And then, determining the query frequency of the service life of the extended memory according to the first overrun of the extended memory and the use information of the extended memory.
It can be seen that the query frequency of the extended memory for the service life is determined only according to the usage information of the extended memory. The first overrun may also be combined. The first overrun is used for representing the degree of difference between the times that the user transfer reserve is larger than the dump threshold value and the rated overrun times in the first duration. That is, if the memory expansion function is turned on for a long time, the first overrun may be determined based on a first time period after the current time. When the first overrun is higher, the service life of the extended memory is gradually prolonged, and a higher query frequency can be adopted. When the first overrun is lower, a lower query frequency may be employed. By combining the first overrun and the usage information of the extended memory, the query frequency of the service life of the extended memory can be determined according to two conditions, and the actual usage situation of the extended memory can be more similar. The power consumption of the extended memory and the electronic device can be reduced.
In a possible implementation manner of the first aspect, in a process of determining, by the electronic device, a query frequency of a service life of the extended memory according to usage information of the extended memory, the method includes:
if the starting time of the memory expansion function is less than the preset time under the condition that the service life of the expanded memory is less than or equal to the memory threshold and the user transfer capacity is less than or equal to the dump threshold, determining a second overrun of the expanded memory in a second time before the current time; the second overrun is used for indicating the degree of difference between the times that the user transfer volume is larger than the dump threshold value and the rated overrun times in the second duration. And then, determining the query frequency of the service life of the extended memory according to the second overrun of the extended memory and the use information of the extended memory.
It can be seen that the embodiments of the present application may further determine the query frequency by combining the second overrun and the usage information of the extended memory. The second overrun is used for representing the degree of difference between the times that the user transfer volume is larger than the dump threshold value and the rated overrun times in the second duration. That is, if the memory expansion function is turned on for a short time, the second overrun may be determined based on a second duration before the current time. When the second overrun is higher, the service life of the extended memory is gradually prolonged, and a higher query frequency can be adopted. When the second overrun is lower, a lower query frequency may be employed. By combining the second overrun and the usage information of the extended memory, the query frequency of the service life of the extended memory can be determined according to two conditions, and the actual usage situation of the extended memory can be more similar. The power consumption of the extended memory and the electronic device can be reduced.
In a second aspect, the present application provides an electronic device comprising a memory, one or more processors; the memory is coupled with the processor; wherein the memory has stored therein computer program code comprising computer instructions which, when executed by the processor, cause the electronic device to perform the method of querying for extended memory life as described in the first aspect above.
In a third aspect, the present application provides a computer readable storage medium having instructions stored therein which, when executed on a computer, cause the computer to perform a method of querying for extended memory life as described in the first aspect above.
Drawings
Fig. 1 is a schematic structural diagram of a memory expansion function starting method according to an embodiment of the present application;
fig. 2 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
fig. 3 is a schematic software structure of an electronic device according to an embodiment of the present application;
FIG. 4 is a flow chart of a method for querying and expanding memory life according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a service for controlling a pull-up lifetime according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating a method for querying an extended memory lifetime according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of an interface for outputting prompt information according to an embodiment of the present application;
FIG. 8 is a flowchart illustrating a method for querying an extended memory lifetime according to an embodiment of the present disclosure;
FIG. 9 is a flowchart illustrating a method for querying an extended memory lifetime according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Various exemplary embodiments, features and aspects of the disclosure will be described in detail below with reference to the drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, numerous specific details are set forth in the following detailed description in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order not to obscure the present disclosure.
Memory is one of the important components in electronic devices, which is the bridge to communicate with central processing units (Central Processing Unit, CPU). All programs in the electronic device are run in the internal memory, so the performance of the internal memory has a great influence on the electronic device. The internal memory, which is the main memory of the electronic device, may also be referred to as "memory". For example: random access Memory (Random Access Memory, RAM) and Read Only Memory (ROM). The RAM is used for temporarily storing operation data in the CPU and data exchanged with an external memory such as a hard disk. When the electronic equipment is operated, the CPU can call the data to be operated into the memory to operate, and after the operation is completed, the CPU transmits the result, and the operation of the memory also determines the stable operation of the electronic equipment. The RAM is a running memory, and the larger the capacity thereof, the faster the electronic device runs. But it acts as a random access memory and the data stored in RAM is not preserved after the electronic device is powered off. And ROM is used to store instructions for various system starts. The ROM includes different specifications such as embedded storage (Embeded Multi Media Card, EMMC) and universal flash storage (Universal Flash Storage, UFS), which differ in access speed. That is, the ROM is a storage memory, and can store data and cache of an application program installed in the electronic device. The faster the ROM speed, the faster the application can be loaded and run.
In general, a user can enrich the functions of use of an electronic device such as a mobile phone by installing an Application (App). If the video App is installed in the mobile phone, the mobile phone can display a detail page interface of the video App in the foreground after receiving the starting operation of the user on the video App. The user may use the function to which the video App corresponds, such as watching a video. Then, when the user needs to switch to other applications or the home screen, the video App can be switched to the background operation.
During the running of an application, the electronic device may allocate a memory space corresponding to the relevant data for storing the application. For example, a running memory RAM is used to store the relevant data for the application. When the application program is switched from the foreground operation to the background operation, the application program still occupies the storage space of the RAM and stores related data. For example: and switching to the data of the last display interface before the background operation so that the interface can be displayed in time for the user to check when the subsequent user switches the application from the background operation to the foreground operation. If the user runs multiple applications and does not close after use (e.g., switch to background operation). At this time, the mobile phone will use the storage space of the RAM to store the relevant data of each application program opened by the user.
Due to the limitation of the RAM capacity, the electronic device may compress the cold data in the RAM into the expansion memory by using the memory expansion technology, so as to reduce the RAM occupancy rate. The electronic device is illustratively designed with a memory reclamation mechanism that reclaims a portion of the occupied memory space to satisfy a new memory allocation request when the operating memory capacity exceeds a certain limit.
As shown in fig. 1, the mobile phone 100 is exemplified as including a CPU, an operation memory RAM, and an expansion memory such as UFS. When the CPU determines that the residual storage space of the RAM is smaller than the memory reclamation threshold, cold data which can be swapped out of the RAM is determined by adopting a least-used algorithm (Least Recently Used, LRU), and the cold data is compressed and cached into the UFS. By the method, the keep-alive rate of the background application program can be improved, and the effect of expanding the currently available memory space is achieved. Cold data, among other things, refers to data that is infrequently active, not accessed frequently, or even never accessed, but still requires long-term retention. Then, when the cold data cached in the UFS later is accessed, the CPU needs to decompress the cold data from the UFS, and then swap the decompressed cold data into the RAM. Since UFS has a limited number of P/es (programmable/erased times). UFS can be continually worn with use, and after wear to some extent, the entire UFS will be rendered unusable. And affects the stable operation of the electronic device, and even causes serious consequences such as data loss.
Thus, the electronic device needs to periodically query the extended memory for its lifetime. However, in the process of querying the extended memory for the service life, the electronic device usually employs a timing (e.g. 10 minutes) to pull up a preset process to query the extended memory. Each query takes several seconds or even tens of seconds. After the inquiry of day and day, a large amount of power consumption can be caused in the background of the electronic equipment. The power consumption of the electronic equipment is improved, and the use experience of a user is further reduced.
And after the electronic equipment inquires the service life of the extended memory, the electronic equipment automatically kills the preset process for inquiring the service life of the extended memory. When the preset process is automatically killed, the system abnormality detection is triggered and abnormal information such as abnormal positioning information, abnormal state information and the like is generated. Therefore, the extended memory is frequently inquired for a long time to have the service life, the preset process is killed, the abnormal detection is triggered, the use power consumption of the extended memory is increased, meanwhile, the CPU (central processing unit) is occupied to use resources, and the stable operation of the electronic equipment is affected.
Based on the above, the embodiment of the application provides a method for querying and expanding the service life of a memory, which is applied to electronic equipment. Since the electronic device needs to use and consume the extended memory in the process of executing the memory extension task. Therefore, in order to avoid the situation that the service life of the extended memory is near the lifetime, the electronic device is affected when the extended memory function is provided, and the extended memory has to be queried periodically.
Therefore, the embodiment of the application can determine the query frequency of the service life of the extended memory according to the use information of the extended memory. And then, the electronic equipment inquires the service life of the extended memory based on the inquiry frequency. The usage information of the extended memory comprises one or more of the service life of the extended memory, the consumption rate of the extended memory, the accumulated usage duration of the extended memory, or the usage scene of the extended memory. It can be appreciated that the query frequency of the extended memory for the service life can be determined according to one of the extended memory for the service life, the extended memory consumption rate, the extended memory usage cumulative time, and the extended memory usage scenario. The query frequency of the service life of the extended memory can also be determined according to the combination of the above several types.
For example, a lower query frequency is employed when extended memory has a lower lifetime. When the service life of the extended memory is longer and the service life of the extended memory is close to the service life limit, the query frequency of the service life of the extended memory can be accelerated. Therefore, the dynamic inquiry of the service life of the extended memory can be realized, and the use power consumption of the extended memory is reduced. Meanwhile, the overall power consumption of the electronic equipment can be reduced, the waste of system resources is avoided, and the use experience of a user is improved.
And when the service life of the extended memory is close to the service life limit, the time when the service life of the extended memory reaches the service life limit can be accurately determined by accelerating the query frequency of the service life of the extended memory. Therefore, the memory expansion function can be closed timely, the continuous operation of the electronic equipment after the service life of the expansion is prolonged is avoided, and the running stability of the electronic equipment is improved.
The electronic device provided by the embodiment of the application may include at least one of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an Ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook, a cellular phone, a personal digital assistant (Personal Digital Assistant, PDA), an augmented Reality (Augmented Reality, AR) device, a Virtual Reality (VR) device, an artificial intelligence (Artificial Intelligence, AI) device, a wearable device, a vehicle-mounted device, an intelligent home device, or a smart city device. The embodiment of the application does not particularly limit the specific type of the electronic device.
And the operating system for electronic device installation provided in the embodiment of the application includes, but is not limited to Or other operating system. The present application is not limited to the specific type of electronic device and the type of operating system with the installed operating system.
For example, taking an electronic device as a mobile phone, fig. 2 shows a schematic structural diagram of the mobile phone 100.
The handset 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (Universal Serial Bus, USB) connector 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (Subscriber Identification Module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro 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, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the handset 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components may be provided. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (Application processor, AP), a modem processor, a graphics processor (Graphics Processing Unit, GPU), an image signal processor (Image Signal Processor, ISP), a controller, a video codec, a digital signal processor (Digital Signal Processor, DSP), a baseband processor, and/or a Neural network processor (Neural-network Processing Unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The processor can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 may be a CACHE memory (CACHE). The memory may hold instructions or data that are used or used more frequently by the processor 110. If the processor 110 needs to use the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the memory stores other data in addition to the computer program, which may include data generated after the operating system or application program is run, including system data (e.g., configuration parameters of the operating system) and user data, such as data cached by a user-opened application program is typical user data. The memory generally includes memory and external memory. The memory may be RAM, ROM, CACHE, etc. The external memory may include a hard disk, a floppy disk, an optical disk, a USB flash disk, a multimedia card, etc.
It should be understood that the connection relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not limited to the structure of the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The wireless communication function of the mobile phone 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the handset 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied to the handset 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (Low Noise Amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
In some embodiments, the antenna 1 and the mobile communication module 150 of the handset 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the handset 100 can communicate with networks and other electronic devices through wireless communication technology. The wireless communication techniques may include the Global System for Mobile communications (Global System For Mobile Communications, GSM), general packet radio service (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), time division code division multiple access (Time-Division Code Division Multiple Access, TD-SCDMA), long term evolution (LongTerm Evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (Global Positioning System, GPS), a global navigation satellite system (Global Navigation Satellite System, GLONASS), a Beidou satellite navigation system (BeiDou Navigation Satellite System, BDS), a Quasi zenith satellite system (Quasi-Zenith Satellite System, QZSS) and/or a satellite based augmentation system (Satellite Based Augmentation Systems, SBAS).
The cell phone 100 may implement display functions through a GPU, a display 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. 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 194 includes a display panel. In some embodiments, the handset 100 may include 1 or more display screens 194.
The cell phone 100 may implement camera functions through a camera 193, isp, video codec, GPU, display 194, and application processor AP, neural network processor NPU, etc.
In some embodiments, a CPU or GPU or NPU in the processor 110 may process color image data and depth data acquired by the camera 193.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capabilities of the handset 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card. Or transfer files such as music, video, etc. from the electronic device to an external memory card.
The internal memory 121 may be used to store computer executable program code that includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (e.g., audio data, phonebook, etc.) created during use of the handset 100, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a nonvolatile memory, such as at least one magnetic disk storage device, an expansion memory such as a universal flash memory (universal flash storage, UFS), or the like. In some embodiments, the extended memory includes at least one storage device.
The processor 110 performs various functional methods or data processing of the mobile phone 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
In some embodiments, the RAM is used to temporarily store data related to the application in a running state, and the code and data of the operating system, and the UFS is used to store data in a swappable state, and so on.
The handset 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The software system of the mobile phone 100 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In this embodiment, taking an Android system with a layered architecture as an example, a software structure of the mobile phone 100 is illustrated.
Fig. 3 is a software configuration block diagram of the mobile phone 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is an application layer, an application framework layer, an Android Run (ART) and native C/c++ library, a hardware abstraction layer (Hardware Abstract Layer, HAL), a kernel layer, and a hardware layer, respectively, from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (Application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 3, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, an activity manager, an input manager, and so forth.
The window manager provides window management services (Window Manager Service, WMS) that may be used for window management, window animation management, surface management, and as a transfer station to the input system.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
The activity manager may provide activity management services (Activity Manager Service, AMS) that may be used for system component (e.g., activity, service, content provider, broadcast receiver) start-up, handoff, scheduling, and application process management and scheduling tasks.
The input manager may provide input management services (Input Manager Service, IMS), which may be used to manage inputs to the system, such as touch screen inputs, key inputs, sensor inputs, and the like. The IMS retrieves events from the input device node and distributes the events to the appropriate windows through interactions with the WMS.
The android runtime includes a core library and An Zhuoyun rows. The android runtime is responsible for converting source code into machine code. Android runtime mainly includes employing Advanced Or Time (AOT) compilation techniques and Just In Time (JIT) compilation techniques.
The core library is mainly used for providing the functions of basic Java class libraries, such as basic data structures, mathematics, IO, tools, databases, networks and the like. The core library provides an API for the user to develop the android application.
The native C/c++ library may include a plurality of functional modules. For example: surface manager, media frame, libc, openGL ES, SQLite, webkit, etc.
The surface manager is used for managing the display subsystem and providing fusion of 2D and 3D layers for a plurality of application programs. Media frames support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES provides for drawing and manipulation of 2D graphics and 3D graphics in applications. SQLite provides a lightweight relational database for applications of the handset 100.
The hardware abstraction layer runs in a user space (user space), encapsulates the kernel layer driver, and provides a call interface to the upper layer.
The kernel layer is a layer between hardware and software for managing and controlling hardware and software resources. The kernel layer at least comprises a kernel and a memory management module for managing the memory.
The hardware layers may include the processor 110 and memory shown in fig. 2, etc. And when the memory management module determines that the memory usage exceeds the threshold, the memory management module determines cold data according to the LRU algorithm. The RAM compresses and caches the cold data to the UFS. When the cold data cached in the UFS is accessed later, the CPU needs to decompress the cold data from the UFS, and then the decompressed cold data is replaced into the RAM.
Fig. 4 is a flowchart of a method for querying an extended memory life, which is shown in an embodiment of the present application, and specifically illustrates a control method provided in an embodiment of the present application, by taking the electronic device as a mobile phone, the running memory as RAM, and the extended memory as UFS as an example. As shown in fig. 4, the method may include the following steps S401 to S404.
Step S401, after the mobile phone starts the memory expansion function, determining the query frequency of the UFS for the service life according to the use information of the UFS.
In the embodiment of the application, as the mobile phone starts the memory expansion function, the running data corresponding to the application process is stored in the RAM. However, the storage space in the RAM is limited, and when the CPU determines that the remaining storage space of the RAM is less than the memory reclamation threshold, the CPU determines cold data that can be swapped out of the RAM by using the LRU algorithm, and compresses and caches the cold data into the UFS. Then, when the cold data cached in the UFS later is accessed, the CPU needs to decompress the cold data from the UFS and swap the decompressed cold data into the RAM.
Since a user often runs and switches between a plurality of applications during the use of the mobile phone. Furthermore, the mobile phone needs to execute the memory expansion task in real time, namely, to perform the swap-in and swap-out processing on some cold data. Therefore, loss is caused to the UFS, and the mobile phone needs to monitor the service life of the UFS.
In the embodiment of the application, the mobile phone can dynamically set the query frequency of the used life of the UFS according to the use information of the UFS in the process of monitoring the used life of the UFS. The usage information of the UFS includes the used life of the UFS, the consumption rate of the UFS, the cumulative duration of the use of the UFS, the usage scenario of the UFS, and the like.
In order to facilitate management of the query frequency corresponding to the UFS usage information, the mobile phone may store a data storage table in advance in the memory, where the data storage table stores the UFS usage information and the query frequency corresponding to the UFS usage information. The data storage table may include a plurality of data rows and data columns, and the UFS usage information and the query frequency corresponding to the UFS usage information may be presented through the data rows and the data columns. Of course, the mobile phone can also obtain the data storage table from the server, and determine the query frequency of the UFS for the service life according to the data storage table. In the embodiment of the present application, the data storage table is only used as an example, and the storage mode and implementation mode of the UFS use information and the query frequency corresponding to the UFS use information are not limited specifically.
In the embodiment of the present application, referring to fig. 5, after the user starts the mobile phone, the mobile phone kernel starts the init process. The init process may traverse the data storage table to determine the pull-up frequency of the pull-up life management and control service, and then perform the task of querying the UFS for the lifetime. That is, the init process may determine the corresponding query frequency based on the usage information of the UFS. And then the init process pulls up the service life management and control service to execute the inquiry task of the UFS for the service life according to the inquiry frequency. The init process is a user-level process started after the mobile phone is operated; the life management and control service is used for executing the tasks of inquiring the service life of the UFS, evaluating the service life of the UFS, inputting and outputting the memory, managing and controlling the memory expansion process and the like.
The following describes in detail the process of dynamically setting and determining the query frequency of the UFS for the lifetime according to the usage information of the UFS in the embodiment of the present application.
In some embodiments, the usage information of the UFS includes a usage parameter including the usage life of the UFS, or the consumption rate of the UFS, or the cumulative length of time for use of the UFS.
And determining a first query frequency for the UFS for a useful life if the usage parameter is less than or equal to a first threshold; determining a second query frequency of the UFS for which the service life has been extended, if the usage parameter is greater than the first threshold and less than or equal to the second threshold; wherein the second query frequency is greater than the first query frequency.
In one implementation manner, the embodiment of the application can dynamically adjust the query frequency of the used life of the UFS according to the used life corresponding to the current state of the UFS. And along with the gradual increase of the service life of the UFS, the query frequency is gradually increased, and the unit time corresponding to the query frequency is shortened.
Where UFS used lifetime = current P/E number/rated P/E number. Typically, the nominal P/E times of UFSs are fixed, with each UFS corresponding to a fixed nominal P/E times after shipment. Illustratively, the rated P/E number of UFS is 5000 times, and the current P/E number of UFS is 1000 times; then the useful life of the UFS is 20%.
Referring to table 1, UFS has a service life of a% as an example. And gradually increasing the query frequency of the UFS service life along with the gradual increase of the UFS service life, for example, gradually shortening the unit time corresponding to half of the query frequency along with every 10% increase of the UFS service life.
Specifically, when 0<A% is less than or equal to 10%, the query frequency is 1 time/48 hours; when 10% < A% +.20%, the query frequency is 1/24 h; when 20% < A% +.30%, the query frequency is 1/12 h; when 30% < A% +.40%, the query frequency is 1/6 h; when 40% < A% +.50%, the query frequency is 1/3 h; when 50% < A% +.ltoreq.60%, the query frequency is 1 times/1.5 h; when 60% < A% +.ltoreq.70%, the query frequency is 1 time/45 min; when 70% < A% +.80%, the query frequency is 1 times/22.5 min; when 80% < A% +.90%, the query frequency is 1 times/11.25 min; when 90% < a% +.99%, the query frequency is 1/5.625 min.
Illustratively, the first threshold: the service life of the UFS is 10%; a second threshold value: UFS has a useful life of 20%. Based on Table 1, when 0<A% +.10%, the first query frequency is 1/48 h; when 10% < a% +.20%, the second query frequency is 1/24 h; the second query frequency is greater than the first query frequency.
Further, the second query frequency may be generated according to the first ratio. That is, as the lifetime of the UFS increases, the frequency of queries may be increased in a fixed rate.
TABLE 1
| UFS has been used life (A%) | Frequency of inquiry |
| 0<A%≦10% | 1 time/48 h |
| 10%<A%≦20% | 1 time/24 hours |
| 20%<A%≦30% | 1 time/12 hours |
| 30%<A%≦40% | 1 time/6 hours |
| 40%<A%≦50% | 1 time/3 h |
| 50%<A%≦60% | 1 time/1.5 h |
| 60%<A%≦70% | 1 time/45 min |
| 70%<A%≦80% | 1 time/22.5 min |
| 80%<A%≦90% | 1 time/11.25 min |
| 90%<A%≦99% | 1 time/5.625 min |
It can be seen that the embodiments of the present application employ a lower frequency of queries when the UFS has a lower lifetime. And when the service life of the UFS is longer and the service life of the UFS is close to the service life limit, the frequency of inquiring the service life of the UFS can be increased, and further, the dynamic inquiring of the service life of the UFS is realized. Thereby avoiding unnecessary resources wasted by UFS. Meanwhile, the power consumption of the UFS can be reduced, the use efficiency of the CPU is improved, the situation that the whole query process keeps high frequency to query the service life of the UFS can be avoided, and the power consumption of the mobile phone is reduced.
And as the service life of the UFS approaches the service life period, the frequency of inquiring the service life of the UFS is higher and higher, the service life of the UFS can be accurately inquired, and the follow-up termination of the mobile phone to execute the memory expansion task is facilitated. The mobile phone is prevented from still executing the memory expansion task when the service life of the UFS is close to or reaches the life-time limit, and the stable operation of the mobile phone is influenced.
In another implementation manner, based on the foregoing, in the case where the service life of the UFS corresponding to the current state of the UFS is less than or equal to the first threshold, the embodiment of the present application may query the service life of the UFS according to the first query frequency as the service life of the UFS gradually increases. And under the condition that the service life of the UFS is larger than the first threshold value and smaller than or equal to the second threshold value and corresponding to the current state of the UFS, inquiring the service life of the UFS according to the second inquiry frequency along with the gradual increase of the service life of the UFS. Wherein the second query frequency is greater than the first query frequency.
Further, in the embodiment of the present application, when the usage parameter is greater than the second threshold and less than or equal to the memory threshold, a third query frequency for expanding the service life of the memory may be determined; the third query frequency is greater than the second query frequency, the third query frequency is generated by the second query frequency according to a second proportion, and the second proportion is smaller than the first proportion. That is, as the lifetime of the UFS increases, the frequency of queries may be increased in a stepwise manner in accordance with the dynamic scale.
That is, in the case that the lifetime corresponding to the current state of the UFS is greater than the second threshold and the lifetime is close to the lifetime, the lifetime of the UFS is queried according to the third query frequency. The third query frequency is substantially greater than the second query frequency.
See table 2, continuing to exemplify UFS that has a% useful life. The second threshold is 0.7; the memory threshold is 0.99; the first ratio is one half; the second ratio is one third. For example: and along with the gradual rise of the service life of the UFS, under the condition that the service life of the UFS corresponding to the current state of the UFS is less than or equal to 70 percent, gradually shortening the unit time corresponding to the query frequency according to a first proportion, wherein the first proportion is 0.5. That is, as the life of the UFS increases by 10%, the unit time corresponding to half of the query frequency is gradually shortened.
Specifically, when 0<A% is less than or equal to 10%, the query frequency is 1 time/48 hours; when 10% < A% +.20%, the query frequency is 1/24 h; when 20% < A% +.30%, the query frequency is 1/12 h; when 30% < A% +.40%, the query frequency is 1/6 h; when 40% < A% +.50%, the query frequency is 1/3 h; when 50% < A% +.ltoreq.60%, the query frequency is 1 times/1.5 h; when 60% < a% +.70%, the query frequency is 1/0.75 h.
And with the gradual rise of the service life of the UFS, under the condition that the service life of the UFS corresponding to the current state of the UFS is more than 70% and less than or equal to 99%, the unit time corresponding to the query frequency is gradually shortened according to a second proportion. That is, as the service life of the UFS increases by 10%, the unit time corresponding to one third of the query frequency is gradually shortened.
For example, when 70% < a% +.80%, the query frequency is 1/15 min; when 80% < A% +.90%, the query frequency is 1/5 min; when 90% < a% +.99%, the query frequency is 1/100 s.
It will be appreciated that the examples herein are illustrated only by the numerical values identified in tables 1 and 2, and are not intended to limit the embodiments and contents of dynamically adjusting the query frequency; for example, the first query frequency, the second query frequency, the third query frequency, the first threshold, the second threshold, and the memory threshold may be adjusted according to the specific usage scenario.
TABLE 2
| UFS has been used life (A%) | Frequency of inquiry |
| 0<A%≦10% | 1 time/48 h |
| 10%<A%≦20% | 1 time/24 hours |
| 20%<A%≦30% | 1 time/12 hours |
| 30%<A%≦40% | 1 time/6 hours |
| 40%<A%≦50% | 1 time/3 h |
| 50%<A%≦60% | 1 time/1.5 h |
| 60%<A%≦70% | 1 time/0.75 h |
| 70%<A%≦80% | 1 time/15 min |
| 80%<A%≦90% | 1 time/5 min |
| 90%<A%≦99% | 1 time/100 s |
The embodiment of the application can dynamically set the frequency of inquiring the service life of the UFS according to the consumption rate of the user to the UFS in the latest first period T. The consumption rate of the UFS is used to characterize the user's usage strength of the UFS during the most recent first period. If the greater the user's usage strength of the UFS during the most recent first period, the higher the consumption rate of the UFS is, and thus the higher the frequency of querying for the lifetime of the UFS is. Where the consumption rate of UFS = the lifetime of UFS/first period T.
In one implementation, as the consumption rate of the UFS by the user increases in the last first period T, the unit time corresponding to the query frequency is gradually shortened.
For example, the first period T is 3 months; during the first 3 months, queries can be performed with a fixed and lower frequency, such as every 1/48 h. The user uses the mobile phone for 3 months, the rated P/E times of the UFS are 5000 times, and the current P/E times of the UFS are 500 times; then the UFS has a lifetime of 10% and a UFS consumption rate B%/t=3.3%/month, with a query frequency of 1/12 h.
For another example, the user uses a 6 month cell phone, and the rated P/E number of UFS is 5000 times and the current P/E number of UFS is 1500 times in the last 3 months; then the UFS has a lifetime of 30% and a UFS consumption rate B%/t=10%/month, with a query frequency of 1/3 h.
For another example, the user uses a 12 month cell phone, and the rated P/E number of UFS is 5000 times and the current P/E number of UFS is 2500 times in the last 3 months; the UFS has a lifetime of 50% and a UFS consumption rate B%/t=16.6%/month, with a query frequency of 1/1.5 h. It is understood that the first period may also be one day, one week, one month, etc., which is not specifically limited in the embodiments of the present application.
TABLE 3 Table 3
| UFS consumption rate (B%/T) | Frequency of inquiry |
| 0<B% +.ltoreq.2%/month | 1 time/24 hours |
| 2%/month<B% +.ltoreq.5%/month | 1 time/12 hours |
| 5%/month<B% +.ltoreq.10%/month | 1 time/3 h |
| 10%/month<B% +.ltoreq.30%/month | 1 time/1.5 h |
| 30%/month<B% +.ltoreq.50%/month | 1 time/40 min |
| 50%/month<B% +.ltoreq.70%/month | 1 time/18 min |
| 70%/month<B% +.ltoreq.99%/month | 1 time/10 min |
| 100%/month | 1 time/5 min |
It can be seen that the rate of consumption of UFS increases, indicating that the lifetime of UFS is also gradually increasing. Since each user has different habits of using the mobile phone, i.e., the consumption rate of the corresponding UFS will also be different. Therefore, the embodiment of the application sets the dynamic query frequency aiming at the consumption rate of different UFS, and can carry out different dynamic queries aiming at different users. For example, if the user a has a strong use strength of the mobile phone, the UFS is frequently queried for the service life of the UFS. If the use strength of the mobile phone by the user B is small, the user B does not need to frequently inquire about the service life of the UFS. And the more humanized configuration inquires the process of the service life of the UFS, reduces the use power consumption of the UFS and the resource consumption of the mobile phone electric quantity and the like, and improves the use experience of users.
In the implementation of the application, if the use accumulation duration of the UFS is shorter, this indicates that the UFS has a lower service life, and is not easy to approach the lifetime, and a lower query frequency may be set. If the cumulative duration of the UFS is higher, indicating that the UFS has a longer service life, the lifetime is easy to approach, and a higher query frequency can be set. Therefore, the embodiment of the application can dynamically set the frequency of inquiring the service life of the UFS according to the use accumulated time of the UFS. The UFS use accumulated time length comprises the use accumulated time length of activating the mobile phone, or the starting accumulated time length of the mobile phone, or the bright screen accumulated time length of the mobile phone. Activating the use accumulated time length of the mobile phone, namely the accumulated time length of the mobile phone used by a user after the mobile phone leaves a factory; the starting-up accumulated time length of the mobile phone refers to the accumulated time length of the actual normal operation of the mobile phone.
In one implementation, as the cumulative length of time the user uses for the UFS increases, the unit time corresponding to the query frequency is gradually shortened.
Illustratively, referring to table 4, UFS use cumulative length C is taken as an example. When C is 0< or less than 6 months, the query frequency is 1 time/24 hours; when 6<C is less than or equal to 12 months, the query frequency is 1 time/12 hours; when C is 12< 18 months, the query frequency is 1/3 h; when 18< C is less than or equal to 24 months, the query frequency is 1 time/1.5 hours; when C is 24< 30 months, the query frequency is 1 time/55 min; when 30< C +.36 months, the query frequency is 1/20 min.
TABLE 4 Table 4
| UFS uses accumulated time length (C) | Frequency of inquiry |
| 0<C is less than or equal to 6 months | 1 time/24 hours |
| 6<C is less than or equal to 12 months | 1 time/12 hours |
| 12<C is less than or equal to 18 months | 1 time/3 h |
| 18<C is less than or equal to 24 months | 1 time/1.5 h |
| 24<C is less than or equal to 30 months | 1 time/45 min |
| 30<C is less than or equal to 36 months | 1 time/20 min |
| … | 1 time/10 min |
Therefore, when the cumulative duration of the UFS use is low, the use life of the UFS can be queried with a low query frequency. And along with the increase of the use accumulated time length of the UFS, the query frequency of the UFS for the service life can be improved. Thus, the UFS is not required to be frequently inquired for the service life by adopting fixed and higher inquiry frequency in the whole process. The power consumption of the extended memory is reduced, the waste of various resources in the mobile phone is avoided, and the use experience of the user is improved.
In the embodiment of the application, when the mobile phone is in the bright screen scene state, the user can operate the application program in the mobile phone. The higher the UFS lifetime will be if the user frequently operates the application. And further, a lower query frequency is required in the off-screen scene, and a higher query frequency is required in the on-screen scene. Therefore, the embodiment of the application can dynamically set the frequency of inquiring the service life of the UFS according to the use scene of the UFS. The use scene of the UFS comprises a bright screen scene and an off-screen scene.
In one implementation, a fourth frequency of queries for UFS lifetime is determined when a field Jing Chuyu of use of the UFS is on-screen. And when the use scene of the UFS is in the off-screen scene, determining a fifth query frequency of the service life of the UFS. Wherein the fourth query frequency is greater than the fifth query frequency.
For example, referring to table 5, the frequency of querying UFS for the lifetime of the UFS is 1/1 h when the field Jing Chuyu of use of the UFS is on a bright screen scene. When the use scene of the UFS is in the off-screen scene, the frequency of inquiring the service life of the UFS is 1 time/10 hours. That is, in a bright screen scenario corresponding to the UFS, which is a mobile phone, the user uses many functions in the mobile phone, for example, running a plurality of applications, switching between a plurality of applications, and the like. At this time, the number of P/E times of the UFS is greatly increased. Thus, it is desirable to query UFS for the useful life of the UFS with a higher frequency. And under the screen-off scene corresponding to the mobile phone, namely the UFS, the P/E times of the UFS can not be greatly increased. Furthermore, the UFS life time is only required to be queried with lower frequency.
TABLE 5
| Scene(s) | Frequency of inquiry |
| Light screen scene | 1 time/1 h |
| Screen-off scene | 1 time/10 hours |
In summary, according to the embodiment of the application, the query frequency of the UFS service life is dynamically adjusted through the use information of the UFS under different states. And then, the mobile phone determines the corresponding query frequency according to the use information of the UFS. And further executing the subsequent process of dynamically querying the UFS for the lifetime. Therefore, by dynamically executing the query process, the power consumption of the expansion memory and the mobile phone can be reduced, and the resources of the CPU can be saved. And when the service life of the UFS is close to the service life limit, the inquiry frequency is increased, whether the service life of the UFS reaches the service life limit can be accurately determined, and the running stability of the mobile phone is ensured.
In some embodiments of the present application, the life span of the UFS, i.e. the nominal P/E times, is fixed, but the life span of different UFSs may differ. Illustratively, UFS produced by different manufacturers have different corresponding life spans. For example, the rated P/E number of UFS may be 4000 times, 5000 times, 6000 times, etc.
The embodiment of the application can also determine the query frequency of the service life of the extended memory according to the service life of the extended memory and the service information of the extended memory; wherein, the query frequency is inversely related to the lifetime of the extended memory. That is, for UFSs with different life spans, dynamic adjustments are made during queries that the UFS has been for life. UFS with a short life span are more likely to reach life span. Further, for UFS with a short lifetime, more query frequencies are required. And for UFS with long life span, a lower frequency of queries is required. Whether for UFS with a short lifetime or UFS with a long lifetime, the corresponding query frequency may be determined according to the usage information of the UFS. However, under the condition that the usage information of the UFS is the same (for example, the current P/E times are the same), the query frequency corresponding to the UFS with a short lifetime is higher than the query frequency corresponding to the UFS with a long lifetime.
For example, UFS2 has a life span longer than UFS 1. Taking the percentage of the service life of UFS1 as C% as an example, when the percentage of the service life of UFS1 is 50< C% +.ltoreq.60%, the query frequency is 1 times/1.5 h; when 60% < C% +.ltoreq.65%, the query frequency is 1 time/1 h; when 65% < C% +.70%, the query frequency is 1/0.75 h. Take as an example the percentage of the useful life of UFS2 that is D%. When 50< D% +.ltoreq.70%, the query frequency is 1/1.5 h.
And if the current P/E times corresponding to the UFS1 and the UFS2 are 2000 times. The life span of the UFS1 is 4000 times, and the life span of the UFS2 is 6000 times; then UFS1 has a lifetime of 50% and a query frequency of 1/1 h. UFS2 has a life of 33.3% and a query frequency of 1/3 h.
It can be seen that, under the same number of P/E, the frequency of queries corresponding to UFS with a short lifetime is greater than the frequency of queries corresponding to UFS with a long lifetime. Therefore, by setting different dynamic query frequencies for the UFS with different life spans, the power consumption of the UFS and the electronic device can be reduced without keeping the fixed and high frequency in the whole query process. And accurately inquires that the UFS reaches the life cycle, and improves the running stability of the mobile phone.
Step S402, the mobile phone inquires the service life of the UFS according to the inquiry frequency.
In the embodiment of the application, after the init process determines the query frequency, the service for managing and controlling the service of pulling the service life according to the determined query frequency executes the task of querying the service life of the UFS. The service life management and control service can directly call a standard protocol interface corresponding to the UFS to obtain the service life of the UFS. It should be noted that the electronic device in the embodiment of the present application may also query the UFS for the service life in other manners, such as an alarm clock function (alarm), which is not limited.
For example, UFS has a useful life (a%) of 15%; according to table 1, when 10% < a% +.20%, the query frequency was determined to be 1/24 h. Then the init process pulls up the life management service every 1/24 h to have the life management service perform the task of querying the UFS for the lifetime already in use.
For another example, the user has used a 6 month cell phone, with a UFS lifetime of 30%; according to table 3, when the consumption rate of ufs=10%/month, the query frequency was determined to be 1/3 h. Then the init process pulls up the life management service every 1/3 h to have the life management service perform the task of querying the UFS for the lifetime already in use.
For another example, the user has used a 12 month cell phone; according to table 4, when the UFS use cumulative length is 12 months, the query frequency is determined to be 1/12 h. Then the init process pulls up the life management service every 1/12 h to have the life management service perform the task of querying the UFS for the lifetime already in use.
In other embodiments of the present application, after querying the UFS for the service life task, the mobile phone may periodically output a prompt message to prompt the user that the UFS has been used for the service life. Or, the mobile phone can also output prompt information when the service life of the UFS is inquired to reach the prompt threshold; for example, UFS has a service life of 10%, 20%, 30%, 40%, etc., and outputs a prompt message. Or, the mobile phone can respond to the query operation input by the user and output prompt information; the prompt message is used for indicating the service life of the extended memory. For example, the query operation includes a click operation by the user on a lifetime query control.
For example, referring to (a) of fig. 7, a setting application icon is displayed on a home screen interface of the mobile phone, and the user may click on the setting application icon, as shown in (B) of fig. 7, the mobile phone displays a user interface of the setting application in response to a click operation of the setting application icon by the user. Wherein a list of all functions installed in the handset is displayed in the setup application. The user may click on the memory expansion function in the list to trigger entry into the property page corresponding to the memory expansion function. As shown in fig. 7 (C), the mobile phone displays an attribute page corresponding to the memory expansion function, where the attribute page corresponding to the memory expansion function includes a function switch control and a lifetime query control. The user can click on the function switch control to control whether the mobile phone executes the memory expansion function. The user may also click on a lifetime query control to query the lifetime of the memory device, i.e., the UFS. As shown in (D) of fig. 7, the mobile phone responds to the click operation of the user on the lifetime inquiry control, and displays a detail page corresponding to the lifetime inquiry control; the detail page comprises a display control 701 corresponding to the service life, wherein the display control 701 is used for displaying prompt information to prompt a user that the current UFS has the service life.
It can be appreciated that in the process of responding to the clicking operation of the user on the life inquiry control by the mobile phone, the init process can pull up the life management and control service, and trigger the life management and control service to execute the task of inquiring the service life of the UFS. Or, the init process pulls up the service life management and control service each time, and after the service life management and control service finishes the query task, the service life of the UFS is cached in the memory. And directly acquiring and displaying the service life of the UFS from the memory when the mobile phone responds to the clicking operation of the service life inquiry control by the user.
Therefore, the embodiment of the application can provide the user with humanized functions such as opening and closing of the memory expansion function and inquiring of the service life of the memory device, so that the interactivity between the user and the mobile phone is improved, and the use experience of the user is improved.
Step S403, the mobile phone determines whether the query result is greater than a memory threshold; if yes, go to step S404; otherwise, step S401 is performed.
Step S404, the mobile phone closes the memory expansion function.
In this embodiment of the present application, as the lifetime of the UFS has increased, the memory expansion function is turned off when the lifetime of the UFS is greater than the memory threshold.
In some embodiments, referring to fig. 6, the init process queries the UFS for the lifetime after pulling the lifetime-controlling service according to the query frequency in the data storage table, and generates a query result; the query results include UFS already life (%). The life management and control service compares the life management and control service with the memory threshold based on the service life of the UFS, and the life management and control service terminates the corresponding task executed by the UFS under the condition that the service life of the UFS is longer than the memory threshold.
Illustratively, the memory threshold may be 0.8; under the condition that the service life of the UFS is longer than 80%, the service life management and control service directly closes an ESWAP swap-out interface of the UFS, and further terminates the memory expansion task executed by the UFS. It may be appreciated that the embodiments of the present application do not limit specific values corresponding to the memory threshold.
In other embodiments, after determining that the query result is less than or equal to the memory threshold, the mobile phone continues to determine the query frequency of the UFS for which the UFS has a service life according to the usage information of the UFS.
In one implementation, the lifetime management service compares the lifetime management service with the memory threshold based on the lifetime of the UFS, and if the lifetime of the UFS is less than or equal to the memory threshold, the lifetime management service allows the UFS to perform a corresponding task and needs to continue to perform the task of querying the lifetime of the UFS.
Illustratively, the memory threshold may be 0.8; in the event that the UFS has a useful life of less than or equal to 80%, the life management service allows the UFS to perform memory expansion tasks. And then, the init process suicide out the service life management and control service, acquires the use information of the UFS, determines the query frequency of the UFS for the service life, and facilitates the follow-up pulling up of the service life management and control service according to the query frequency.
Therefore, the embodiment of the application can timely inquire that the service life of the UFS is longer than the memory threshold value, and close the memory expansion function; and the situation that data are lost when the corresponding task is continuously executed after the service life of the UFS is longer than the memory threshold value is avoided. Meanwhile, the UFS has the effect on the realization of the memory expansion function when the service life is close to the service life. The stable operation of the mobile phone is ensured, and the use experience of a user is improved.
In some embodiments, after determining that the query result is less than or equal to the memory threshold, the method for reducing power consumption of the extended memory provided in the embodiments of the present application further includes an optional step S501, see fig. 8, which is specifically as follows:
step S501, the mobile phone determines whether the user transfer amount is greater than a dump threshold; if yes, execute optional step S502; otherwise, an optional step S503 is performed.
In optional step S502, the mobile phone turns off the memory expansion function for a preset duration or limits the user transfer volume to be smaller than the limit threshold.
In the embodiment of the application, when the service life of the UFS is less than or equal to the memory threshold and the user transfer volume is greater than the dump threshold, the memory expansion function is turned off for a preset period of time or the user transfer volume is limited to be less than the limit threshold; wherein the limit threshold is less than the dump threshold.
That is, after determining that the query result is less than or equal to the memory threshold, the mobile phone may obtain the user transfer amount corresponding to the second period; the user transfer volume corresponding to the second period refers to the data volume of running memory dump in the mobile phone in a certain time. The dumping is to dump the data in the running memory to the UFS when the mobile phone starts the memory expansion function.
Generally, due to the limitation of the running memory capacity, when the running memory capacity reaches the limitation capacity, the new running memory allocation request is satisfied by reclaiming the part of the occupied running memory space. The objects running memory reclamation are mainly divided into file pages and anonymous pages. Anonymous pages refer to pages without file background, such as stacks, and data segments, etc.
Illustratively, the second period may be 24 hours and the dump threshold may be a limited number of pages, such as 500, of file pages and/or anonymous pages. The life management service may take the corresponding user transfer amount, e.g., 200, over 24 hours and compare it to a dump threshold, e.g., 500.
Under the condition that the user transfer volume is larger than the dump threshold, indicating that the data volume of memory dump in the mobile phone exceeds the limit number of pages within a certain time, namely the dump data volume is over-limited; at this time, if the data volume of the memory dump in the mobile phone continues to be greatly increased, the stable operation of the mobile phone will be affected.
Thus, in the event that the user transfer volume is greater than the dump threshold, the life management service may temporarily shut down the memory expansion function or limit the dump data volume. The lifetime management service may mitigate the large increase in dump data volume in two ways. For example, the lifetime management service may temporarily shut down the memory expansion function, i.e., terminate the process of memory dump in the handset. It can be understood that the lifetime management service may set a preset duration, such as 10 minutes, for terminating the memory dump in the mobile phone, and after 10 minutes, the lifetime management service may automatically resume the memory dump process.
Alternatively, the life management service may also limit the amount of dump data, such as limiting the user's amount of transfers to less than a limiting threshold. That is, after the user transfer amount is greater than the dump threshold, the life management and control service may control the memory dump process to have the user transfer amount less than the limit threshold for a certain period of time. Wherein the limit threshold is less than the dump threshold, the limit threshold may be 300. It will be appreciated that the life management service may limit the user's turn stock to less than 300 for a period of time, after which the limit is released.
Therefore, the embodiment of the application can control the data quantity in the memory dump process by utilizing the dump threshold on the basis that the service life of the UFS is smaller than or equal to the memory threshold. And the excessive consumption of UFS in the memory dump process of the mobile phone is avoided, and the operation stability of the mobile phone is influenced.
Step S503 is optional, the mobile phone judges whether to determine the first overrun of the UFS based on the preset duration; if yes, execute optional step S504; otherwise, step S401 is performed.
In the embodiment of the application, the query frequency of the service life of the UFS is determined only according to the use information of the UFS. The overrun may also be combined. The overrun is used for representing the degree of difference between the times that the user transfer volume is larger than the dump threshold value and the rated overrun times in a certain time. By combining the overrun and the use information of the UFS, the query frequency of the service life of the UFS can be determined according to two conditions, and the actual use condition of the UFS can be more similar. When the overrun is higher, the service life of the UFS is gradually prolonged, and a higher query frequency can be adopted. When overrun is low, a lower query frequency may be employed.
Optionally, step S504, the mobile phone determines a first overrun of the UFS.
In the embodiment of the application, if the open time of the memory expansion function is longer than or equal to the preset duration, determining a first overrun of the expansion memory in a first duration after the current time when the service life of the UFS is less than or equal to a memory threshold and the user transfer capacity is less than or equal to a dump threshold; the first overrun is used for representing the degree of difference between the number of times the user's transfer volume is greater than the dump threshold value and the rated overrun number of times in the first duration.
That is, the mobile phone may continue to turn on the memory expansion function if the user transfer amount is less than or equal to the dump threshold. And the lifetime-management service may trigger execution of the task of determining the first overrun within a preset time period. That is, even if the UFS has not reached the memory threshold for the lifetime, the user transfer volume does not reach the dump threshold, and the lifetime management service may periodically obtain the first overrun, so as to facilitate a more timely and accurate subsequent query of the lifetime of the UFS.
Wherein, the first overrun = dump overrun/rated overrun; the dump overrun is used for representing the times that the user transfer volume is larger than the dump threshold in the first time period, and the rated overrun is used for representing the maximum value of the times that the user transfer volume is larger than the dump threshold in the first time period. It can be appreciated that when the first overrun increases substantially, the usage of the UFS for dumping during the first period of time is indicated to be more frequent, and further the lifetime of the UFS is indicated to also increase substantially. In the aspect of the user, the number of application programs in the mobile phone used by the user is larger. Furthermore, the first overrun is determined by the life management and control service, and the init process can dynamically adjust the subsequent life management and control service and inquire about the service life of the UFS according to the first overrun.
For example, the preset duration may be one month, and the lifetime management service may start determining the first overrun when the on time of the memory expansion function is greater than or equal to one month. When determining the first overrun rate, the service for managing and controlling the service for the service life can acquire the dump overrun times in the first time after the current time; for example, within a first period of time of 1h, the dump overrun number is 2, the rated overrun number is 40, and the accumulated transfer volume is 60; the overrun is 5% and the average reserves is 60.
In some embodiments, the lifetime management service may determine a first overrun of the extended memory within a first time period after the current time when the time period from the last query of the UFS for the lifetime is greater than or equal to a preset time period.
After the life management service determines that the first overrun is complete, the init process kills the life management service and pulls up the life management service.
In one implementation, the init process may continue to repeatedly perform the above-described process of determining the query frequency of step S401 to achieve a pull-up of the lifetime-management service. And will not be described in detail herein.
In another implementation, the init process may also employ a fixed and high frequency execution of subsequent pull-up life management services.
Illustratively, when the first overrun increases substantially, it is indicated that the UFS is used more frequently during dump evaluation, and the UFS lifetime has also increased substantially. And furthermore, the init process can pull up the service life management and control service by adopting higher query frequency and query the service life of the UFS, so that the follow-up more timely and accurate determination of whether the service life of the UFS is greater than a memory threshold value is facilitated, and the stable operation of the mobile phone is ensured.
In another implementation, referring to fig. 9, the init process may also determine the query frequency for the UFS that has been in service life based on the first overrun of the UFS and the usage information of the UFS. And further, executing the subsequent tasks such as comparing the memory threshold value according to the query result.
By way of example, the embodiments of the present application may further configure a dynamic data storage table corresponding to the query frequency in combination with the first overrun and the usage information of the UFS. Referring to table 6, continue to take UFS with a useful life of a% and an overrun of M% as an example. Along with the gradual increase of the service life of the UFS and the gradual increase of the overrun, the unit time corresponding to the query frequency is gradually shortened. That is, as the life of the UFS increases gradually, and the overrun increases gradually, the life of the UFS increases continuously; whereby it is necessary to query UFS for the lifetime more frequently. In this way, the init process can determine the query frequency according to the overrun and the use information of the UFS, so that the follow-up query task can be dynamically executed according to the query frequency.
TABLE 6
In other embodiments of the present application, if the lifetime of the UFS is less than or equal to the memory threshold and the user transfer capacity is less than or equal to the dump threshold, if the on duration of the memory expansion function is less than the preset duration, determining a second overrun of the UFS in a second duration before the current time; the second overrun is used for indicating the degree of difference between the times that the user transfer volume is larger than the dump threshold value and the rated overrun times in the second duration.
In some embodiments, the lifetime management service may determine a second overrun of the UFS within a second time period before the current time when a time period since a last query of the UFS for a lifetime is less than a preset time period.
That is, when the lifetime management service has the on duration of the memory expansion function less than 1 month, the first overrun is not determined. But a second overrun of a second duration, such as the second overrun of the last 1 week, before the current time is obtained. And then, the init process can also determine the query frequency of the service life of the UFS according to the second overrun of the UFS and the use information of the UFS. Alternatively, the init process may continue to repeatedly perform the above-described process of determining the query frequency of step S401 to achieve a pull-up of the lifetime-management service. The specific implementation manner may refer to the content in the foregoing embodiment, and will not be described herein.
It can be seen that, in the embodiment of the present application, the query frequency may be determined not only according to the use information of the UFS, but also according to the combination of the first overrun/the second overrun and the use information of the UFS. By introducing the basis of overrun, the periodical use degree and the historical use information of the UFS are combined, so that the query frequency of the UFS for the service life is more accurate and reasonable. When the UFS is strong in use degree, the greater query frequency is accurately adopted, so that the time that the service life of the UFS is longer than the memory threshold value can be accurately determined, and the memory expansion function can be smoothly and timely closed. The stable operation of the mobile phone is ensured, the power consumption of the memory and the whole mobile phone is reduced, and the use experience of a user is improved.
In some aspects, various embodiments of the present application may be combined and the combined aspects implemented. Optionally, some operations in the flow of method embodiments are optionally combined, and/or the order of some operations is optionally changed. The order of execution of the steps in each flow is merely exemplary, and is not limited to the order of execution of the steps, and other orders of execution may be used between the steps. And is not intended to suggest that the order of execution is the only order in which the operations may be performed. Those of ordinary skill in the art will recognize a variety of ways to reorder the operations described in the embodiments of the present application. In addition, it should be noted that details of processes involved in a certain embodiment of the present application are equally applicable to other embodiments in a similar manner, or may be used in combination between different embodiments.
Moreover, some steps in method embodiments may be equivalently replaced with other possible steps. Alternatively, some steps in method embodiments may be optional and may be deleted in some usage scenarios. Alternatively, other possible steps may be added to the method embodiments.
Further embodiments of the present application provide an electronic device, see fig. 10, comprising: memory 1020 and one or more processors 1010 and a communication interface 1030.
Wherein the memory 1020, communication interface 1030, and processor 1010 are coupled. For example, the memory 1020, communication interface 1030, and processor 1010 may be coupled together by a bus 1040. The memory also has stored therein computer program code comprising computer instructions. The electronic device, when executed by the processor, can perform the various functions or steps performed by the handset 100 in the method embodiments described above. The structure of the electronic device may refer to the structure of the mobile phone 100 shown in fig. 2.
Embodiments of the present application also provide a chip system including at least one processor and at least one interface circuit. The processors and interface circuits may be interconnected by wires. For example, the interface circuit may be used to receive signals from other devices (e.g., a memory of an electronic apparatus). For another example, the interface circuit may be used to send signals to other devices (e.g., processors). The interface circuit may, for example, read instructions stored in the memory and send the instructions to the processor. The instructions, when executed by a processor, may cause an electronic device to perform the various steps of the embodiments described above. Of course, the chip system may also include other discrete devices, which are not specifically limited in this embodiment of the present application.
The embodiment of the application also provides a computer readable storage medium, which comprises computer instructions, when the computer instructions are run on the electronic device, the electronic device is caused to execute the functions or steps executed by the mobile phone in the embodiment of the method.
The present application also provides a computer program product, which when run on a computer, causes the computer to perform the functions or steps performed by the mobile phone in the above-mentioned method embodiments.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211571442.2A CN116700602B (en) | 2022-12-08 | 2022-12-08 | Method and equipment for inquiring and expanding service life of memory |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211571442.2A CN116700602B (en) | 2022-12-08 | 2022-12-08 | Method and equipment for inquiring and expanding service life of memory |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116700602A CN116700602A (en) | 2023-09-05 |
| CN116700602B true CN116700602B (en) | 2024-04-12 |
Family
ID=87836282
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211571442.2A Active CN116700602B (en) | 2022-12-08 | 2022-12-08 | Method and equipment for inquiring and expanding service life of memory |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116700602B (en) |
Citations (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004348332A (en) * | 2003-05-21 | 2004-12-09 | Matsushita Electric Ind Co Ltd | Computer device, component mounting device provided with the computer device, storage device life diagnosis method, and hard disk drive unit life diagnosis program |
| US7356442B1 (en) * | 2006-10-05 | 2008-04-08 | International Business Machines Corporation | End of life prediction of flash memory |
| JP2013182378A (en) * | 2012-03-01 | 2013-09-12 | Denso Corp | Non-volatile memory data storage method |
| CN108776630A (en) * | 2018-06-01 | 2018-11-09 | 合肥联宝信息技术有限公司 | A kind of method, apparatus and storage medium for detecting hard disk |
| CN109799955A (en) * | 2018-12-24 | 2019-05-24 | 郑州云海信息技术有限公司 | A kind of server solid state hard disk storage method and device |
| CN110007857A (en) * | 2019-03-08 | 2019-07-12 | 北京星网锐捷网络技术有限公司 | A kind of life-span prediction method and device of flash chip |
| CN112083873A (en) * | 2019-06-14 | 2020-12-15 | 北京忆芯科技有限公司 | Method and device for intelligently identifying unreliable blocks of non-volatile storage media |
| CN113467703A (en) * | 2020-03-31 | 2021-10-01 | 杭州海康存储科技有限公司 | Storage medium management method, device and equipment |
| CN114095351A (en) * | 2020-08-05 | 2022-02-25 | 青岛海尔智能家电科技有限公司 | Method, device and system for configuring device functions |
| WO2022127944A2 (en) * | 2022-03-24 | 2022-06-23 | 苏州佳世达电通有限公司 | Monitoring method and apparatus for electronic device, and electronic device |
| CN114691946A (en) * | 2020-12-31 | 2022-07-01 | 华为技术有限公司 | Data query method and electronic equipment |
| CN115079957A (en) * | 2022-07-20 | 2022-09-20 | 阿里巴巴(中国)有限公司 | Request processing method, device, controller, equipment and storage medium |
| CN115328656A (en) * | 2022-08-16 | 2022-11-11 | 深圳市欧瑞博科技股份有限公司 | Dynamic memory intelligent expansion method, device, equipment and storage medium |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011164994A (en) * | 2010-02-10 | 2011-08-25 | Toshiba Corp | Memory system |
| US8818989B2 (en) * | 2010-11-30 | 2014-08-26 | International Business Machines Corporation | Memory usage query governor |
| US8583608B2 (en) * | 2010-12-08 | 2013-11-12 | International Business Machines Corporation | Maximum allowable runtime query governor |
| US20130262942A1 (en) * | 2012-03-27 | 2013-10-03 | Yung-Chiang Chu | Flash memory lifetime evaluation method |
| KR102100458B1 (en) * | 2013-04-19 | 2020-04-13 | 삼성전자주식회사 | Method for managing memory and an electronic device thereof |
| US10282105B2 (en) * | 2017-01-20 | 2019-05-07 | International Business Machines Corporation | Extending shelf life of non-volatile memory devices |
| KR102485694B1 (en) * | 2018-02-09 | 2023-01-09 | 에스케이하이닉스 주식회사 | Memory system and operating method of memory system |
| US20220335047A1 (en) * | 2021-04-16 | 2022-10-20 | Microsoft Technology Licensing, Llc | System and method for dynamic memory allocation for query execution |
-
2022
- 2022-12-08 CN CN202211571442.2A patent/CN116700602B/en active Active
Patent Citations (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004348332A (en) * | 2003-05-21 | 2004-12-09 | Matsushita Electric Ind Co Ltd | Computer device, component mounting device provided with the computer device, storage device life diagnosis method, and hard disk drive unit life diagnosis program |
| US7356442B1 (en) * | 2006-10-05 | 2008-04-08 | International Business Machines Corporation | End of life prediction of flash memory |
| JP2013182378A (en) * | 2012-03-01 | 2013-09-12 | Denso Corp | Non-volatile memory data storage method |
| CN108776630A (en) * | 2018-06-01 | 2018-11-09 | 合肥联宝信息技术有限公司 | A kind of method, apparatus and storage medium for detecting hard disk |
| CN109799955A (en) * | 2018-12-24 | 2019-05-24 | 郑州云海信息技术有限公司 | A kind of server solid state hard disk storage method and device |
| CN110007857A (en) * | 2019-03-08 | 2019-07-12 | 北京星网锐捷网络技术有限公司 | A kind of life-span prediction method and device of flash chip |
| CN112083873A (en) * | 2019-06-14 | 2020-12-15 | 北京忆芯科技有限公司 | Method and device for intelligently identifying unreliable blocks of non-volatile storage media |
| CN113467703A (en) * | 2020-03-31 | 2021-10-01 | 杭州海康存储科技有限公司 | Storage medium management method, device and equipment |
| CN114095351A (en) * | 2020-08-05 | 2022-02-25 | 青岛海尔智能家电科技有限公司 | Method, device and system for configuring device functions |
| CN114691946A (en) * | 2020-12-31 | 2022-07-01 | 华为技术有限公司 | Data query method and electronic equipment |
| WO2022127944A2 (en) * | 2022-03-24 | 2022-06-23 | 苏州佳世达电通有限公司 | Monitoring method and apparatus for electronic device, and electronic device |
| CN115079957A (en) * | 2022-07-20 | 2022-09-20 | 阿里巴巴(中国)有限公司 | Request processing method, device, controller, equipment and storage medium |
| CN115328656A (en) * | 2022-08-16 | 2022-11-11 | 深圳市欧瑞博科技股份有限公司 | Dynamic memory intelligent expansion method, device, equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116700602A (en) | 2023-09-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP4145286B1 (en) | Memory management method and electronic device | |
| CN116244067B (en) | Virtual memory management method and electronic equipment | |
| JP7635859B2 (en) | Method and electronic device for performing drawing operations by an application | |
| KR20150066083A (en) | Multi tasking method of electronic apparatus and electronic apparatus thereof | |
| CN112835610B (en) | Method and device for constructing application resource package and terminal equipment | |
| US10432926B2 (en) | Method for transmitting contents and electronic device thereof | |
| CN115981830A (en) | Task management method and device | |
| CN116700602B (en) | Method and equipment for inquiring and expanding service life of memory | |
| CN117707718B (en) | Process management method, electronic device and readable storage medium | |
| CN113760192B (en) | Data reading method, data reading apparatus, storage medium, and program product | |
| CN117254539A (en) | Charging methods and electronic equipment | |
| WO2022179283A1 (en) | Push message sending method, electronic device, and readable medium | |
| CN117729561B (en) | System upgrade method, terminal and storage medium | |
| CN117707719B (en) | Process management method, electronic device and readable storage medium | |
| CN118069154B (en) | Application compilation control method and related equipment | |
| CN116089320B (en) | Garbage recycling method and related device | |
| CN119271575B (en) | Pre-reading method and electronic device | |
| CN117009023B (en) | Method for displaying notification information and related device | |
| CN119011601B (en) | Data synchronization methods, electronic devices and systems | |
| CN119829225A (en) | Thread scheduling method and related device | |
| WO2024093431A1 (en) | Image drawing method and electronic device | |
| CN118283026A (en) | File transmission method and electronic device | |
| CN119718702A (en) | System service management method and electronic equipment | |
| WO2024032430A1 (en) | Memory management method and electronic device | |
| WO2024022119A1 (en) | Data synchronization method, electronic device and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |
|
| CP03 | Change of name, title or address |