Information processing method and electronic device
By using a combination of a first non-volatile memory cell and a second non-volatile memory cell in electronic devices, the problem of power consumption caused by continuous power supply in standby mode is solved, achieving the effects of energy saving and extending standby time.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LENOVO (BEIJING) LTD
- Filing Date
- 2014-01-27
- Publication Date
- 2026-06-02
Smart Images

Figure CN108052197B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic technology, and more particularly to an information processing method and an electronic device. Background Technology
[0002] With the continuous development of science and technology, electronic technology has also developed rapidly, and the variety of electronic products has increased dramatically. People have enjoyed the various conveniences brought about by technological advancements. Now, people can enjoy a comfortable life through various types of electronic devices. For example, smartphones, tablets, and laptops have become an important part of people's lives. Users can use smartphones, tablets, and laptops to listen to music, play games, and so on, to alleviate the pressure brought about by the fast pace of modern life.
[0003] Taking laptops as an example, in order to save laptop power consumption, the Advanced Configuration and Power Interface (ACPI) specification defines several states of laptops, such as normal working state (also known as S0 state), standby state (also known as S3 state, or memory-connected state), etc. In standby state, the system stores the working state data before entering S3 state into memory, so that users can quickly restore to the normal working state.
[0004] However, in the process of implementing the technical solutions in the embodiments of the present invention, the inventors discovered that the above-mentioned technology has at least the following technical problems:
[0005] In standby mode, the power supply continues to supply power to the most essential devices such as memory to ensure that data is not lost, which will continue to consume power. Therefore, in the existing technology, electronic devices continue to supply power to memory in standby mode to preserve the operation data of the electronic device, which will cause the electronic device to continuously consume power. Summary of the Invention
[0006] This invention provides an information processing method to solve the technical problem in the prior art where the memory is still powered during standby to preserve the operating data of the electronic device, thus causing the electronic device to continuously consume power.
[0007] One embodiment of the present invention provides an information processing method applied to an electronic device, the electronic device including a first non-volatile storage unit and a second non-volatile storage unit, wherein the first non-volatile storage unit has a first read / write speed lower than the second non-volatile storage unit has a second read / write speed, and the first non-volatile storage unit can store at least the source program data of the operating system, and the second non-volatile storage unit can store at least a portion of the system operation data during the operation of the operating system. The method includes:
[0008] When the electronic device is in a first state of running an operating system, a first instruction is obtained, wherein in the first state, the first non-volatile memory unit and the second non-volatile memory unit are in a powered state, and the first non-volatile memory unit stores at least the source program data of the operating system of the electronic device, and the second non-volatile memory unit stores at least a portion of the system running data during the operation of the operating system.
[0009] Based on the first instruction, the electronic device switches to a second state where the operating system is not running. In the second state, the first non-volatile memory unit and the second non-volatile memory unit are in a power-off state. The second non-volatile memory unit stores the system operation data stored in the second non-volatile memory unit before the first instruction was obtained, so that the electronic device, in the second state, obtains a second instruction and switches to the first state according to the second instruction and the system operation data stored in the second non-volatile memory unit.
[0010] Optionally, before the electronic device is in the first state of running the operating system, the method further includes:
[0011] At least a portion of the source program data of the operating system stored in the first non-volatile storage unit is copied to the second non-volatile storage unit and run, and the running data of the at least a portion of the data is stored in the second non-volatile storage unit, so that the electronic device enters the first state.
[0012] Optionally, the electronic device further includes a volatile storage unit, wherein the third read / write speed of the volatile storage unit is higher than the first read / write speed, and the volatile storage unit can store at least a portion of the system operation data when the operating system is running, wherein the volatile storage unit is in a powered state in the first state and in a non-powered state in the second state.
[0013] Optionally, the first non-volatile storage unit further stores source code data of at least one application. When the electronic device is in the first state, the system running data of the operating system is stored in the second non-volatile storage unit, and the application running data of any one or more applications in the at least one application is stored in the volatile storage unit.
[0014] Optionally, when the electronic device is in the first state, the sum of the data amounts of the system operation data and the application operation data is greater than the storage capacity of the second non-volatile storage unit.
[0015] Optionally, after the electronic device is in a first state running an operating system, before the first instruction is received, or after the electronic device is switched to the first state according to the system operating data stored in the second non-volatile memory unit, the method further includes:
[0016] Obtain the third instruction;
[0017] Based on the third instruction, the electronic device switches to a third state in which the operating system is not running. In the third state, the first non-volatile memory unit, the second non-volatile memory unit, and the volatile memory unit are in a state of not being powered on. The second non-volatile memory unit does not store the system operation data in the second non-volatile memory unit before the third instruction was obtained.
[0018] In the third state, a fourth instruction is obtained;
[0019] Based on the fourth instruction, the electronic device switches to a fourth state of running the operating system, wherein in the fourth state, the second non-volatile storage unit stores only the system running data during the operation of the operating system, the first non-volatile storage unit and the second non-volatile storage unit are in a powered state, and the volatile storage unit is in a de-powered state, so that the electronic device can delete or uninstall any of the at least one application.
[0020] Optionally, after the electronic device is in a first state running an operating system, before the first instruction is received, or after the electronic device is switched to the first state according to the system operating data stored in the second non-volatile memory unit, the method further includes:
[0021] A fifth instruction is received, and based on the fifth instruction, power supply to the volatile memory unit is stopped, causing the electronic device to enter a fifth state, so that the electronic device can delete or uninstall any of the at least one application, wherein in the fifth state, the first non-volatile memory unit and the second non-volatile memory unit are in a powered state, and the volatile memory unit is in a powered-off state.
[0022] Optionally, after the electronic device is in a first state running an operating system, before the first instruction is received, or after the electronic device is switched to the first state according to the system operating data stored in the second non-volatile memory unit, the method further includes:
[0023] Determine the first application that needs to be run;
[0024] Based on the first application, it is determined that the first application runtime data during the runtime of the first application is stored in the second non-volatile storage unit or in the volatile storage unit.
[0025] Optionally, determining whether the first application runtime data is stored in the second non-volatile storage unit or the volatile storage unit, based on the first application, specifically includes:
[0026] Obtain the first storage address tag corresponding to the first application, and determine whether the first application's runtime data is stored in the second non-volatile storage unit or in the volatile storage unit based on the storage address recorded in the first storage address tag; or
[0027] In the correspondence table between the application and the storage address of the application runtime data, find the storage address corresponding to the first application, and determine whether the first application runtime data is stored in the second non-volatile storage unit or in the volatile storage unit based on the storage address corresponding to the first application.
[0028] Optionally, after determining that the first application runtime data is stored in the second non-volatile storage unit or in the volatile storage unit, the method further includes: when running the first application, storing the first application runtime data in the second non-volatile storage unit or in the volatile storage unit accordingly.
[0029] Optionally, after storing the first application runtime data in the second non-volatile storage unit or in the volatile storage unit, the method further includes:
[0030] A control instruction is obtained, the control instruction being used to control the electronic device to adjust the storage address of the first application's running data;
[0031] Based on the adjustment instruction, the storage address of the first application's running data is adjusted.
[0032] Optionally, adjusting the storage address of the first application's runtime data based on the adjustment instruction specifically includes:
[0033] After storing the first application running data in the second non-volatile storage unit, the first application running data is copied from the second non-volatile storage unit to the volatile storage unit, and the first application running data stored in the second non-volatile storage unit is deleted; or
[0034] After storing the first application running data in the volatile storage unit, the first application running data is copied from the volatile storage unit to the second non-volatile storage unit, and the first application running data stored in the volatile storage unit is deleted.
[0035] Optionally, after copying the first application running data from the volatile storage unit to the second non-volatile storage unit and deleting the first application running data stored in the volatile storage unit, the method further includes:
[0036] When it is necessary to restore the first application running data to the volatile storage unit, the first application running data in the second non-volatile storage unit is copied to the volatile storage unit, and the first application running data in the second non-volatile storage unit is deleted.
[0037] Optionally, before the electronic device enters the first state of running an operating system, the method further includes at least two of the following three methods for controlling the electronic device to enter the first state:
[0038] The first method involves copying the source program data of the operating system stored in the first non-volatile storage unit to the second non-volatile storage unit and running it, so that the electronic device enters the first state.
[0039] The second method is to copy the source program data of the operating system stored in the first non-volatile storage unit to the volatile storage unit and run it, so that the electronic device enters the first state.
[0040] The third method involves copying the source program data of the operating system stored in the first non-volatile storage unit to the second non-volatile storage unit and the volatile storage unit, and then running the copy to allow the electronic device to enter the first state.
[0041] Another aspect of the present invention provides an electronic device, comprising:
[0042] The first non-volatile storage unit is capable of storing at least the source program data of the operating system of the electronic device;
[0043] A second non-volatile storage unit is connected to the first non-volatile storage unit. The second non-volatile storage unit can store at least a portion of the system operation data during the operation of the operating system. The first read / write speed of the first non-volatile storage unit is lower than the second read / write speed of the second non-volatile storage unit.
[0044] A processing unit, connected to the first non-volatile memory unit and the second non-volatile memory unit respectively, is configured to obtain a first instruction when the electronic device is in a first state running an operating system, wherein in the first state, the first non-volatile memory unit and the second non-volatile memory unit are powered on, and the first non-volatile memory unit stores at least the source program data of the operating system of the electronic device, and the second non-volatile memory unit stores at least a portion of the system operation data during the operation of the operating system, and based on the first instruction, the electronic device switches to a second state where the operating system is not running, wherein in the second state, the first non-volatile memory unit and the second non-volatile memory unit are not powered on, and the second non-volatile memory unit stores the system operation data in the second non-volatile memory unit before obtaining the first instruction, so that the electronic device obtains a second instruction in the second state, and switches the electronic device back to the first state according to the second instruction and the system operation data stored in the second non-volatile memory unit.
[0045] Optionally, the processing unit is further configured to copy at least a portion of the source program data of the operating system stored in the first non-volatile storage unit to the second non-volatile storage unit and run it before the electronic device is in the first state of running the operating system, and store the running data of the at least a portion of the data in the second non-volatile storage unit, so that the electronic device enters the first state.
[0046] Optionally, the electronic device further includes a volatile storage unit, which is connected to the first non-volatile storage unit, the second non-volatile storage unit, and the processing unit, respectively. The third read / write speed of the volatile storage unit is higher than the first read / write speed. The volatile storage unit can store at least a portion of the system operation data when the operating system is running. In the first state, the volatile storage unit is in a powered state, and in the second state, the volatile storage unit is in a non-powered state.
[0047] Optionally, the first non-volatile storage unit further stores source code data of at least one application. When the electronic device is in the first state, the system running data of the operating system is stored in the second non-volatile storage unit, and the application running data of any one or more applications in the at least one application is stored in the volatile storage unit.
[0048] Optionally, the processing unit is further configured to obtain a third instruction when the electronic device is in the first state, before obtaining the first instruction, or after switching the electronic device to the first state based on the system operation data stored in the second non-volatile storage unit; and based on the third instruction, switch the electronic device to a third state where the operating system is not running, wherein in the third state, the first non-volatile storage unit, the second non-volatile storage unit, and the volatile storage unit are in a non-powered state, the second non-volatile storage unit does not store the system operation data in the second non-volatile storage unit before obtaining the third instruction, and in the third state, obtain a fourth instruction, and based on the fourth instruction, switch the electronic device to a fourth state where the operating system is running, wherein in the fourth state, the second non-volatile storage unit only stores the system operation data during the operation of the operating system, the first non-volatile storage unit and the second non-volatile storage unit are in a powered state, and the volatile storage unit is in a non-powered state, so that the electronic device can delete or uninstall any of the at least one application in the applications.
[0049] Optionally, the processing unit is further configured to obtain a fifth instruction after the electronic device is in a first state of running an operating system, before obtaining the first instruction, or after switching the electronic device to the first state according to the system running data stored in the second non-volatile storage unit, and based on the fifth instruction, stop supplying power to the volatile storage unit, so that the electronic device enters a fifth state, enabling the electronic device to delete or uninstall any application in the at least one application, wherein in the fifth state, the first non-volatile storage unit and the second non-volatile storage unit are in a powered state, and the volatile storage unit is in a unpowered state.
[0050] Optionally, the processing unit is further configured to determine a first application to be run after the electronic device is in a first state of running an operating system, before the first instruction is obtained, or after the electronic device is switched to the first state according to the system running data stored in the second non-volatile storage unit, wherein the source program data of the first application is stored in the first non-volatile storage unit, and the processing unit is configured to determine, according to the first application, a first application running data of the first application running is stored in the second non-volatile storage unit or the volatile storage unit.
[0051] Optionally, the processing unit is further configured to obtain a first storage address tag corresponding to the first application, and determine, based on the storage address recorded in the first storage address tag, whether the first application running data is stored in the second non-volatile storage unit or in the volatile storage unit, or to look up the storage address corresponding to the first application in a correspondence table between applications and storage addresses of application running data during application runtime, and determine, based on the storage address corresponding to the first application, whether the first application running data is stored in the second non-volatile storage unit or in the volatile storage unit.
[0052] Optionally, the processing unit is further configured to, after determining that the first application running data is stored in the second non-volatile storage unit or stored in the volatile storage unit, store the first application running data in the second non-volatile storage unit or stored in the volatile storage unit when running the first application.
[0053] Optionally, the processing unit is further configured to, after storing the first application running data in the second non-volatile storage unit or in the volatile storage unit, obtain an adjustment instruction, the adjustment instruction being configured to control the electronic device to adjust the storage address of the first application running data, and to adjust the storage address of the first application running data based on the adjustment instruction.
[0054] Optionally, the processing unit is further configured to, after storing the first application running data in the second non-volatile storage unit, copy the first application running data from the second non-volatile storage unit to the volatile storage unit and delete the first application running data stored in the second non-volatile storage unit; or, after storing the first application running data in the volatile storage unit, copy the first application running data from the second non-volatile storage unit to the volatile storage unit and delete the first application running data from the second non-volatile storage unit.
[0055] Optionally, the processing unit is further configured to, after storing the first application running data in the second non-volatile storage unit or in the volatile storage unit, before copying the first application running data from the second non-volatile storage unit to the volatile storage unit, or before copying the first application running data from the volatile storage unit to the second non-volatile storage unit, detect whether the first storage address tag has changed, wherein, when the first storage address tag undergoes a first change, the first change indicates that the storage address recorded in the first storage address tag has been replaced by the volatile storage unit, and the step of copying the first application running data from the second non-volatile storage unit to the volatile storage unit is executed; when the first storage address tag undergoes a second change, the second change indicates that the storage address recorded in the first storage address tag has been replaced by the volatile storage unit, and the step of copying the first application running data from the volatile storage unit to the second non-volatile storage unit is executed.
[0056] Optionally, the processing unit is further configured to load the source program data of the operating system into the second non-volatile storage unit and / or the volatile storage unit before the electronic device enters the first state of running the operating system, so that the electronic device enters the first state.
[0057] Another aspect of the present invention provides an electronic device, comprising:
[0058] chassis;
[0059] The circuit board is disposed inside the housing;
[0060] A first non-volatile memory is connected to the circuit board, and the first non-volatile memory unit can store at least the source program data of the operating system of the electronic device;
[0061] A second non-volatile memory is disposed on the circuit board and connected to the first non-volatile memory. The second non-volatile memory unit can store at least a portion of the system operation data during the operation of the operating system. The first read / write speed of the first non-volatile memory unit is lower than the second read / write speed of the second non-volatile memory unit.
[0062] A processor, disposed on the circuit board, is connected to the first non-volatile memory and the second non-volatile memory respectively. When the electronic device is in a first state running an operating system, it obtains a first instruction, wherein in the first state, the first and second non-volatile memories are powered, and the first non-volatile memory stores at least the source program data of the operating system of the electronic device, and the second non-volatile memory stores at least a portion of the system operation data during the operation of the operating system. Based on the first instruction, the electronic device switches to a second state where the operating system is not running, wherein in the second state, the first and second non-volatile memories are not powered, and the second non-volatile memory stores the system operation data stored in the second non-volatile memory before obtaining the first instruction. This enables the electronic device to obtain a second instruction in the second state, and, based on the second instruction and the system operation data stored in the second non-volatile memory, switch the electronic device back to the first state.
[0063] Optionally, the electronic device further includes a volatile memory, which is connected to the first non-volatile memory, the second non-volatile memory, and the processor, respectively. The third read / write speed of the volatile memory is higher than the first read / write speed. The volatile memory can store at least a portion of the system operation data when the operating system is running. In the first state, the volatile memory is in a powered state, and in the second state, the volatile memory is in a non-powered state.
[0064] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
[0065] 1. This invention employs a second state where the electronic device switches to a non-operating system state based on a first instruction. In this second state, the first and second non-volatile memory units are not powered. The second non-volatile memory unit stores system operating data prior to receiving the first instruction. This allows the electronic device to receive a second instruction in the second state and, based on the second instruction and the system operating data stored in the second non-volatile memory unit, switch back to the first state. The first state is the normal operating state of the electronic device, and the second state is the standby state. After switching from the first state to the second state based on the first instruction, the electronic device does not need to continuously power the first and second non-volatile memory units. In other words, the electronic device does not power the memory in the standby state. This solves the technical problem in the prior art where electronic devices still power the memory in the standby state to preserve operating data, thus causing continuous power consumption. This invention achieves the technical effect of saving energy consumption in electronic devices.
[0066] 2. Since the second non-volatile storage unit is not powered when electronic devices such as laptops are in standby mode, the data in the second non-volatile storage unit can be saved, thereby achieving the technical effect of reducing the power consumption of electronic devices such as laptops. For portable electronic devices such as laptops, smartphones, and tablets, this can increase the standby time of electronic devices, avoid users frequently charging portable electronic devices, save users time, and thus improve the user experience. Attached Figure Description
[0067] Figure 1 A functional block diagram of an electronic device provided in an embodiment of the present invention;
[0068] Figure 2 A flowchart of an information processing method provided in an embodiment of the present invention;
[0069] Figure 3 This is a physical module diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0070] This invention provides an information processing method and an electronic device, which solves the technical problem in the prior art where electronic devices continue to supply power to the memory in standby mode to preserve the operation data of the electronic device, thereby causing the electronic device to continuously consume power.
[0071] The technical solutions in the embodiments of the present invention are intended to solve the above-mentioned technical problems, and the overall approach is as follows:
[0072] This invention provides an information processing method applied to an electronic device. The electronic device includes a first non-volatile memory unit and a second non-volatile memory unit. The first non-volatile memory unit has a first read / write speed lower than the second non-volatile memory unit. The first non-volatile memory unit stores at least the source program data of the electronic device's operating system, and the second non-volatile memory unit stores at least the system operation data of the operating system during operation. The method includes:
[0073] When the electronic device is in the first state of running an operating system, it receives a first instruction, wherein the first non-volatile memory unit and the second non-volatile memory unit are in a powered state in the first state.
[0074] Based on the first instruction, the electronic device switches to a second state where it does not run an operating system. In the second state, the first non-volatile memory unit and the second non-volatile memory unit are not powered. The second non-volatile memory unit stores the system operation data stored in the second non-volatile memory unit before the first instruction was obtained, so that the electronic device can obtain the second instruction in the second state and switch to the first state according to the second instruction and the system operation data stored in the second non-volatile memory unit.
[0075] As can be seen from the above, by adopting a second state where the electronic device switches to a non-operating system state based on the first instruction, the first and second non-volatile memory units are in a non-powered state in the second state. The second non-volatile memory unit stores the system operation data in the second non-volatile memory unit before the first instruction is obtained. This allows the electronic device to obtain the second instruction in the second state and switch back to the first state based on the system operation data stored in the second non-volatile memory unit. The first state is the normal operation state of the electronic device, and the second state is the standby state of the electronic device. After the electronic device switches from the first state to the second state based on the first instruction, it does not need to continuously supply power to the first and second non-volatile memory units. It can switch back from the second state to the first state based on the second instruction. In other words, the electronic device does not supply power to the second non-volatile memory unit in the standby state. Therefore, it solves the technical problem in the prior art where the electronic device still supplies power to the memory in the standby state to save the operation data of the electronic device, which causes the electronic device to continuously consume power. This achieves the technical effect of saving energy consumption of the electronic device.
[0076] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0077] This invention provides an information processing method applied to an electronic device, which includes a first non-volatile memory unit and a second non-volatile memory unit. The first non-volatile memory unit has a first read / write speed lower than the second read / write speed of the second non-volatile memory unit. The first non-volatile memory unit can store at least the source program data of the operating system, and the second non-volatile memory unit can store at least a portion of the system operation data during the operation of the operating system.
[0078] Please refer to Figure 1 , Figure 1 This is a functional block diagram of the electronic device provided in the embodiments of the present invention, such as... Figure 1 As shown, the electronic device includes: a first non-volatile memory unit 101; a second non-volatile memory unit 102 connected to the first non-volatile memory unit 101; and a processing unit 103 connected to both the first non-volatile memory unit 101 and the second non-volatile memory unit 102.
[0079] In practical applications, the electronic device can be a laptop, a desktop computer, a smartphone, or a tablet computer; there are no restrictions.
[0080] In the following sections, a detailed description will be given using a laptop computer as an example of the electronic device. The first non-volatile storage unit 101 belongs to the external storage (i.e., external memory) of the laptop computer. External storage refers to storage other than computer memory and CPU cache, such as mechanical hard disk, solid state hard disk (SSD), or flash memory, etc. The second non-volatile storage unit 102 belongs to the internal storage (i.e., memory) of the electronic device. Internal storage can be, for example, magnetic random access memory (MRAM), or a combination of memory using non-volatile memory (NVM) technology and static random access memory (SRAM), without limitation.
[0081] In the implementation of the second non-volatile memory cell 102, the magnetoresistive memory uses two nanoscale ferromagnetic materials, with a non-magnetic metal layer or insulating layer sandwiching a metal conductor at the interface. By changing the orientation of the two ferromagnetic materials, the magnetoresistance of the conductor below changes. When the resistance increases, the current passing through it decreases, and vice versa. Therefore, a transistor is used to determine the current value when power is applied, which can distinguish between the two different states of the ferromagnetic magnetic field direction and differentiate between "0" and "1". The magnetoresistive memory stores data in this way. Since the magnetism of the ferromagnetic material is almost permanent, the magnetoresistive memory can be rewritten almost infinitely. Furthermore, the magnetism of the ferromagnetic material does not disappear due to power loss, so unlike dynamic random access memory, it is not volatile and can retain its contents even after power is lost.
[0082] In another implementation of the second non-volatile memory unit, the non-volatile memory can be, for example, an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. Before the static random access memory (SRAM) is powered off, the electronic device uses the non-volatile memory to store the data in the SRAM, so that when it is powered on again, the data in the non-volatile memory can be copied to the SRAM, thereby realizing the function of the second non-volatile memory unit. This will not be elaborated further here.
[0083] Of course, based on the description of this embodiment, those skilled in the art can adopt other suitable and feasible methods to meet the actual needs, which will not be elaborated here.
[0084] Please refer to Figure 2 , Figure 2 This is a flowchart of an information processing method provided in an embodiment of the present invention. This information processing method can be applied to, for example... Figure 1 On the laptop shown, as Figure 2 As shown, the method includes:
[0085] S1: When the electronic device is in the first state of running an operating system, a first instruction is obtained, wherein the first non-volatile memory unit and the second non-volatile memory unit are in a powered state in the first state.
[0086] S2: Based on the first instruction, the electronic device switches to a second state where the operating system is not running. In the second state, the first non-volatile memory unit and the second non-volatile memory unit are in a state where they are not powered. The second non-volatile memory unit stores the system operation data in the second non-volatile memory unit before the first instruction is obtained, so that the electronic device obtains the second instruction in the second state, and switches the electronic device to the first state according to the second instruction and the system operation data stored in the second non-volatile memory unit.
[0087] In the specific implementation process, before the electronic device described in step S1 is in the first state of running the operating system, the information processing method provided by the embodiment of the present invention further includes: copying at least a portion of the source program data of the operating system stored in the first non-volatile storage unit to the second non-volatile storage unit and running it, and storing the running data of at least a portion of the data in the second non-volatile storage unit, so that the electronic device enters the first state.
[0088] Specifically, the laptop copies at least a portion of the source code data of the operating system stored in the first non-volatile storage unit, such as an external storage device like a mechanical hard drive or a solid-state drive, to the second non-volatile storage unit, i.e., internal storage such as magnetoresistive memory, and runs the at least a portion of the data. The running data of the at least a portion of the data is then stored in the second non-volatile storage unit. In other words, the operating system is loaded and run in the second non-volatile storage unit, thereby putting the laptop into the first state of running the operating system. Alternatively, the second non-volatile storage unit can be non-volatile random access memory (NVRAM), thus serving as the laptop's internal storage.
[0089] In practical applications, the operating system can be Windows, Linux, or any other system that a laptop can use; there are no restrictions here. Of course, if the electronic device is another device, such as a smartphone, then the operating system can be any system that the smartphone can use, such as Android, etc., which will not be elaborated further here.
[0090] When the laptop enters the first state of running the operating system, that is, when the laptop is in normal working state, such as the S0 state defined by the Advanced Configuration and Power Interface (ACPI) specification, the first non-volatile memory cell 101 and the second non-volatile memory cell 102 are in a powered state.
[0091] It should be noted that in this embodiment of the invention, when the laptop is in the first state, it receives a first instruction, specifically a standby instruction. The laptop can switch to standby mode according to the standby instruction. Of course, it should be noted that the standby mode in this embodiment of the invention is different from the S3 (Suspend to RAM, STR, also known as mounted to memory) mode defined by the Advanced Configuration and Power Interface Specification. In the standby mode described in this embodiment of the invention, the second non-volatile storage unit 102 is in a non-powered state, which will be further described in the following sections. In practical applications, it can be the first instruction input by the user, or the laptop can trigger the generation of the standby instruction when certain preset conditions are met, such as not receiving user operation within a preset time period. The laptop then receives the standby instruction. There are no restrictions here.
[0092] It should be further noted that the standby state in this embodiment of the invention is different from the S4 (Suspend to Disk, STD) state defined by the Advanced Configuration and Power Interface Specification. The S4 state is generally referred to as hibernation or sleep state. In addition, the S4 state saves the system running data to external storage such as hard disk.
[0093] After obtaining the first instruction through step S1, the information processing method provided in this embodiment of the invention proceeds to step S2, that is: based on the first instruction, the electronic device switches to a second state in which the operating system is not running, wherein in the second state, the first non-volatile storage unit and the second non-volatile storage unit are in a state of not being powered, and the second non-volatile storage unit stores the system running data in the second non-volatile storage unit before obtaining the first instruction.
[0094] In step S2, based on the first instruction, the electronic device switches to a second state where the operating system is not running. Specifically, according to the standby instruction obtained in step S1, the laptop switches to the S3 state defined by the Advanced Configuration and Power Interface Specification. In the S3 state, the laptop's first non-volatile storage unit 101, i.e., external storage such as mechanical hard disk or solid-state drive, and the second non-volatile storage unit 102, i.e., internal storage such as magnetoresistive memory, are in a state where they are not powered. However, since the second non-volatile storage unit 102 can save data in a state where it is not powered, unlike volatile storage units such as dynamic random access memory which require continuous power to save data, the laptop provided in this embodiment of the invention does not need to continuously power the second non-volatile storage unit 102 in the standby state, thereby achieving the technical effect of saving the laptop's energy consumption.
[0095] As can be seen from the above, since no power is supplied to the second non-volatile storage unit when electronic devices such as laptops are in standby mode, the data in the second non-volatile storage unit can be saved. This achieves the technical effect of reducing the energy consumption of electronic devices such as laptops. For portable electronic devices such as laptops, smartphones, and tablets, this can increase the standby time of electronic devices, avoid users frequently charging portable electronic devices, save users time, and thus improve the user experience.
[0096] After the electronic device switches to the second state where it does not run the operating system through step S2, the electronic device will receive a second instruction in the second state and switch to the first state according to the system operation data stored in the second non-volatile memory unit based on the second instruction.
[0097] Specifically, in the second state, receiving a second instruction could mean the laptop receives a wake-up command while in standby mode. Based on this wake-up command, the laptop can switch from the second state to the first state. In practical applications, this could be a wake-up command input by the user, or a wake-up command sent from the local area network via a network interface; there are no restrictions here.
[0098] After receiving the second instruction, the electronic device can be switched to the first state according to the system operation data stored in the second non-volatile storage unit. For example, a laptop can read the system operation data stored in the second non-volatile storage unit 102 according to the received wake-up instruction, and then quickly switch the laptop from standby state to normal working state. This will not be elaborated further here.
[0099] As can be seen from the above, by adopting a second state where the electronic device switches to a non-operating system state based on a first instruction, the first and second non-volatile memory units are in a non-powered state in the second state. The second non-volatile memory unit stores the system operation data in the second non-volatile memory unit before the first instruction is obtained. This allows the electronic device to obtain a second instruction in the second state and switch back to the first state based on the system operation data stored in the second non-volatile memory unit. The first state is the normal operating state of the electronic device, and the second state is the standby state of the electronic device. After switching from the first state to the second state based on the first instruction, the electronic device does not need to continuously supply power to the first and second non-volatile memory units. It can switch back from the second state to the first state based on the second instruction. In other words, the electronic device does not supply power to the memory in the standby state. Therefore, it solves the technical problem in the prior art where the electronic device still supplies power to the memory in the standby state to save the operating data of the electronic device, which causes the electronic device to continuously consume power. This achieves the technical effect of saving energy consumption of the electronic device.
[0100] Furthermore, since the second non-volatile storage unit is not powered when electronic devices such as laptops are in standby mode, the data in the second non-volatile storage unit can be saved, thereby achieving the technical effect of reducing the energy consumption of electronic devices such as laptops. For portable electronic devices such as laptops, smartphones, and tablets, this can increase the standby time of electronic devices, avoid users frequently charging portable electronic devices, save users time, and thus improve the user experience.
[0101] Please continue to refer to the following during the specific implementation process. Figure 1 The electronic device provided in this embodiment of the invention also includes a volatile storage unit 104. The third read / write speed of the volatile storage unit 104 is higher than the first read / write speed of the first non-volatile storage unit 101. The volatile storage unit 104 can store at least a portion of the system running data when the operating system is running. In the first state, the volatile storage unit 104 is in a powered state, and in the second state, the volatile storage unit 104 is in a non-powered state.
[0102] Specifically, the volatile storage unit 104 is part of the laptop's internal memory, and can be Dynamic Random Access Memory (DRAM) or Static Random Access Memory (SRAM), etc., without limitation. When the laptop is in the first state of running the operating system, the volatile storage unit 104 can store at least a portion of the system operation data during the operation of the operating system.
[0103] When the laptop is in the first state, the volatile storage unit 104 is powered on. When the laptop is in the first state and the volatile storage unit 104 is powered on, the volatile storage unit 104 can store at least a portion of the system operation data during the operation of the operating system. When the laptop is in the second state, the volatile storage unit 104 is not powered on. In the unpowered state, the volatile storage unit 104 cannot store data. Therefore, the data stored in the volatile storage unit 104 is "volatile". The second non-volatile storage unit 102 can store at least a portion of the system operation data during the operation of the operating system, whether it is powered on or not. Therefore, the data stored in the second non-volatile storage unit 102 is "non-volatile".
[0104] In practical applications, the second read / write speed of the second non-volatile storage unit 102 can be equal to or different from the third read / write speed of the volatile storage unit 104. Of course, if the second read / write speed and the third read / write speed are different, the laptop needs to use Flex Memory Technology (FMT) to adjust the second read / write speed and the third read / write speed to be the same (adjusted to the lower of the two) in order to ensure the normal operation of the laptop. Therefore, in order to avoid the waste of resources caused by the second read / write speed of the second non-volatile storage unit 102 being different from the third read / write speed of the volatile storage unit 104, the preferred solution is that the second read / write speed and the third read / write speed are the same.
[0105] In specific implementation, the information processing method provided in this embodiment of the invention further includes at least two of the following three methods for controlling the electronic device to enter the first state:
[0106] The first method involves copying the source code data of the operating system stored in the first non-volatile storage unit to the second non-volatile storage unit and running it, thereby enabling the electronic device to enter the first state.
[0107] For example, when a laptop starts up, the laptop's boot program, such as the Basic Input Output System (BIOS), is first copied to the second non-volatile storage unit 102 and run. Then, the BIOS guides the laptop to copy the source code data of the operating system, such as the Windows system, to the second non-volatile storage unit 102 and run it, thereby putting the laptop into the first state, which will not be described in detail here.
[0108] The second method involves copying the source code data of the operating system stored in the first non-volatile storage unit to the volatile storage unit and running it, so that the electronic device enters the first state. This method is the same as the startup process of electronic devices in the prior art, so it will not be described in detail here.
[0109] For example, when a laptop starts up, the laptop's boot program, such as the Basic Input Output System (BIOS), is first copied to the volatile storage unit 104 and run. Then, the BIOS guides the laptop to copy the source code data of the operating system, such as the Windows system, to the volatile storage unit 104 and run it, thereby putting the laptop into the first state. This process will not be elaborated further here.
[0110] The third method involves copying the operating system source code data stored in the first non-volatile storage unit to the second non-volatile storage unit and the volatile storage unit, and then running the copy to put the electronic device into a first state. For example, the second non-volatile storage unit 102 can store more important system operation data, such as the operating system kernel data, while the volatile storage unit 104 can store less important data, such as drivers for devices like the graphics card and keyboard, thus putting the laptop into the first state of running the operating system. It should be noted that the distinction between the more important and less important data in the system operation data can be made by those skilled in the art or by the user according to actual needs, and will not be elaborated further here.
[0111] As can be seen from the above, by adopting a technical solution that includes at least two of the three methods for controlling the electronic device to enter the first state, the electronic device can enter the first state of running the operating system in at least two ways, providing users with diverse options for starting the electronic device. Furthermore, if one method cannot control the electronic device to enter the first state of running the operating system, it can enter the first state of running the operating system in another way, thereby improving the reliability of the electronic device.
[0112] Of course, in practical applications, in addition to the three methods described above, in order to improve the startup speed of electronic devices and save users' time, this embodiment of the invention also provides a method for controlling electronic devices to enter a first state:
[0113] First, the kernel data of the operating system is stored in the second non-volatile storage unit 102. The kernel is the core of an operating system. It is the first-level software extension based on hardware, provides the most basic functions of the operating system, and is responsible for managing the system's processes, memory, device drivers, files, and network system, thus determining the system's performance and stability.
[0114] Since the data in the second non-volatile memory unit 102 can still be retained when the power is off, the electronic device can directly run the kernel data stored in the second non-volatile memory unit 102 when it starts up, thereby entering the first state. This saves the electronic device from having to load the boot program first, and then have the boot program copy the source program data of the operating system to the second non-volatile memory unit 102 or the volatile memory unit 104. This improves the speed at which the electronic device enters the first state. In addition, the dynamic random access memory can also delay the startup, instead of waiting until the dynamic random access memory is initialized before loading the boot program, thereby improving the speed at which the electronic device enters the first state even faster.
[0115] For example, taking a smartphone with an Android system installed as an example, the smartphone can store the kernel data of the Linux system used by the Android system in the second non-volatile storage unit 102. In this way, when the smartphone starts up, it can directly run the kernel data in the second non-volatile storage unit 102, thereby controlling the smartphone to enter the first state, without having to copy the smartphone's boot program, i.e., the system boot loader, to the second non-volatile storage unit 102 or volatile storage unit 104 for execution, nor needing to copy the source program data of the operating system from the first non-volatile storage unit 101 to the second non-volatile storage unit 102 or volatile storage unit 104 for execution, thereby improving the speed at which the smartphone enters the first state and saving the time required for the smartphone to enter the first state.
[0116] Of course, while using the fast boot method of electronic devices, in order to ensure the reliability of the electronic devices, some special functions may need to be provided through the boot program of the electronic devices. For example, the first boot disk order of a laptop can be adjusted in the laptop's basic input / output system. Another example is a smartphone using the Android system, which needs to use the fast boot function through the smartphone's system boot loader, or needs to enter recovery mode instead of normal working mode through the system boot loader, etc. Therefore, this embodiment of the invention also provides a method for controlling the electronic device to enter the first state:
[0117] Taking a smartphone running the Android system as an example, since the unit storage cost of the second non-volatile storage unit 102 is relatively high, the volatile storage unit 104 can be initialized. Then, the smartphone's bootloader, i.e., the system boot loader, can be copied to the volatile storage unit 104 and run. If it is necessary to enable some special functions through the system boot loader, such as the aforementioned fast startup function, it can be used at this time. If not, the source program data of the Android system is copied to the second non-volatile storage unit 102 and run, thereby guiding the smartphone to load the Android system into the non-volatile storage unit 102 and avoiding the problem of the system boot loader occupying the valuable storage space of the second non-volatile storage unit 102.
[0118] In the specific implementation process, the first non-volatile storage unit also stores the source program data of at least one application. When the electronic device is in the first state, the system running data of the operating system is stored in the second non-volatile storage unit, and the application running data of any one or more applications in at least one application is stored in the volatile storage unit.
[0119] Specifically, the first non-volatile storage unit 101 of the laptop computer, such as an external storage device like a mechanical hard disk or a solid-state drive, also stores the source code data of at least one application. When the electronic device is in the first state of running an operating system, the system running data of the operating system is stored in the second non-volatile storage unit 102, and the application running data of any one or more of the at least one application is stored in the volatile storage unit 104.
[0120] Of course, in practical applications, the application running data of any one or more applications stored in the first non-volatile storage unit 101 can also be stored in the second non-volatile storage unit 102. That is, the running location of the at least one application stored in the first non-volatile storage unit 101 can be the second non-volatile storage unit 102 and / or the volatile storage unit 104. In other words, when the laptop is in the first state of running the operating system, the operating system will use the storage space corresponding to the physical address range of the first non-volatile storage unit 101 and the storage space corresponding to the physical address range of the volatile storage unit 104 as a whole. This will not be elaborated further here.
[0121] In practical implementation, since the unit price of the second non-volatile storage unit 102 is currently relatively high, it cannot completely replace the function of the volatile storage unit 104, and its storage capacity is relatively small. Therefore, the storage capacity of the volatile storage unit 104 will be greater than the storage capacity of the second non-volatile storage unit 102. On the other hand, from the perspective of data storage during the operation of the laptop's operating system, the second non-volatile storage unit 102 can be used to store the more important part of the system operation data during the operation of the operating system, as well as the application operation data of some important applications such as antivirus software. At the same time, the volatile storage unit 104 can be used to store the application operation data of other ordinary applications. That is to say, when the laptop is in the first state of running the operating system, the storage capacity of the second non-volatile storage unit 102 only needs to meet the capacity required for the operation of the operating system. Of course, the capacity required for the operation of some more important applications can be appropriately increased. In other words, generally speaking, when the laptop is in the first state of running the operating system, the sum of the data volume of the system operation data and the application operation data of the laptop's operating system is greater than the storage capacity of the second non-volatile storage unit 102.
[0122] In the following sections, the technical solutions in the embodiments of the present invention will be described separately according to the different storage addresses of application running data when the laptop is in the first state.
[0123] Method (1): The second non-volatile storage unit 102 stores only system running data when the operating system is running, and the volatile storage unit 104 stores only application running data when the application is running.
[0124] In specific implementation, after the electronic device is in the first state of running an operating system, before receiving the first instruction, or after switching the electronic device to the first state based on the system operation data stored in the second non-volatile storage unit, the information processing method provided by the embodiments of the present invention further includes: receiving a third instruction, wherein the first instruction, the second instruction, and the third instruction are all different from each other; based on the third instruction, the electronic device switches to a third state of not running an operating system, wherein in the third state, the first non-volatile storage unit, the second non-volatile storage unit, and the volatile storage unit are in a non-powered state, and the second non-volatile storage unit does not store the system operation data in the second non-volatile storage unit before receiving the third instruction; in the third state, receiving a fourth instruction, wherein the first instruction, the second instruction, the third instruction, and the fourth instruction are all different from each other; based on the fourth instruction, the electronic device switches to a fourth state of running an operating system, wherein in the fourth state, the second non-volatile storage unit only stores the system operation data when the operating system is running, the first non-volatile storage unit and the second non-volatile storage unit are in a powered state, and the volatile storage unit is in a non-powered state, so that the electronic device can delete or uninstall any application in at least one application.
[0125] Specifically, after the laptop is in the first state of running the operating system, but before receiving the first instruction (i.e., the standby instruction), or after the laptop switches the electronic device to the first state based on the system operating data stored in the second non-volatile storage unit 102, the information processing method provided in this embodiment of the invention further includes:
[0126] The third instruction is obtained. The first, second and third instructions are different from each other. The third instruction may be a shutdown instruction.
[0127] Upon receiving the third instruction, the laptop can switch to a third state where the operating system is not running, i.e., the power-off state, or the S5 state defined by the Advanced Configuration and Power Interface Specification. In the third state, the first non-volatile storage unit 101, the second non-volatile storage unit 102, and the volatile storage unit 104 are in a power-off state. Of course, the processing unit 103 is also in a power-off state. At the same time, the second non-volatile storage unit 102 does not store the system running data in the second non-volatile storage unit 102 before receiving the third instruction. That is, the data in the second non-volatile storage unit 102 has been cleared in the third state. Of course, the data in the volatile storage unit 104 cannot be retained when it is not powered. That is, the data in the volatile storage unit 104 will also be cleared in the third state. This will not be elaborated further here.
[0128] In the third state, a fourth instruction is obtained. The first, second, third and fourth instructions are all different from each other. The fourth instruction may specifically be an instruction to control the laptop to enter safe mode.
[0129] Upon receiving the fourth instruction, the laptop can switch to the fourth state of running the operating system. In the fourth state, the second non-volatile storage unit 102 only stores system running data during the operation of the operating system, and does not store application running data during the operation of the application. At the same time, the first non-volatile storage unit 101 and the second non-volatile storage unit 102 are powered on, while the volatile storage unit 104 is not powered on. Of course, the volatile storage unit 104 can also be in an uninitialized state. This avoids the inability to delete or uninstall applications whose running data is stored in the volatile storage unit. As a result, the laptop can delete or uninstall any one of the at least one applications stored in the first non-volatile storage unit 101, improving the security of laptops and other electronic devices.
[0130] As can be seen from the above, by adopting a technical solution based on the fourth instruction, the electronic device switches to the fourth state of running the operating system. In the fourth state, the second non-volatile storage unit only stores system operation data during the operation of the operating system, while the first and second non-volatile storage units are powered and the volatile storage unit is not powered. This solution avoids the inability to delete or uninstall applications whose running data is stored in the volatile storage unit. As a result, the laptop can delete or uninstall any one of the at least one applications stored in the first non-volatile storage unit, thus improving the security of the electronic device.
[0131] In addition to the methods described above for controlling laptops and other electronic devices to enter safe mode to delete or uninstall applications, the following methods can also be used to enable laptops to delete or uninstall applications:
[0132] After the electronic device is in the first state of running the operating system, before the first instruction is received, or after the electronic device is switched to the first state according to the system operation data stored in the second non-volatile memory unit, the fifth instruction is received. That is, when the laptop is in normal working state, the fifth instruction is received. The fifth instruction may be an instruction to control the laptop to stop powering the volatile memory unit.
[0133] Upon receiving the fifth instruction, the laptop can stop supplying power to the volatile storage unit, thereby causing the application running data stored in the volatile storage unit 104 to disappear, that is, canceling the application's execution. This puts the electronic device into the fifth state, enabling the electronic device to delete or uninstall any application from at least one application. Further details are omitted here. In the fifth state, the first and second non-volatile storage units are powered, while the non-volatile storage units are not powered. Further details are omitted here.
[0134] Method (2) The second non-volatile storage unit 102 stores system running data when the operating system is running and application running data when the application is running, while the volatile storage unit 104 stores application running data when the application is running.
[0135] In specific implementation, after the electronic device is in the first state of running the operating system, before receiving the first instruction, or after switching the electronic device to the first state according to the system operation data stored in the second non-volatile storage unit, the information processing method provided by the embodiments of the present invention further includes: determining a first application to be run, wherein the source program data of the first application is stored in the first non-volatile storage unit; and determining, according to the first application, that the first application running data of the first application is stored in the second non-volatile storage unit or in a volatile storage unit.
[0136] Specifically, after a user inputs a running command through an input device such as a mouse, keyboard, or touchscreen, or after the laptop is triggered by time or other factors to automatically launch the first application, the laptop can determine the first application to be run. In practical applications, the source code data of the first application can be stored in the first non-volatile storage unit 101, or it can be stored in other storage units connected to the laptop, such as a portable hard drive or a network server, without any restrictions.
[0137] After determining the first application that needs to be run, it is possible to determine, based on the first application, the first application running data to be stored in the second non-volatile storage unit 102 or the volatile storage unit 104.
[0138] In specific implementation, determining whether the first application runtime data is stored in the second non-volatile storage unit 102 or the volatile storage unit 104 based on the first application can include: obtaining a first storage address tag corresponding to the first application; determining whether the first application runtime data is stored in the second non-volatile storage unit 102 or the volatile storage unit 104 based on the storage address recorded in the first storage address tag; or searching for the storage address corresponding to the first application in a correspondence table between applications and the storage addresses of application runtime data during application runtime, and determining whether the first application runtime data is stored in the second non-volatile storage unit 102 or the volatile storage unit 104 based on the storage address corresponding to the first application.
[0139] Specifically, the first storage address tag corresponding to the first application may record the storage location of the first application running data when the first application is running. The storage location may be manually set by the user or automatically set by the laptop according to the permissions of the first application or the required storage space size, without any restrictions. After obtaining the first storage address tag, it is possible to determine whether the first application running data is stored in the second non-volatile storage unit 102 or the volatile storage unit 104 according to the storage address recorded in the first storage address tag.
[0140] Of course, the storage address corresponding to the first application can also be found in a mapping table between applications and the storage addresses of application runtime data. Based on the storage address of the first application, the storage address of the first application runtime data can be determined to be stored in the second non-volatile storage unit or in the volatile storage unit. For example, a mapping table between applications and the storage addresses of application runtime data needs to be established in advance. For example, the mapping table between the storage addresses of the first application and the first application runtime data is stored in this mapping table. In practical applications, the laptop can establish this mapping table according to some preset rules, or the user can establish this mapping table. There are no restrictions here. Next, after determining the first application to be run, the specific process of determining the first application to be run has been described in detail in the previous steps and will not be repeated here. Then, based on the determined first application, the storage address corresponding to the first application is found in the mapping table. Finally, based on the storage address of the first application found in the mapping table, the storage address of the first application runtime data is determined to be stored in the second non-volatile storage unit 102 or in the volatile storage unit 104.
[0141] For example, in this embodiment, the kernel data of the laptop's operating system, such as the kernel data of a Windows system, can be stored in the second non-volatile storage unit 102. When the laptop is running, the operating system kernel, as well as some important applications, such as applications with root privileges and system privileges (e.g., firewall software, antivirus software), are stored in the second non-volatile storage unit 102 using the aforementioned storage address tags or correspondence tables, or marked in other ways. This allows the kernel process and the running data of these important application processes to be stored in the second non-volatile storage unit 102. Simultaneously, other less important applications, such as those with ordinary user privileges, are stored in the second non-volatile storage unit 102. Applications with user privileges, such as games and video software, are marked using the aforementioned storage address tags or mapping tables, or other methods. The runtime data of these less important application processes is stored in volatile storage unit 104. The system kernel does not grant applications running in volatile storage unit 104 permission to modify the second non-volatile storage unit 102. In other words, applications running in volatile storage unit 104 can access data in the second non-volatile storage unit 102, but cannot change the data there. Therefore, when a new application is installed or automatically run, it will only run in volatile storage unit 104 and not in the second non-volatile storage unit 104.
[0142] Of course, similar to that described in method (1), in method (2), after the laptop switches to the fourth state, it is also possible to conveniently delete or uninstall less important applications stored in the first non-volatile storage unit 101 and whose runtime data is stored in the volatile storage unit 104. Even if a newly installed application has a problem, or a new application encounters a problem when it is automatically run, it can be deleted or uninstalled, thereby improving the security of the electronic device.
[0143] Through the description of this embodiment, those skilled in the art can choose other suitable methods to determine whether the first application running data of the first application is stored in the second non-volatile storage unit 102 or in the volatile storage unit 104, in order to meet the needs of the actual situation. Further details will not be elaborated here.
[0144] In specific implementation, after determining that the first application runtime data is stored in the second non-volatile storage unit 102 or the volatile storage unit 104, the information processing method provided in this embodiment of the invention further includes: when running the first application, storing the first application runtime data in the second non-volatile storage unit 102 or the volatile storage unit 104 accordingly. For example, after determining that the first runtime data is stored in the second non-volatile storage unit 102, when the first application is running, the first application runtime data can be stored in the second non-volatile storage unit 102; after determining that the first runtime data is stored in the volatile storage unit 104, when the first application is running, the first application runtime data can be stored in the volatile storage unit 104.
[0145] In a specific implementation, after storing the first application running data in a second non-volatile storage unit or in a volatile storage unit, the information processing method provided in this embodiment of the invention further includes: obtaining an adjustment instruction, the adjustment instruction being used to control the electronic device to adjust the storage address of the first application running data, and adjusting the storage address of the first application running data based on the adjustment instruction.
[0146] Specifically, the user or laptop may generate an adjustment instruction based on the running status of the first application to control the electronic device to adjust the storage address of the first application's running data, and adjust the storage address of the first application's running data based on the adjustment instruction.
[0147] In the specific implementation process, based on the adjustment instruction, the storage address of the first application running data is adjusted. Specifically, after storing the first application running data in the second non-volatile storage unit, the first application running data is copied from the second non-volatile storage unit 102 to the volatile storage unit 104, and the first application running data stored in the second non-volatile storage unit 102 is deleted; or after storing the first application running data in the volatile storage unit, the first application running data is copied from the volatile storage unit 104 to the second non-volatile storage unit 102, and the first application running data stored in the volatile storage unit 104 is deleted.
[0148] In practical applications, after the laptop receives an adjustment command, it can execute the steps corresponding to that command in real time. For example, after detecting a first change in the first storage address tag, the laptop can immediately execute the step of "copying the first application running data from the second non-volatile storage unit 102 to the volatile storage unit 104 and deleting the first application running data stored in the second non-volatile storage unit 102". Of course, at this time, the adjustment command can be synchronized to the address storage tag or correspondence table described above so that it can be called the next time the first application is run. Alternatively, the result of the adjustment command can be saved, that is, the adjustment command can be synchronized to the address storage tag or correspondence table described above, and the step of "copying the first application running data from the second non-volatile storage unit 104 to the volatile storage unit 104 and deleting the first application running data stored in the second non-volatile storage unit 102" can be executed under certain conditions. The step of "copying the running data from the second non-volatile storage unit 102 to the volatile storage unit 104 and deleting the first application running data stored in the second non-volatile storage unit 102" is preferred. Of course, a better approach is to first save the result of the adjustment instruction, for example, to the first non-volatile storage unit 101, and then execute the step corresponding to the change under certain conditions. For example, it could be when it is determined that the first application running data does not change during the first application's operation, or when it is determined that the laptop is switching states, that the step of "copying the first application running data from the second non-volatile storage unit 102 to the volatile storage unit 104 and deleting the first application running data stored in the second non-volatile storage unit 102" is executed. No limitation is imposed here.
[0149] In specific implementation, after copying the first application running data from the volatile storage unit 104 to the second non-volatile storage unit 102 and deleting the first application running data stored in the volatile storage unit 104, the information processing method provided in this embodiment of the invention further includes: when it is necessary to restore the first application running data to the volatile storage unit 104, for example, the laptop copies the first application running data from the volatile storage unit 104 to the second non-volatile storage unit 102 because the laptop stops supplying power to the volatile storage unit 104 in standby mode, so the first application running data is copied to the second non-volatile storage unit 102. Then, after the laptop enters normal working state, it is necessary to restore the first application running data to the volatile storage unit 104. Therefore, the first application running data in the second non-volatile storage unit 102 can be copied to the volatile storage unit 104, and the first application running data in the second non-volatile storage unit 102 can be deleted.
[0150] It should be noted again that the information processing method provided in this embodiment of the invention can be applied not only to laptops, but also to electronic devices such as smartphones and tablets. For the sake of brevity, it will not be described in detail here.
[0151] Based on the same inventive concept, this invention also provides an electronic device, please refer to [link / reference needed]. Figure 1 The electronic device includes: a first non-volatile storage unit 101, which can store at least the source program data of the operating system of the electronic device;
[0152] The first non-volatile storage unit 102 is connected to the first non-volatile storage unit 101. The first non-volatile storage unit 102 can store at least a portion of the system running data during the operation of the operating system. The first read / write speed of the first non-volatile storage unit 101 is lower than the second read / write speed of the first non-volatile storage unit 102.
[0153] The processing unit 103 is connected to the first non-volatile storage unit 101 and the first non-volatile storage unit 102, respectively. When the electronic device is in a first state running an operating system, it obtains a first instruction. In the first state, the first non-volatile storage units 101 and 102 are powered on, and the first non-volatile storage unit 101 stores at least the source program data of the electronic device's operating system, while the first non-volatile storage unit 102 stores at least a portion of the system operation data during the operation of the operating system. Based on the first instruction, the electronic device switches to a second state where it does not run an operating system. In the second state, the first non-volatile storage units 101 and 102 are not powered on, and the first non-volatile storage unit 102 stores the system operation data stored in the first non-volatile storage unit 102 before obtaining the first instruction. This allows the electronic device to obtain a second instruction in the second state, and based on the second instruction and the system operation data stored in the first non-volatile storage unit 102, switch the electronic device back to the first state.
[0154] In a specific implementation, the processing unit 103 is also used to copy at least a portion of the source program data of the operating system stored in the first non-volatile storage unit 101 to the first non-volatile storage unit 102 and run it before the electronic device is in the first state of running the operating system, and to store the running data of at least a portion of the data in the first non-volatile storage unit 102 so that the electronic device enters the first state.
[0155] In the specific implementation process, the electronic device also includes a volatile storage unit 104, which is connected to a first non-volatile storage unit 101, a second non-volatile storage unit 102 and a processing unit 103 respectively. The third read / write speed of the volatile storage unit 104 is higher than the first read / write speed. The volatile storage unit 104 can store at least a portion of the system operation data when the operating system is running. In the first state, the volatile storage unit 104 is in a powered state, and in the second state, the volatile storage unit 104 is in a non-powered state.
[0156] In the specific implementation process, the first non-volatile storage unit 101 also stores the source program data of at least one application. When the electronic device is in the first state, the system running data of the operating system is stored in the first non-volatile storage unit 102, and the application running data of any one or more applications in at least one application is stored in the volatile storage unit 104.
[0157] In a specific implementation, the processing unit 103 is further configured to, when the electronic device is in the first state, before receiving the first instruction, or after switching the electronic device to the first state based on the system operation data stored in the first non-volatile storage unit 102, receive the third instruction; and based on the third instruction, switch the electronic device to a third state where the operating system is not running. In the third state, the first non-volatile storage unit 101, the first non-volatile storage unit 102, and the volatile storage unit are in a non-powered state, and the first non-volatile storage unit 102 does not store the system operation data in the first non-volatile storage unit 102 before receiving the third instruction. In the third state, a fourth instruction is received, and based on the fourth instruction, the electronic device switches to a fourth state where the operating system is running. In the fourth state, the first non-volatile storage unit 102 only stores the system operation data when the operating system is running, the first non-volatile storage unit 101 and the first non-volatile storage unit 102 are in a powered state, and the volatile storage unit 104 is in a non-powered state, so that the electronic device can delete or uninstall any application in at least one application.
[0158] In a specific implementation, the processing unit 103 is further configured to obtain a fifth instruction after the electronic device is in the first state of running the operating system, before obtaining the first instruction, or after switching the electronic device to the first state according to the system operation data stored in the second non-volatile storage unit 102, and based on the fifth instruction, stop supplying power to the volatile storage unit 104, so that the electronic device enters the fifth state, so that the electronic device can delete or uninstall any application in at least one application, wherein in the fifth state, the first non-volatile storage unit 101 and the second non-volatile storage unit 102 are in a powered state, and the volatile storage unit 104 is in a non-powered state.
[0159] In a specific implementation, the processing unit 103 is also used to determine the first application to be run after the electronic device is in the first state of running the operating system, before obtaining the first instruction, or after switching the electronic device to the first state according to the system running data stored in the first non-volatile storage unit 102. The source program data of the first application is stored in the first non-volatile storage unit 101, and the first application running data is determined to be stored in the first non-volatile storage unit 102 or the volatile storage unit 104 according to the first application.
[0160] In a specific implementation, the processing unit 103 is also used to obtain the first storage address tag corresponding to the first application, and determine, based on the storage address recorded in the first storage address tag, whether the first application running data is stored in the first non-volatile storage unit 102 or the volatile storage unit 104, or to look up the storage address corresponding to the first application in the correspondence table between the application and the storage address of the application running data during application runtime, and determine, based on the storage address corresponding to the first application, whether the first application running data is stored in the second non-volatile storage unit or the volatile storage unit.
[0161] In a specific implementation, the processing unit 103 is also used to, after determining that the first application running data is stored in the first non-volatile storage unit 102 or in the volatile storage unit 104, store the first application running data in the second non-volatile storage unit 102 or in the volatile storage unit 104 when running the first application.
[0162] In a specific implementation, the processing unit 103 is also used to obtain an adjustment instruction after storing the first application running data in the first non-volatile storage unit 102 or in the volatile storage unit 104. The adjustment instruction is used to control the electronic device to adjust the storage address of the first application running data, and to adjust the storage address of the first application running data based on the adjustment instruction.
[0163] In a specific implementation, the processing unit 103 is further configured to, after copying the first application running data from the volatile storage unit 104 to the first non-volatile storage unit 102 and deleting the first application running data stored in the volatile storage unit 104, when it is necessary to restore the first application running data to the volatile storage unit 104, copy the first application running data in the first non-volatile storage unit 102 to the volatile storage unit 104 and delete the first application running data in the first non-volatile storage unit 102.
[0164] In specific implementation, the processing unit 103 is also used to control the electronic device to enter the first state by at least two of the following three methods before the electronic device is in the first state of running the operating system:
[0165] The first method involves copying the source program data of the operating system stored in the first non-volatile storage unit 101 to the second non-volatile storage unit 102 and running it, so that the electronic device enters the first state.
[0166] The second method is to copy the source program data of the operating system stored in the first non-volatile storage unit 101 to the volatile storage unit 104 and run it, so that the electronic device enters the first state.
[0167] The third method involves copying the source program data of the operating system stored in the first non-volatile storage unit 101 to the second non-volatile storage unit 102 and the volatile storage unit 104 and running it, so that the electronic device enters the first state.
[0168] Based on the same inventive concept, another aspect of the present invention provides an electronic device, please refer to... Figure 3 , Figure 3 This is a schematic diagram of the physical modules of the electronic device provided in the embodiments of the present invention, such as... Figure 3 As shown, the electronic device includes: a housing 301;
[0169] Circuit board 302 is disposed inside housing 301;
[0170] The first non-volatile memory 303 is connected to the circuit board 302. The first non-volatile memory cell can store at least the source program data of the operating system of the electronic device.
[0171] The second non-volatile memory 304 is disposed on the circuit board 302 and connected to the first non-volatile memory 303. The second non-volatile memory unit can store at least a portion of the system running data during the operation of the operating system. The first read / write speed of the first non-volatile memory unit is lower than the second read / write speed of the second non-volatile memory unit.
[0172] A processor 305, disposed on a circuit board 302, is connected to a first non-volatile memory 303 and a second non-volatile memory 304. When the electronic device is in a first state running an operating system, it receives a first instruction. In the first state, both the first and second non-volatile memories 303 and 304 are powered, and the first non-volatile memory 303 stores at least the source program data of the operating system, while the second non-volatile memory 304 stores at least a portion of the system operation data during the operation of the operating system. Based on the first instruction, the electronic device switches to a second state where the operating system is not running. In the second state, both the first and second non-volatile memories 303 and 304 are not powered, and the second non-volatile memory 304 stores the system operation data stored before receiving the first instruction. In the second state, the processor receives a second instruction and, based on the second instruction and the system operation data stored in the second non-volatile memory 304, switches the electronic device back to the first state.
[0173] In specific implementation, the electronic device also includes a volatile memory 306, which is connected to a first non-volatile memory 303, a second non-volatile memory 304 and the processor 305 respectively. The third read / write speed of the volatile memory 306 is higher than the first read / write speed. The volatile memory 306 can store at least a portion of the system operation data when the operating system is running. In the first state, the volatile memory 306 is in a powered state, and in the second state, the volatile memory 306 is in a non-powered state.
[0174] The electronic device in this embodiment and the information processing method in the foregoing embodiments are two aspects based on the same inventive concept. The implementation process of the method has been described in detail above, so those skilled in the art can clearly understand the structure and implementation process of the electronic device in this embodiment based on the foregoing description. For the sake of brevity, it will not be described again here.
[0175] The technical solutions in the above embodiments of the present invention have at least the following technical effects or advantages:
[0176] 1. This invention employs a second state where the electronic device switches to a non-operating system state based on a first instruction. In this second state, the first and second non-volatile memory units are not powered. The second non-volatile memory unit stores the system operation data stored before the first instruction was received. This allows the electronic device to receive a second instruction in the second state and, based on the second instruction and the system operation data stored in the second non-volatile memory unit, switch back to the first state. The first state is the normal operating state of the electronic device, and the second state is the standby state. After switching from the first state to the second state based on the first instruction, the electronic device does not need to continuously power the first and second non-volatile memory units. In other words, the electronic device does not power the memory in the standby state. This solves the technical problem in the prior art where electronic devices still power the memory in the standby state to preserve the operating data, thus causing continuous power consumption. This invention achieves the technical effect of saving energy consumption in electronic devices.
[0177] 2. Since the second non-volatile storage unit is not powered when electronic devices such as laptops are in standby mode, the data in the second non-volatile storage unit can be saved, thereby achieving the technical effect of reducing the power consumption of electronic devices such as laptops. For portable electronic devices such as laptops, smartphones, and tablets, this can increase the standby time of electronic devices, avoid users frequently charging portable electronic devices, save users time, and thus improve the user experience.
[0178] 3. By employing a fourth instruction-based approach, the electronic device switches to a fourth state where the operating system is running. In this fourth state, the second non-volatile storage unit only stores system operation data during operating system operation, while the first and second non-volatile storage units are powered on and the volatile storage unit is unpowered. This approach avoids the inability to delete or uninstall applications whose runtime data is stored on the volatile storage unit. Consequently, the laptop computer can delete or uninstall any one of the applications stored in the first non-volatile storage unit, thus improving the security of the electronic device.
[0179] 4. By employing a technical solution that includes at least two of the three methods for controlling the electronic device to enter the first state, the electronic device can enter the first state of running the operating system through at least two methods, providing users with diverse options for starting the electronic device. Furthermore, if one method fails to control the electronic device to enter the first state of running the operating system, another method can be used to enter the first state of running the operating system, thereby improving the reliability of the electronic device.
[0180] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0181] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0182] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0183] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0184] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0185] Specifically, the computer program instructions corresponding to the information processing method in this application embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the computer program instructions corresponding to the information processing method in the storage media are read or executed by an electronic device, the following steps are included:
[0186] When the electronic device is in a first state of running an operating system, a first instruction is obtained, wherein in the first state, the first non-volatile memory unit and the second non-volatile memory unit are in a powered state, and the first non-volatile memory unit stores at least the source program data of the operating system of the electronic device, and the second non-volatile memory unit stores at least a portion of the system running data during the operation of the operating system.
[0187] Based on the first instruction, the electronic device switches to a second state where the operating system is not running. In the second state, the first non-volatile memory unit and the second non-volatile memory unit are in a non-powered state, and the second non-volatile memory unit stores the system operation data in the second non-volatile memory unit before the first instruction was obtained.
[0188] In the second state, a second instruction is obtained;
[0189] According to the second instruction, the electronic device is switched to the first state based on the system operation data stored in the second non-volatile memory unit.
[0190] Optionally, the storage medium also stores additional computer instructions, which are executed before the electronic device is in a first state of running the operating system, and include the following steps when executed:
[0191] At least a portion of the source program data of the operating system stored in the first non-volatile storage unit is copied to the second non-volatile storage unit and run, and the running data of the at least a portion of the data is stored in the second non-volatile storage unit, so that the electronic device enters the first state.
[0192] Optionally, the electronic device further includes a volatile storage unit, wherein the third read / write speed of the volatile storage unit is higher than the first read / write speed, and the volatile storage unit can store at least a portion of the system operation data when the operating system is running, wherein the volatile storage unit is in a powered state in the first state and in a non-powered state in the second state.
[0193] Optionally, the first non-volatile storage unit further stores source code data of at least one application. When the electronic device is in the first state, the system running data of the operating system is stored in the second non-volatile storage unit, and the application running data of any one or more applications in the at least one application is stored in the volatile storage unit.
[0194] Optionally, when the electronic device is in the first state, the sum of the data amounts of the system operation data and the application operation data is greater than the storage capacity of the second non-volatile storage unit.
[0195] Optionally, the storage medium also stores additional computer instructions, which are executed after the electronic device is in a first state running an operating system, before the first instruction is received, or after the electronic device is switched to the first state according to the system operating data stored in the second non-volatile storage unit, and when executed, include the following steps:
[0196] Obtain the third instruction;
[0197] Based on the third instruction, the electronic device switches to a third state in which the operating system is not running. In the third state, the first non-volatile memory unit, the second non-volatile memory unit, and the volatile memory unit are in a state of not being powered on. The second non-volatile memory unit does not store the system operation data in the second non-volatile memory unit before the third instruction was obtained.
[0198] In the third state, a fourth instruction is obtained;
[0199] Based on the fourth instruction, the electronic device switches to a fourth state of running the operating system, wherein in the fourth state, the second non-volatile storage unit stores only the system running data during the operation of the operating system, the first non-volatile storage unit and the second non-volatile storage unit are in a powered state, and the volatile storage unit is in a de-powered state, so that the electronic device can delete or uninstall any of the at least one application.
[0200] Optionally, the storage medium also stores additional computer instructions, which are executed after the electronic device is in a first state running an operating system, before the first instruction is received, or after the electronic device is switched to the first state according to the system operating data stored in the second non-volatile storage unit, and when executed, include the following steps:
[0201] Determine the first application that needs to be run;
[0202] Based on the first application, it is determined that the first application runtime data during the runtime of the first application is stored in the second non-volatile storage unit or in the volatile storage unit.
[0203] Optionally, the storage medium also stores additional computer instructions, which include the step of determining, based on the first application, that the first application runtime data is stored in the second non-volatile storage unit or the volatile storage unit, and when executed, include the following steps:
[0204] Obtain the first storage address tag corresponding to the first application;
[0205] Based on the storage address recorded in the first storage address tag, it is determined that the first application runtime data is stored in the second non-volatile storage unit or stored in the volatile storage unit.
[0206] Optionally, the storage medium also stores other computer instructions, which are executed after determining that the first application runtime data is stored in the second non-volatile storage unit or in the volatile storage unit, and when executed, include the following steps: when running the first application, storing the first application runtime data in the second non-volatile storage unit or in the volatile storage unit.
[0207] Optionally, the storage medium also stores additional computer instructions, which are executed after the first application runtime data is stored in the second non-volatile storage unit or in the volatile storage unit, and include the following steps when executed:
[0208] Copy the first application running data from the second non-volatile storage unit to the volatile storage unit, and delete the first application running data stored in the second non-volatile storage unit; or
[0209] The first application running data is copied from the volatile storage unit to the second non-volatile storage unit, and the first application running data stored in the volatile storage unit is deleted.
[0210] Optionally, the storage medium also stores additional computer instructions, which are executed after the steps of copying the first application running data from the volatile storage unit to the second non-volatile storage unit and deleting the first application running data stored in the volatile storage unit are completed. When executed, these instructions include the following steps:
[0211] When it is necessary to restore the first application running data to the volatile storage unit, the first application running data in the second non-volatile storage unit is copied to the volatile storage unit, and the first application running data in the second non-volatile storage unit is deleted.
[0212] Optionally, the storage medium also stores additional computer instructions, which are executed after storing the first application runtime data in the second non-volatile storage unit or in the volatile storage unit, and before copying the first application runtime data from the second non-volatile storage unit to the volatile storage unit, or before copying the first application runtime data from the volatile storage unit to the second non-volatile storage unit, and when executed, include the following steps:
[0213] Detect whether the first storage address label has changed;
[0214] When the first storage address tag undergoes a first change, the first change indicates that the storage address recorded in the first storage address tag has been replaced by the second non-volatile storage unit and the volatile storage unit. The following steps are executed: copy the first application running data from the second non-volatile storage unit to the volatile storage unit, and delete the first application running data stored in the second non-volatile storage unit.
[0215] When the first storage address label undergoes a second change, the second change indicates that the storage address recorded in the first storage address label has been replaced by the volatile storage unit and then by the second non-volatile storage unit. The following steps are performed: copying the first application running data from the volatile storage unit to the second non-volatile storage unit, and deleting the first application running data stored in the volatile storage unit.
[0216] Optionally, the storage medium also stores additional computer instructions, which are executed before the electronic device is in a first state of running an operating system, and include the following steps when executed:
[0217] The source program data of the operating system stored in the first non-volatile storage unit is copied to the second non-volatile storage unit and / or the volatile storage unit and run, so that the electronic device enters the first state.
[0218] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. An information processing method applied to an electronic device, the electronic device including a second non-volatile storage unit, the method comprising: When the electronic device is in a first state, a first instruction is obtained, wherein the second non-volatile memory unit, which serves as memory in the first state, is in a powered state, and the second non-volatile memory unit stores at least a portion of the system operation data during the operation of the operating system; the first state is the normal operating state of the electronic device; Based on the first instruction, the electronic device switches to a second state, wherein in the second state, the second non-volatile memory unit is in a non-powered state, and the second non-volatile memory unit stores the system operation data stored in the second non-volatile memory unit before the first instruction is received, so that the electronic device, in the second state, can obtain and, according to the second instruction, switch to the first state based on the system operation data stored in the second non-volatile memory unit; the second state is the standby state of the electronic device. The electronic device further includes a first non-volatile storage unit, wherein the first read / write speed of the first non-volatile storage unit is lower than the second read / write speed of the second non-volatile storage unit, and the first non-volatile storage unit can store at least the source program data of the operating system. When the electronic device is in a first state, it runs an operating system. Before the electronic device is in the first state, the method further includes: copying at least a portion of the source program data of the operating system stored in the first non-volatile storage unit to the second non-volatile storage unit and running it, and storing the running data of the at least a portion of the data in the second non-volatile storage unit, so that the electronic device enters the first state.
2. The method as described in claim 1, characterized in that, The electronic device further includes a volatile memory unit, the third read / write speed of which is higher than the first read / write speed, and the volatile memory unit can store at least a portion of the system operation data when the operating system is running, wherein the volatile memory unit is in a powered state in the first state and in a non-powered state in the second state.
3. The method as described in claim 2, characterized in that, The first non-volatile storage unit also stores source code data of at least one application. When the electronic device is in the first state, the system running data of the operating system is stored in the second non-volatile storage unit, and the application running data of any one or more applications in the at least one application is stored in the volatile storage unit. When the electronic device is in the first state, the sum of the data amounts of the system running data and the application running data is greater than the storage capacity of the second non-volatile storage unit; and, after the electronic device is in the first state of running an operating system, before obtaining the first instruction, or after the electronic device is switched to the first state according to the system running data stored in the second non-volatile storage unit, the method further includes: obtaining a third instruction; Based on the third instruction, the electronic device switches to a third state where it does not run the operating system. In this third state, the first non-volatile storage unit, the second non-volatile storage unit, and the volatile storage unit are in a power-off state, and the second non-volatile storage unit does not store the system operation data stored in the second non-volatile storage unit before the third instruction was received. In the third state, a fourth instruction is received. Based on the fourth instruction, the electronic device switches to a fourth state where it runs the operating system. In this fourth state, the second non-volatile storage unit only stores the system operation data during the operation of the operating system. The first non-volatile storage unit and the second non-volatile storage unit are in a power-on state, and the volatile storage unit is in a power-off state, so that the electronic device can delete or uninstall any of the at least one application in the at least one application.
4. The method as described in claim 2, characterized in that, The first non-volatile storage unit also stores source code data of at least one application. When the electronic device is in the first state, the system running data of the operating system is stored in the second non-volatile storage unit, and the application running data of any one or more applications in the at least one application is stored in the volatile storage unit. as well as, After the electronic device is in a first state running an operating system, before the first instruction is received, or after the electronic device is switched to the first state based on the system operating data stored in the second non-volatile memory unit, the method further includes: receiving a fifth instruction, and based on the fifth instruction, stopping the power supply to the volatile memory unit, causing the electronic device to enter a fifth state, so that the electronic device can delete or uninstall any of the at least one application, wherein in the fifth state, the first non-volatile memory unit and the second non-volatile memory unit are in a powered state, and the volatile memory unit is in a powered-off state.
5. The method as described in claim 2, characterized in that, After the electronic device is in a first state of running an operating system, before the first instruction is received, or after the electronic device is switched to the first state according to the system running data stored in the second non-volatile storage unit, the method further includes: determining a first application to be run; and determining, according to the first application, that the first application running data is stored in the second non-volatile storage unit or in the volatile storage unit. Specifically, determining whether the first application runtime data is stored in the second non-volatile storage unit or the volatile storage unit based on the first application includes: obtaining a first storage address tag corresponding to the first application, and determining whether the first application runtime data is stored in the second non-volatile storage unit or the volatile storage unit based on the storage address recorded in the first storage address tag; or searching for the storage address corresponding to the first application in a correspondence table between applications and the storage addresses of application runtime data, and determining whether the first application runtime data is stored in the second non-volatile storage unit or the volatile storage unit based on the storage address corresponding to the first application.
6. The method as described in claim 2, characterized in that, After the electronic device is in a first state of running an operating system, before the first instruction is received, or after the electronic device is switched to the first state according to the system running data stored in the second non-volatile storage unit, the method further includes: determining a first application to be run; and determining, according to the first application, that the first application running data is stored in the second non-volatile storage unit or in the volatile storage unit. The method further includes, after determining that the first application runtime data is stored in the second non-volatile storage unit or in the volatile storage unit, the method further includes: when running the first application, storing the first application runtime data in the second non-volatile storage unit or in the volatile storage unit accordingly; and after storing the first application runtime data in the second non-volatile storage unit or in the volatile storage unit accordingly, the method further includes: obtaining an adjustment instruction, the adjustment instruction being used to control the electronic device to adjust the storage address of the first application runtime data; and adjusting the storage address of the first application runtime data based on the adjustment instruction. The step of adjusting the storage address of the first application running data based on the adjustment instruction specifically includes: after storing the first application running data in the second non-volatile storage unit, copying the first application running data from the second non-volatile storage unit to the volatile storage unit, and deleting the first application running data stored in the second non-volatile storage unit; or after storing the first application running data in the volatile storage unit, copying the first application running data from the volatile storage unit to the second non-volatile storage unit, and deleting the first application running data stored in the volatile storage unit; wherein, after copying the first application running data from the volatile storage unit to the second non-volatile storage unit and deleting the first application running data stored in the volatile storage unit, the method further includes: when it is necessary to restore the first application running data to the volatile storage unit, copying the first application running data in the second non-volatile storage unit to the volatile storage unit, and deleting the first application running data in the second non-volatile storage unit.
7. The method as described in claim 2, characterized in that, Before the electronic device enters a first state running an operating system, the method further includes at least two of three methods for controlling the electronic device to enter the first state: The first method involves copying the source program data of the operating system stored in the first non-volatile storage unit to the second non-volatile storage unit and running it, so that the electronic device enters the first state. The second method is to copy the source program data of the operating system stored in the first non-volatile storage unit to the volatile storage unit and run it, so that the electronic device enters the first state. The third method involves copying the source program data of the operating system stored in the first non-volatile storage unit to the second non-volatile storage unit and the volatile storage unit, and then running the copy to allow the electronic device to enter the first state.
8. An electronic device, comprising: The second non-volatile memory unit; A processing unit, connected to the second non-volatile memory unit, is configured to, when the electronic device is in a first state, obtain a first instruction, wherein, in the first state, the second non-volatile memory unit, which serves as memory, is in a powered state, and the second non-volatile memory unit stores at least a portion of system operation data during operating system operation; and, based on the first instruction, the electronic device switches to a second state, wherein, in the second state, the second non-volatile memory unit is in a de-powered state, and the second non-volatile memory unit stores the system operation data stored in the second non-volatile memory unit before obtaining the first instruction, so that the electronic device, in the second state, can obtain and, according to the second instruction, switch the electronic device to the first state based on the system operation data stored in the second non-volatile memory unit; the first state is the normal operating state of the electronic device, and the second state is the standby state of the electronic device; The electronic device further includes a first non-volatile storage unit, wherein the first read / write speed of the first non-volatile storage unit is lower than the second read / write speed of the second non-volatile storage unit, and the first non-volatile storage unit can store at least the source program data of the operating system. When the electronic device is in the first state, it runs an operating system. Before the electronic device is in the first state, the processing unit is further configured to: copy at least a portion of the source program data of the operating system stored in the first non-volatile storage unit to the second non-volatile storage unit and run it, and store the running data of the at least a portion of the data in the second non-volatile storage unit, so that the electronic device enters the first state.
9. An electronic device, comprising: chassis; The circuit board is disposed inside the housing; A second non-volatile memory cell is disposed on the circuit board; A processor, disposed on the circuit board and connected to the second non-volatile memory unit, is configured to obtain a first instruction when the electronic device is in a first state, wherein the second non-volatile memory unit, which serves as memory, is powered in the first state and stores at least a portion of system operation data during operating system operation. Based on the first instruction, the electronic device switches to a second state, wherein the second non-volatile memory unit is unpowered in the second state and stores the system operation data stored in the second non-volatile memory unit before obtaining the first instruction, so that the electronic device, in the second state, can obtain and, according to the second instruction, switch the electronic device to the first state based on the system operation data stored in the second non-volatile memory unit; the first state is the normal operating state of the electronic device, and the second state is the standby state of the electronic device. The electronic device further includes a first non-volatile storage unit, wherein the first read / write speed of the first non-volatile storage unit is lower than the second read / write speed of the second non-volatile storage unit, and the first non-volatile storage unit can store at least the source program data of the operating system. When the electronic device is in the first state, it runs an operating system. Before the electronic device is in the first state, the processor is further configured to: copy at least a portion of the source program data of the operating system stored in the first non-volatile storage unit to the second non-volatile storage unit and run it, and store the running data of the at least a portion of the data in the second non-volatile storage unit, so that the electronic device enters the first state.