System configuration method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202210675189.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2042-06-15
AI Technical Summary
[0004]在研发过程中,发明人发现至少存在以下技术问题:在Windows系统盘中新增分区的情况下,无法执行恢复出厂设置操作
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the system configuration method described in any embodiment of the present invention.
Smart Images

Figure CN117270889B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of system installation technology, and in particular to a system configuration method, apparatus, electronic device, and storage medium. Background Technology
[0002] Nowadays, computers are increasingly being used in people's lives in the electronics industry.
[0003] Currently, computers are equipped with an operating system before leaving the factory, and operations such as disk partitioning and factory reset are performed.
[0004] During the research and development process, the inventors discovered at least the following technical problem: when a new partition is added to the Windows system disk, it is impossible to perform a factory reset operation. Summary of the Invention
[0005] This invention provides a system configuration method, apparatus, electronic device, and storage medium to enable factory reset when a new partition is added to the system.
[0006] According to one aspect of the present invention, a system configuration method is provided, applied to an electronic device, the electronic device comprising: a processor and a memory communicatively connected to the processor; the memory comprising a pre-created system virtual partition and a non-system virtual partition, the method comprising:
[0007] Get information on newly added partitions in the system;
[0008] Based on the newly added partition information of the system, a target system partition is created in the system virtual partition;
[0009] Once the target system partition is created, system recovery information is obtained, and the electronic device is restored to its factory default state based on the system recovery information. The system recovery information includes recovery information for the system virtual partition.
[0010] According to another aspect of the present invention, a system configuration apparatus is provided for an electronic device, the electronic device comprising: a processor and a memory communicatively connected to the processor; the memory comprising a pre-created system virtual partition and a non-system virtual partition, the apparatus comprising:
[0011] The partition information acquisition module is used to acquire information about newly added partitions in the system;
[0012] The system partition creation module is used to create a target system partition in the system virtual partition based on the newly added partition information of the system.
[0013] The factory reset module is used to obtain system reset information after the target system partition is created, and restore the electronic device to the factory preset state based on the system reset information, wherein the system reset information includes the system virtual partition reset information.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0015] At least one processor; and
[0016] A memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the system configuration method according to any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the system configuration method described in any embodiment of the present invention.
[0019] The technical solution of this invention obtains information about newly added system partitions and creates a new target system partition in the system virtual partition based on the information about newly added system partitions. This allows for the creation of a new system partition while keeping the location of the partition storing system recovery information unchanged. As a result, once the target system partition is created, system recovery information can be effectively obtained from the original partition location, and the electronic device can be restored to its factory default state based on the system recovery information.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of a system configuration method provided according to Embodiment 1 of the present invention;
[0023] Figure 2This is a flowchart of a system configuration method provided according to Embodiment 2 of the present invention;
[0024] Figure 3 This is a schematic diagram of a system configuration device according to Embodiment 3 of the present invention;
[0025] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the system configuration method of the present invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] Example 1
[0029] Figure 1 This is a flowchart of a system configuration method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where electronic devices are restored to factory settings. The method can be executed by a system configuration device, which can be implemented in hardware and / or software and can be configured within the electronic device. Figure 1 As shown, the method includes:
[0030] S110, Get information on newly added system partitions.
[0031] S120. Based on the newly added partition information of the system, create a target system partition in the system virtual partition.
[0032] S130. After the target system partition is created, obtain system recovery information, and restore the electronic device to the factory default state based on the system recovery information, wherein the system recovery information includes recovery information of the system virtual partition.
[0033] In this embodiment of the invention, the electronic device includes a processor and a memory communicatively connected to the processor. The memory may include pre-created system virtual partitions and non-system virtual partitions. A system virtual partition refers to a virtual disk partition within the system partition, without a set disk space size. In contrast, a non-system virtual partition is a real disk partition with a set disk space size. The system partition refers to the partition where an operating system is installed, such as a Windows operating system partition.
[0034] The system's newly added partition information refers to the request information for creating a new partition within the system partition. This may include, but is not limited to, the partition's identifier, name, and disk space size. System recovery information refers to the request information for restoring the electronic device to its factory default state. This system recovery information may include recovery information for the system virtual partition; in other words, it allows the electronic device's storage to be restored to a state before any new partitions were created. The target system partition refers to the newly created partition within the system virtual partition. It's important to note that the system virtual partition is a virtual disk partition created within the system partition, without any allocated disk space. In other words, the target system partition occupies the space of the system virtual partition and is essentially a newly created partition within the system partition.
[0035] For example, the system can add partition information as "Create DISK Partitions". After receiving "Create DISK Partitions", the electronic device can automatically create a new DISK partition in the system virtual partition. Once the DISK partition is created, the electronic device responds to the user-inputted Recoververy command, retrieves system recovery information from a preset path, and restores the electronic device to its factory default state based on the system recovery information. It can be understood that by automatically creating a new DISK partition in the system virtual partition, i.e., occupying the space of the system virtual partition, the location of the partition storing system recovery information remains unchanged. Therefore, once the DISK partition is created, system recovery information can be effectively retrieved from the original partition location, and the electronic device can be restored to its factory default state based on the system recovery information.
[0036] The technical solution of this invention obtains information about newly added system partitions and creates a new target system partition in the system virtual partition based on the information about newly added system partitions. This allows for the creation of a new system partition while keeping the location of the partition storing system recovery information unchanged. As a result, once the target system partition is created, system recovery information can be effectively obtained from the original partition location, and the electronic device can be restored to its factory default state based on the system recovery information.
[0037] Example 2
[0038] Figure 2 This is a flowchart of a system configuration method provided in Embodiment 2 of the present invention. This embodiment adds new technical features based on the above embodiments. Optionally, before obtaining the newly added system partition information, the method further includes: obtaining a system configuration file, wherein the system configuration file includes virtual partition information; and creating a system virtual partition in the memory based on the virtual partition information.
[0039] like Figure 2 As shown, the method includes:
[0040] S210. Obtain the system configuration file, wherein the system configuration file includes virtual partition information.
[0041] S220. Create a system virtual partition in the memory based on the virtual partition information.
[0042] S230, Obtain information on newly added system partitions.
[0043] S240. Based on the newly added partition information of the system, create a target system partition in the system virtual partition.
[0044] S250. After the target system partition is created, obtain system recovery information, and restore the electronic device to the factory default state based on the system recovery information, wherein the system recovery information includes recovery information of the system virtual partition.
[0045] In this embodiment of the invention, the system configuration file refers to the configuration file required for system installation on an electronic device. For example, the system configuration file can be an HDI configuration file. The system configuration file may include, but is not limited to, virtual partition information, MSR partition, ESP partition, WinRE partition, and Reset partition. Virtual partition information refers to the virtual partition configuration information pre-configured in the system configuration file.
[0046] Based on the above embodiments, the step of obtaining the system configuration file includes: receiving a system configuration file sent by a server, wherein the server is communicatively connected to the electronic device.
[0047] The server can be a server that stores information such as system configuration files.
[0048] Specifically, the server can transmit the system configuration file to one or more electronic devices via wired or wireless means, and each electronic device can receive the system configuration file simultaneously.
[0049] Based on the above embodiments, the memory includes a system partition and a non-system partition, and the step of creating a system virtual partition in the memory based on the virtual partition information includes: creating a system virtual partition in the system partition based on the virtual partition information.
[0050] The system partition refers to the partition where the operating system is installed, such as the Windows operating system partition. Non-system partitions refer to partitions other than the system partition, such as MSR partitions, ESP partitions, WinRE partitions, and Reset partitions.
[0051] For example, the virtual partition information can be "rem == Virtual partition; rem == a. Create the Virtual partition; sel partition 3; create virtual partitions"; where Virtual partition represents a virtual partition, and partition 3 can be a Windows partition, that is, the system virtual partition can be created in the Windows partition.
[0052] Understandably, if users want to create a new partition in the Windows partition later, they can use the system virtual partition to create it. This way, the location of the partition storing system recovery information will not change. Thus, once the target system partition is created, the system recovery information can be effectively obtained, and the electronic device can be restored to its factory default state based on the system recovery information.
[0053] The technical solution of this invention obtains a system configuration file containing virtual partition information and creates a system virtual partition in the memory based on the virtual partition information. This provides security for subsequent addition of system partitions and acquisition of system recovery information, enabling electronic devices to effectively acquire system recovery information when adding system partitions, thereby improving system stability and security.
[0054] Example 3
[0055] Figure 3 This is a schematic diagram of a system configuration device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes:
[0056] Partition information acquisition module 310 is used to acquire information about newly added partitions in the system;
[0057] The system partition creation module 320 is used to create a target system partition in the system virtual partition based on the newly added partition information of the system.
[0058] The factory state recovery module 330 is used to obtain system recovery information after the target system partition is created, and restore the electronic device to the factory preset state based on the system recovery information, wherein the system recovery information includes recovery information of the system virtual partition.
[0059] The technical solution of this invention obtains information about newly added system partitions and creates a new target system partition in the system virtual partition based on the information about newly added system partitions. This allows for the creation of a new system partition while keeping the location of the partition storing system recovery information unchanged. As a result, once the target system partition is created, system recovery information can be effectively obtained from the original partition location, and the electronic device can be restored to its factory default state based on the system recovery information.
[0060] In some optional implementations of the embodiments of the present invention, the apparatus further includes:
[0061] The configuration file acquisition module is used to acquire the system configuration file, wherein the system configuration file includes virtual partition information;
[0062] A virtual partition creation module is used to create a system virtual partition in the memory based on the virtual partition information.
[0063] In some optional implementations of this invention, the configuration file acquisition module is further configured to:
[0064] The system configuration file is received from the server, wherein the server is communicatively connected to the electronic device.
[0065] In some optional implementations of this invention, the memory further includes a system partition and a non-system partition, and the virtual partition creation module is further configured to:
[0066] A system virtual partition is created in the system partition based on the virtual partition information.
[0067] The system configuration device provided in the embodiments of the present invention can execute the system configuration method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0068] Example 4
[0069] Figure 4A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0070] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0071] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0072] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the system configuration method, which includes:
[0073] Get information on newly added partitions in the system;
[0074] Create the target system partition in the system virtual partition based on the newly added partition information of the system;
[0075] Once the target system partition is created, system recovery information is obtained, and the electronic device is restored to its factory default state based on the system recovery information. The system recovery information includes recovery information for the system virtual partition.
[0076] In some embodiments, the system configuration method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the system configuration method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the system configuration method by any other suitable means (e.g., by means of firmware).
[0077] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0078] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0079] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0080] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0081] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0082] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0083] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0084] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A system configuration method, characterized in that, Applied to an electronic device, the electronic device comprising: a processor and a memory communicatively connected to the processor; the memory comprising a pre-created system virtual partition and a non-system virtual partition, the method comprising: Get information on newly added partitions in the system; Based on the newly added partition information of the system, a target system partition is created in the system virtual partition; Once the target system partition is created, system recovery information is obtained, and the electronic device is restored to its factory default state based on the system recovery information. The system recovery information includes recovery information for the system virtual partition.
2. The method according to claim 1, characterized in that, Before obtaining the newly added partition information of the system, the method further includes: Obtain the system configuration file, wherein the system configuration file includes virtual partition information; A system virtual partition is created in the memory based on the virtual partition information.
3. The method according to claim 2, characterized in that, The process of obtaining the system configuration file includes: The system configuration file is received from the server, wherein the server is communicatively connected to the electronic device.
4. The method according to claim 2, characterized in that, The memory includes system partitions and non-system partitions. Creating a system virtual partition in the memory based on the virtual partition information includes: A system virtual partition is created in the system partition based on the virtual partition information.
5. A system configuration device, characterized in that, Applied to an electronic device, the electronic device comprising: a processor and a memory communicatively connected to the processor; the memory including a pre-created system virtual partition and a non-system virtual partition, the device comprising: The partition information acquisition module is used to acquire information about newly added partitions in the system; The system partition creation module is used to create a target system partition in the system virtual partition based on the newly added partition information of the system. The factory reset module is used to obtain system reset information after the target system partition is created, and restore the electronic device to the factory preset state based on the system reset information, wherein the system reset information includes the system virtual partition reset information.
6. The apparatus according to claim 5, characterized in that, The device further includes: The configuration file acquisition module is used to acquire the system configuration file, wherein the system configuration file includes virtual partition information; The virtual partition creation module creates a system virtual partition in the memory based on the virtual partition information.
7. The apparatus according to claim 6, characterized in that, The configuration file acquisition module is also used for: The system configuration file is received from the server, wherein the server is communicatively connected to the electronic device.
8. The apparatus according to claim 6, characterized in that, The memory also includes system partitions and non-system partitions; the virtual partition creation module is further used for: A system virtual partition is created in the system partition based on the virtual partition information.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the system configuration method according to any one of claims 1-4.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the system configuration method according to any one of claims 1-4.
Citation Information
Patent Citations
Method for backing up and restoring data based on computer hard disc partitions
CN101546295A
In-place virtualization during operating system installation
US20110208929A1