Automatic partitioning method, disk partitioning method, operating system installation method and device

By calculating the static and dynamic space occupied by the operating system software, the backup partition space size is automatically determined, solving the problem of backup partition failure or unreasonable partitioning caused by manual partitioning in the existing technology, and realizing efficient automatic partitioning and installation.

CN114741031BActive Publication Date: 2026-01-13UNIONTECH SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210321737.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2026-01-13
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

In existing operating system installation techniques, the allocation of backup partition space relies on manual operation, which is easily influenced by experience, leading to partitioning failures or unreasonable partitioning, and automatic partitioning cannot be achieved.

Method used

By calculating the static and dynamic space occupied by the operating system software, the backup partition space size is automatically determined, and the disk space is automatically divided in combination with the disk space size, providing an automatic partitioning method, a disk partitioning method, and an operating system installation method.

Benefits of technology

It eliminates the need for manual partitioning of backup partitions, avoiding partitioning failures or improper configurations due to lack of experience, thus improving work efficiency, especially saving time when processing multiple machines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114741031B_ABST
    Figure CN114741031B_ABST
Patent Text Reader

Abstract

The application discloses an automatic partitioning method, a disk partitioning method, an operating system installation method and device. The automatic partitioning method comprises the following steps: obtaining the disk space size of a disk for installing an operating system during the installation of the operating system; obtaining the static occupied space size and the dynamic occupied space size of each software in one or more software corresponding to the operating system to be installed; calculating the sum of the static occupied space size and the dynamic occupied space size of all the software in the one or more software as a unit reference space size; and determining the backup partition space size to complete the automatic partitioning of the backup partition by comparing the disk space size with the unit reference space size. The disk partitioning method and the operating system installation method are further realized based on the automatic partitioning method to realize the partitioning of the disk and the installation of the operating system. The application also discloses corresponding computing devices and devices.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer technology, and in particular to an automatic partitioning method, a disk partitioning method, an operating system installation method and device. BACKGROUND

[0002] In the existing operating system installation technology, when installing an operating system on a disk, in order to ensure the reliability of the system, a backup partition is partitioned for backing up system data.

[0003] At present, the existing operating system installation technology is to manually partition the backup partition space size.

[0004] This way of manually partitioning the backup partition space size is easily affected by the operator's experience, which can easily lead to partition failure or be unreasonable, and cannot achieve automatic partitioning of the backup partition. SUMMARY

[0005] Therefore, the present application provides an automatic partitioning method, a disk partitioning method, an operating system installation method and device to try to solve or at least alleviate at least one of the above problems.

[0006] According to a first aspect of the present application, an automatic partitioning method of a backup partition is provided, comprising: obtaining a disk space size of a disk for installing an operating system during installation of the operating system; obtaining a static occupied space size and a dynamic occupied space size of each software in one or more software corresponding to the operating system to be installed according to the one or more software; calculating the sum of the static occupied space size and the dynamic occupied space size of all software in the one or more software as a unit reference space size; and determining a backup partition space size by comparing the disk space size with the unit reference space size to complete automatic partitioning of the backup partition.

[0007] Optionally, in the automatic partitioning method of the backup partition of the present application, the step of determining the backup partition space size to complete the automatic partitioning of the backup partition comprises: if the disk space size is less than or equal to the unit reference space size, determining that the partitioning fails; if the disk space size is greater than the unit reference space size and less than a first preset multiple of the unit reference space size, determining the backup partition space size as 0; and if the disk space size is greater than or equal to the first preset multiple of the unit reference space size, determining the backup partition space size equal to a preset value.

[0008] Optionally, in the automatic partitioning method of the backup partition of the present application, the first preset multiple is a real number greater than or equal to 2.

[0009] Optionally, in the automatic backup partition division method of the application, if the disk space is greater than or equal to a first preset multiple of the unit reference space and less than a second preset multiple of the unit reference space, the size of the backup partition space is equal to a first preset value, wherein the second preset multiple is greater than the first preset multiple; if the disk space is greater than or equal to the second preset multiple of the unit reference space and less than a disk space threshold, the size of the backup partition space is equal to a second preset value; and if the disk space is greater than or equal to the disk space threshold, the size of the backup partition space is equal to a third preset value.

[0010] Optionally, in the automatic backup partition division method of the application, the second preset multiple is a real number greater than or equal to 2.

[0011] Optionally, in the automatic backup partition division method of the application, the disk space threshold is equal to a third preset multiple of the size of the unit reference space, the third preset multiple is greater than the second preset multiple; the first preset value is equal to the size of the unit reference space; the second preset value is equal to half of the difference between the size of the disk space and the size of the unit reference space; and the third preset value is equal to half of the size of the third preset multiple of the unit reference space.

[0012] Optionally, in the automatic backup partition division method of the application, the disk space threshold is determined by: determining a backup specification in advance; taking the size of the disk space required for a corresponding number of backups of the operating system according to the backup specification as a pre-backup partition threshold; and determining the size of the disk space corresponding to the pre-backup partition threshold as the disk space threshold according to the pre-backup partition threshold.

[0013] Optionally, in the automatic backup partition division method of the application, the first preset value is equal to the size of the unit reference space; the second preset value is equal to log2(x-1), wherein x represents the size of the disk space; and the third preset value is equal to the pre-backup partition threshold.

[0014] Optionally, in the automatic backup partition division method of the application, the step of determining the size of the disk space corresponding to the pre-backup partition threshold as the disk space threshold comprises: substituting the obtained pre-backup partition threshold as a value of y into the formula y=log2(x-1) to obtain an x value, which is the disk space threshold.

[0015] According to a second aspect of the present application, there is also provided a disk partitioning method, comprising: determining a backup partition space size of a disk as backup partition information according to the automatic backup partitioning method as described above during an operating system installation; obtaining other partition information of the disk; and completing partitioning of the disk according to the other partition information of the disk and the backup partition information.

[0016] According to a third aspect of the present application, there is also provided an operating system installation method, comprising: in response to an operating system installation request of a user, prompting the user to select software to be installed and receiving input of the user; determining a backup partition space size of a disk as backup partition information according to the automatic backup partitioning method as described above; obtaining other partition information of the disk; completing partitioning of the disk according to the other partition information of the disk and the backup partition information; and installing the operating system corresponding to one or more software to be installed to the disk to complete installation of the operating system.

[0017] According to a fourth aspect of the present application, there is also provided an automatic backup partitioning apparatus, comprising: a disk space obtaining unit adapted to obtain a disk space size of a disk for installing an operating system during an operating system installation; a software occupied space obtaining unit adapted to obtain a static occupied space size and a dynamic occupied space size of each of one or more software corresponding to the operating system to be installed according to the one or more software; a calculating unit adapted to calculate a sum of the static occupied space size and the dynamic occupied space size of all software in the one or more software as a unit reference space size; and a backup space determining unit adapted to determine a backup partition space size to complete automatic backup partitioning by comparing the disk space size with the unit reference space size.

[0018] According to a fifth aspect of the present application, there is also provided a partitioning apparatus, comprising: a disk space obtaining unit adapted to obtain a disk space size of a disk for installing an operating system during an operating system installation; a software occupied space obtaining unit adapted to obtain a static occupied space size and a dynamic occupied space size of each of one or more software corresponding to the operating system to be installed according to the one or more software; a calculating unit adapted to calculate a sum of the static occupied space size and the dynamic occupied space size of all software in the one or more software as a unit reference space size; a backup space obtaining unit adapted to determine a backup partition space size as backup partition information by comparing the disk space size with the unit reference space size; and a partitioning unit adapted to obtain other partition information of the disk to complete partitioning of the disk according to the other partition information of the disk and the backup partition information.

[0019] According to a sixth aspect of the present application, there is also provided an operating system installation apparatus comprising: an interaction unit adapted to prompt a user to select software to be installed and receive the user's input in response to the user's operating system installation request; a disk space obtaining unit adapted to obtain a disk space size of a disk for installing the operating system during the operating system installation; a software footprint obtaining unit adapted to obtain a static footprint size and a dynamic footprint size of each of one or more software corresponding to the operating system to be installed; a calculation unit adapted to calculate a sum of the static footprint size and the dynamic footprint size of all the software as a unit reference space size; a backup space obtaining unit adapted to determine a backup partition space size as backup partition information by comparing the disk space size with the unit reference space size; a partition unit adapted to obtain other partition information of the disk to complete partitioning of the disk according to the other partition information of the disk and the backup partition information; and an installation unit adapted to install the one or more software corresponding to the operating system to be installed to the disk to complete installation of the operating system.

[0020] According to a seventh aspect of the present application, there is also provided a computing device comprising at least one processor and a memory storing program instructions; when the program instructions are read and executed by the processor, the computing device is caused to perform the automatic backup partitioning method, the disk partitioning method or the operating system installation method as described above.

[0021] According to an eighth aspect of the present application, there is also provided a readable storage medium storing program instructions; when the program instructions are read and executed by a computing device, the computing device is caused to perform the automatic backup partitioning method, the disk partitioning method or the operating system installation method as described above.

[0022] According to the automatic partitioning method, the disk partitioning method, the operating system installation method, the respective apparatuses, the computing device and the storage medium of the present application, the backup partition is automatically determined or partitioned according to the static footprint size and the dynamic footprint size of the operating system software to be installed and the disk size, and at least one of the following advantages can be achieved: the user does not need to manually partition the backup partition; the situation that the backup partition is unreasonably partitioned or the partitioning fails due to insufficient experience or operation errors of the user is effectively avoided; the optimal backup partition size configuration is obtained to avoid overlarge or undersized backup partition; when multiple machines with the same configuration or different configurations are processed, the time spent by the staff in partitioning the backup partition can be greatly saved, and the work efficiency is greatly improved. BRIEF DESCRIPTION OF DRAWINGS

[0023] To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings. These aspects are indicative of various ways in which the principles disclosed herein can be practiced and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above- and other advantages of the present disclosure, as defined by the set of claims, will become

[0024] Figure 1 A possible application scenario of the automatic partitioning method of backup partition according to an embodiment of the present application is shown;

[0025] Figure 2 Another possible application scenario of the automatic partitioning method of backup partition according to an embodiment of the present application is shown;

[0026] Figure 3 A schematic diagram of a computing device according to an embodiment of the present application is shown;

[0027] Figure 4 A flow chart of an exemplary process of the automatic partitioning method of backup partition according to an embodiment of the present application is shown;

[0028] Figure 5 A process schematic diagram of the automatic partitioning of backup partition according to a preferred example of the present application is shown;

[0029] Figure 6 A principle schematic diagram of a possible way of determining the size of backup partition space is shown;

[0030] Figure 7 An algorithm curve schematic diagram of another possible way of determining the size of backup partition space is shown;

[0031] Figure 8 A flow chart of an exemplary process of the disk partitioning method according to an embodiment of the present application is shown;

[0032] Figure 9 A flow chart of an exemplary process of the operating system installation method according to an embodiment of the present application is shown;

[0033] Figure 10 A schematic diagram of an exemplary structure of the automatic partitioning device of backup partition according to an embodiment of the present application is shown;

[0034] Figure 11 A schematic diagram of an exemplary structure of the partitioning device according to an embodiment of the present application is shown;

[0035] Figure 12 A schematic diagram of an exemplary structure of the operating system installation device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0036] Exemplary embodiments of the present disclosure will be described in greater detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms without being limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be thoroughly and completely understood, and will fully convey the scope of the present disclosure to those skilled in the art.

[0037] Hereinafter, while most of the various embodiments of the present disclosure are described with the Linux operating system as an example, it is understood that the embodiments of the present disclosure are not limited thereto, and are equally applicable to other operating systems capable of applying the embodiments of the present disclosure, such as an operating system based on a Linux kernel, or other operating systems other than the Linux kernel, such as windows, macOS, etc.

[0038] As described above, when installing an operating system on hardware, in order to ensure the reliability of the system, the installer usually divides a backup partition for backing up system data. However, in the prior art, the size of the backup partition is manually configured by the system installation program, and the partition size is usually planned by professional operation and maintenance personnel and manually divided. In view of this problem, the present application provides an automatic partitioning method for a backup partition, Figure 1 A possible application scenario 100 of the automatic partitioning method for a backup partition is given.

[0039] As shown in Figure 1 When the user starts to install the operating system (S110), after determining the software to be installed (S120), the size of the backup partition is determined by the automatic partitioning method for a backup partition of the present application (S130), and other partition information (such as the partition information of the production partition other than the backup partition, such as the size, format type, etc.) is determined (S140). In this way, after partitioning the disk according to all the partition information of the above partitions (S150), the installation of the operating system and the software is completed (S160).

[0040] Of course, the above-mentioned automatic partitioning method for a backup partition of the present application can also be applied to other application scenarios, Figure 2 Another possible application scenario 200 of the automatic partitioning method for a backup partition is given. As shown in Figure 2As shown, in some examples, when the backup specification of the disk changes (for example, the original backup specification is 1 full backup, and then needs to be changed to 2 or more full backups), the backup partition can be automatically re-partitioned by the above-mentioned automatic backup partitioning method of the present application. When the user starts the re-partitioning operation (S210), the space size of the backup partition is determined by an automatic backup partitioning method of the present application (S220), and other partition information (such as the partition information of the production partition other than the backup partition, such as the space size, the format type, etc.) is determined (S230), so that the re-partitioning of the disk is completed according to all the partition information of the above-mentioned partitions (S240).

[0041] The above-mentioned automatic backup partitioning method of the present application includes: obtaining the disk space size of the disk for installing the operating system during the installation of the operating system; obtaining the static occupied space size and the dynamic occupied space size of each software in one or more software corresponding to the operating system to be installed; calculating the sum of the static occupied space size and the dynamic occupied space size of all software in the one or more software as a unit reference space size; and determining the backup partition space size by comparing the disk space size with the unit reference space size to complete the automatic backup partitioning.

[0042] Therefore, by the above-mentioned automatic backup partitioning method, the appropriate backup partition can be automatically determined or automatically partitioned according to the static occupied space size and the dynamic occupied space size of the software corresponding to the operating system to be installed and the disk size, without the need for the user to manually partition the backup partition, which can not cause unreasonable backup partitioning or partitioning failure due to insufficient user experience or operation errors.

[0043] In particular, when the staff needs to partition the backup partition of multiple machines with the same configuration (such as computers with the same disk space size and the same operating system software to be installed, etc.), or multiple machines with different configurations (such as computers with different disk space sizes and / or different operating system software to be installed, etc.), the staff can greatly save the time spent on partitioning the backup partition, and overcome the problems existing in the prior art.

[0044] The automatic backup partitioning method, the disk partitioning method, and the operating system installation method of the present application are executed in a computing device. The computing device can be any device with storage and computing capabilities, which can be implemented as a server, a workstation, etc., can be implemented as a desktop computer, a notebook computer, etc. personal computer, or can be implemented as a terminal device such as a mobile phone, a tablet computer, a smart wearable device, an Internet of Things device, etc., but is not limited thereto.

[0045] Figure 3A schematic diagram of a computing device 300 according to an embodiment of the present invention is shown. It should be noted that... Figure 3 The computing device 300 shown is merely an example. In practice, the computing device used to implement the automatic partitioning method for backup partitions, the disk partitioning method, and the operating system installation method of this invention can be any type of device, and its hardware configuration can be similar to... Figure 3 The computing device 300 shown is the same as, and can also be with Figure 3 The computing device 300 shown is different. In practice, the computing device used to implement the automatic partitioning method for backup partitions, the disk partitioning method, and the operating system installation method of the present invention can... Figure 3 The hardware components of the computing device 300 shown can be added or removed. This invention does not limit the specific hardware configuration of the computing device.

[0046] like Figure 3 As shown, in the basic configuration 302, the computing device 300 typically includes a system memory 306 and one or more processors 304. A memory bus 308 can be used for communication between the processors 304 and the system memory 306.

[0047] Depending on the desired configuration, processor 304 can be any type of processor, including but not limited to: microprocessor (μP), microcontroller (μC), digital information processor (DSP), or any combination thereof. Processor 304 may include one or more levels of cache such as L1 cache 310 and L2 cache 312, processor core 314, and registers 316. Example processor core 314 may include an arithmetic logic unit (ALU), floating-point unit (FPU), digital signal processing core (DSP core), or any combination thereof. Example memory controller 318 may be used with processor 304, or in some implementations, memory controller 318 may be an internal part of processor 304.

[0048] Depending on the desired configuration, system memory 306 can be any type of memory, including but not limited to volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. Physical memory in a computing device typically refers to volatile RAM; data on a disk needs to be loaded into physical memory before it can be read by processor 304. System memory 306 may include operating system 320, one or more applications 322, and program data 324. In some embodiments, applications 322 may be configured to execute instructions on the operating system using program data 324 by one or more processors 304. Operating system 320 may be, for example, Linux, Windows, etc., and includes program instructions for handling basic system services and performing hardware-dependent tasks. Applications 322 include program instructions for implementing various user-desired functions; applications 322 may be, for example, browsers, instant messaging software, software development tools (such as integrated development environments (IDEs), compilers, etc.), but are not limited to these. When applications 322 are installed in computing device 300, driver modules may be added to operating system 320.

[0049] When the computing device 300 starts up, the processor 304 reads the program instructions of the operating system 320 from the memory 306 and executes them. The application 322 runs on the operating system 320, utilizing the interfaces provided by the operating system 320 and the underlying hardware to implement various user-expected functions. When the user starts the application 322, the application 322 is loaded into the memory 306, and the processor 304 reads and executes the program instructions of the application 322 from the memory 306.

[0050] The computing device 300 also includes a storage device 332, which includes a removable storage device 336 and a non-removable storage device 338, both of which are connected to a storage interface bus 334.

[0051] The computing device 300 may also include an interface bus 340 that facilitates communication from various interface devices (e.g., output devices 342, peripheral interfaces 344, and communication devices 346) to the basic configuration 302 via a bus / interface controller 330. Example output devices 342 include a graphics processing unit 348 and an audio processing unit 350. They may be configured to facilitate communication with various external devices such as displays or speakers via one or more A / V ports 352. Example peripheral interfaces 344 may include a serial interface controller 354 and a parallel interface controller 356, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, pens, voice input devices, touch input devices) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 358. Example communication devices 346 may include a network controller 360, which may be arranged to facilitate communication with one or more other computing devices 362 via a network communication link through one or more communication ports 364.

[0052] A network communication link can be an example of a communication medium. A communication medium can typically be embodied in a modulated data signal, such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A “modulated data signal” can be a signal whose data set, or whose modifications, can be encoded with information within the signal. As a non-limiting example, a communication medium can include wired media such as wired networks or leased lines, and various wireless media including sound, radio frequency (RF), microwave, infrared (IR), or other wireless media. The term “computer-readable medium” as used herein can include both storage media and communication media.

[0053] In the computing device 300 according to the present invention, application 322 includes instructions for executing the automatic partitioning method, disk partitioning method and operating system installation method of the present invention. The instructions can instruct the processor 304 to execute the above-mentioned automatic partitioning method, disk partitioning method and operating system installation method of the present invention to realize automatic partitioning of backup partitions, disk partitioning and operating system installation applicable to operating systems such as Linux and Windows.

[0054] Figure 4 A flowchart of an automatic backup partitioning method 400 according to an embodiment of the present invention is shown. The automatic backup partitioning method 400 is executed in a computing device (e.g., the aforementioned computing device 300), and the automatic backup partitioning method 400 of the present invention may include steps S410 to S440.

[0055] likeFigure 4 As shown, in step S410, during the operating system installation, the disk space size of the disk used to install the operating system is obtained.

[0056] For example, a user needs to install an operating system on a piece of hardware, such as a desktop computer, laptop computer, or server, which contains storage devices such as hard drives or other types of disks.

[0057] The operating system to be installed can be Linux or a Linux kernel-based operating system, or it can be other non-Linux kernel operating systems such as Windows or macOS.

[0058] Furthermore, the disk space size of the disk used to install the aforementioned operating system can be obtained, for example, through existing technologies such as commands to obtain the disk space size, which will not be elaborated here.

[0059] Step S420: Based on the one or more software programs to be installed corresponding to the above operating system (also referred to as "one or more software programs to be installed"), obtain the static space occupied and dynamic space occupied of each of the one or more software programs.

[0060] As an example, the software to be installed can include two types of software: one type is the mandatory software that is installed by default when installing the above operating system. This type of software is required and cannot be unchecked by the user. For example, the absence of this software will cause the operating system installation to fail or not to run. The other type is the software that the user can choose to install when installing the above operating system. This is optional software, such as some pre-installed office software, multimedia playback software, etc.

[0061] In addition, the one or more software programs to be installed (such as MariaDB, WPS, etc.) may include user-mode software and / or kernel-mode software.

[0062] Before executing step S420, the user has already selected the optional software to be installed. Thus, these optional software and the mandatory software installed by default constitute one or more software programs to be installed.

[0063] The static storage space occupied by software refers to the amount of space occupied by the software when it is not running. The static storage space occupied by software can be obtained, for example, from relevant information about the software, or from experience or historical data, or through experimentation.

[0064] The dynamic memory footprint of software refers to the incremental change in memory usage relative to the static memory footprint of the software while it is running. The dynamic memory footprint can be determined, for example, based on relevant software information, experience, historical data, or through experimentation.

[0065] For example, in historical data, the maximum dynamic increment of a software's space relative to its static space can be used as the software's dynamic space size. This ensures a successful full system backup after allocating the corresponding backup partition space.

[0066] For example, the minimum dynamic increment of the software relative to its static space can be used as the dynamic space size of the software. In this way, when the disk space is small and the system needs to be backed up, the system backup can be completed while ensuring the minimum requirements (the system with the minimum space required to be backed up), and it can be installed and run normally.

[0067] In addition, the software's dynamic storage space does not include business file data, such as generated chat logs.

[0068] Step S430: Calculate the sum of the static and dynamic space occupied by all software in one or more of the above software programs, and use it as the unit reference space size.

[0069] In one example, suppose that the mandatory software installed by default when installing the above operating system includes three mandatory software programs: A1, A2, and A3 (there may actually be more, not limited to the three mentioned in this example), and suppose that the user chooses to install two optional software programs: B1 and B2 (there may actually be fewer or more, not limited to the three mentioned in this example, for example, it could be 0, 1, or 10, etc.). Thus, the one or more software programs to be installed would be: mandatory software A1, mandatory software A2, mandatory software A3, optional software B1, and optional software B2.

[0070] Assuming that the static space occupied by software A1, A2, A3, B1, and B2 is known through any of the methods described above as 1G, 1.2G, 1.8G, 3.5G, and 2.5G respectively, and the dynamic space occupied by software A1, A2, A3, B1, and B2 is known as 0.1G, 0.2G, 0.8G, 0.1G, and 0.3G respectively, then the sum of the static and dynamic space occupied by all software in one or more of the above software programs is:

[0071] 1G+1.2G+1.8G+3.5G+2.5G+0.1G+0.2G+0.8G+0.1G+0.3G=11.5G.

[0072] Thus, in this example, the unit reference space size is 11.5G.

[0073] It should be noted that the "G" in 1G, 1.2G, etc., mentioned here represents the storage unit, namely GB, where 1GB = 1024MB.

[0074] Step S440: By comparing the disk space size with the unit reference space size, the backup partition space size is determined to complete the automatic partitioning of the backup partition.

[0075] For convenience and clarity, in the following text, "disc" will be used to represent disk space size, and "sys" will be used to represent unit reference space size.

[0076] As an example, the size of the backup partition can be determined in the following manner.

[0077] If the disk space size is less than or equal to the unit reference space size, that is, if disc ≤ sys, the current disk space size is insufficient to guarantee normal system operation, and the partitioning is deemed a failure. In other words, in this situation, when disc is less than sys, the operating system cannot be successfully installed, let alone backed up the partition, so the partitioning is deemed a failure; while when disc equals sys, even if the operating system can be installed, it cannot run normally, so the partitioning is also deemed a failure.

[0078] If the disk space size is greater than the unit reference space size but less than a first preset multiple of the unit reference space size, then the backup partition space size is set to 0. The first preset multiple can be, for example, a real number greater than or equal to 2. The first preset multiple can be represented by B1 below.

[0079] Preferably, the first preset multiple B1 can be, for example, 2. That is, if sys < disc < 2sys, then the size of the backup partition space is set to 0. In other words, in this case, the disk space size disc is greater than the unit reference space size sys, allowing the operating system to be successfully installed on the disk. However, since disc < 2sys, the remaining space is insufficient for a complete backup of the operating system (i.e., a full backup). Therefore, the size of the backup partition space is set to 0. In this case, the system can run, but cannot be backed up. If a backup space sufficient for a complete backup is partitioned from the disk space at this time, the operating system will not be able to be successfully installed and run.

[0080] Furthermore, the first preset multiple B1 can also be a real number greater than 2, such as 2.5 or 3. In this case, when it is determined that sys < disc < B1sys, the size of the backup partition space is set to 0. Here, B1sys represents B1 times sys.

[0081] If the disk space size is greater than or equal to a first preset multiple of the unit reference space size, then the size of the backup partition space will be set to the preset value.

[0082] For example, when the first preset multiple B1 is 2, that is, if disc ≥ 2sys, the size of the backup partition space is determined to be the preset value; or when the first preset multiple B1 is 2.5, that is, if it is determined that disc ≥ 2.5sys, the size of the backup partition space is determined to be the preset value; and so on.

[0083] As an example, based on the relationship between disk space size and unit reference space size, the preset value can be further divided into different corresponding preset values. The following describes the possible implementation methods for further dividing the preset value into different corresponding preset values.

[0084] In this implementation, if the disk space is greater than or equal to a first preset multiple of the unit reference space and less than a second preset multiple of the unit reference space, then the size of the backup partition space can be determined as the first preset value, where the second preset multiple is greater than the first preset multiple. The second preset multiple can be, for example, a real number greater than or equal to 2, such as 3.

[0085] If the disk space is greater than or equal to a second preset multiple of the unit reference space and less than the disk space threshold, then the size of the backup partition space can be determined as the second preset value.

[0086] If the disk space is greater than or equal to the disk space threshold, the size of the backup partition space can be set to the third preset value.

[0087] As an example, the disk space threshold is, for example, equal to a third preset multiple of the unit reference space size, where the third preset multiple is greater than a second preset multiple; the first preset value is, for example, equal to the size of the unit reference space; the second preset value is, for example, equal to half the difference between the disk space size and the unit reference space size; and the third preset value is, for example, equal to half the size of the third preset multiple of the unit reference space. The third preset multiple can be, for example, a real number greater than 2, such as 2.5, 2.7, 3, 3.5, 5, or 7.

[0088] In one example, when the disk space disc is greater than or equal to twice the unit reference space sys (as an example of the first preset multiple) and less than three times the unit reference space sys (as an example of the second preset multiple), that is, 2sys≤disc<3sys, the size of the backup partition space is determined to be the first preset value.

[0089] The first preset value can be set to sys, for example, or it can be set to any value within [sys, 1.5sys].

[0090] When the first preset value is set to sys, the disk space can be considered to consist of the following three components: the first component, with a size of sys, is used to install the operating system; the second component, with a size of sys, is used to perform a full backup of the operating system; and the third component, with a size of disc-2sys, is used to ensure the normal operation of the system and store data.

[0091] In this implementation, when the disk space disc is greater than or equal to 3 times the unit reference space sys (as an example of the second preset multiple) and less than the disk space threshold, the size of the backup partition space is determined to be the second preset value.

[0092] For example, when the disk space threshold is equal to a third preset multiple of the unit reference space size, assuming the third preset multiple is N, then when 3sys ≤ disc < Nsys, the size of the backup partition space is determined to be the second preset value, where N is a natural number greater than 3, representing a backup specification greater than 3. It should be understood that although N is a natural number greater than 3, the third preset multiple can also be other real numbers greater than 2, and is not limited to the natural numbers greater than 3 mentioned above.

[0093] For example, F can be used to represent the backup specification. When F=1, it means that the system will be backed up once at most. Similarly, when F=2 or F=3, it means that the system will be backed up twice or three times at most, respectively. When F=N, it means that the system will be backed up N times at most.

[0094] The second preset value is, for example, set to half the difference between the disk space size and the unit reference space size, i.e., (disk-sys) / 2. In this case, the disk space can be considered to consist of three parts. The first part, with a size of sys, is used to install the operating system, leaving disk-sys as the remaining space. The second part, with a size of (disk-sys) / 2 (half of the remaining space), is used to perform one or more backups of the operating system. Since disk is greater than or equal to 3sys, (disk-sys) / 2 is greater than or equal to sys. Therefore, setting the backup partition space size to (disk-sys) / 2 can complete at least one full backup. The third part, also with a size of (disk-sys) / 2 (the other half of the remaining space), is used to ensure the normal operation of the system and to store data.

[0095] The following describes three ways to back up your system.

[0096] In the first backup method, when backing up the system, for example, each backup can be set to store the backup data of the entire system (i.e., each backup is a full backup).

[0097] In the second backup method, when backing up the system, you can either perform a full backup of the entire system only on the first backup, and then store only the data that is different from the data in the previous backup on the i-th subsequent backup (where i is a natural number greater than 1 and less than or equal to the backup specification F). For example, suppose the data from the first full backup is D1, and the data from the second system backup is modified data Δd2, which differs from the data from the first full backup. For the user, when the second "full backup" data is needed, the system can replace the corresponding data in the first full backup data D1 with the modified data Δd2 from the second backup to obtain the second "full backup" data D2. Similarly, suppose the data from the third system backup is modified data Δd3, which differs from the data from the second backup. When the third "full backup" data is needed, the system can first replace the corresponding data in the first full backup data D1 with the modified data Δd2 from the second backup to obtain the second "full backup" data D2, and then replace the corresponding data in the second "full backup" data D2 with the modified data Δd3 from the third backup to obtain the third "full backup" data D3; and so on.

[0098] In the third backup method, when backing up the system, only the first backup performs a full system backup. Subsequent backups (where i is a natural number greater than 1 and less than or equal to the backup specification F) only store the data that differs from the first backup. For example, assuming the first full backup data is D1, and the second backup data is the modified data Δd2, which differs from the first full backup, then when the user needs the second "full backup" data, the system can replace the corresponding data in the first full backup data D1 with the modified data Δd2 stored in the second backup to obtain the second "full backup" data D2. Similarly, assuming the third backup data is Δd3, which differs from the first backup, then when the third "full backup" data is needed, the system can replace the corresponding data in the first full backup data D1 with the modified data Δd3 stored in the third backup to obtain the third "full backup" data D3; and so on.

[0099] Therefore, it can be seen that the embodiments of the present invention can use any of the above three backup methods to achieve one or more full backups.

[0100] In another example, the disk space threshold can be determined in the following way (hereinafter referred to as "disk space threshold acquisition method"): predetermine the backup specification; take the disk space required to perform the corresponding number of backups of the operating system according to the above backup specification (that is, the maximum number of backups of the operating system according to the backup specification) as the preset backup partition threshold; then, determine the size of the disk space corresponding to the preset backup partition threshold according to the preset backup partition threshold, as the disk space threshold.

[0101] It should be understood that the backups mentioned in the above "corresponding number of backups" or the backups mentioned in other embodiments of this application can all adopt any of the three backup methods described above.

[0102] In this example, the second preset value is set to, for example, log2(x-1), where x represents the disk space size (equivalent to the disc mentioned above, i.e., x equals disc). In this case, the disk space can be considered to consist of three components. The first component, with a size of sys, is used to install the operating system, leaving disk-sys as the remaining space. The second component, with a size of log2(x-1), is used to perform one or more backups of the operating system. The third component, also with a size of disk-sys-log2(x-1), is used to ensure the normal operation of the system and store data.

[0103] For example, if the predetermined backup specification is 5, then the maximum number of backups corresponding to this backup specification is 5. The disk space required to perform the corresponding number of backups (i.e., 5 backups) of the operating system according to this backup specification is used as the preset backup partition threshold. Then, the value of the preset backup partition threshold is substituted into y = log2(x-1), and the resulting x value is the disk space threshold.

[0104] Refer to the following description Figure 7 log2(x-1) corresponds to Figure 7 As shown in the DH segment curve, for an ever-increasing disk space size (x-axis), the backup partition size (y-axis) tends to grow at a slower and slower rate. This calculation of the disk space threshold is closer to actual needs. In other words, the relationship between disk space and backup partition space is not linear. When the backup partition space is already large enough, even if the disk space continues to increase, there is no need for the backup partition space to continue growing linearly, and it may even stop growing altogether. Therefore, this implementation method better meets practical requirements. Figure 7 In the example shown, the preset backup partition threshold is about 3.1 sys size, while the calculated disk space threshold is 10 sys size.

[0105] In addition, when the disk space (disc) is greater than or equal to the disk space threshold, the size of the backup partition space can be set to the third preset value.

[0106] In one example, the disk space threshold can be set to N times the unit reference space sys (as an example of the third preset multiple), that is, when disc ≥ Nsys, the third preset value can be set to any value in [Nsys / 2, Nsys].

[0107] For example, the third preset value can be set to half of N times the size of the unit reference space, i.e., Nsys / 2. In this case, the disk space can be considered to consist of three components. The first component, with a size of sys, is used to install the operating system, leaving disk space equal to disk-sys. The second component, with a size of Nsys / 2, is used to perform one or more backups of the operating system. Since disk is greater than or equal to Nsys (where N is greater than 3), Nsys / 2 is greater than 1.5 times sys. Therefore, setting the backup partition space size to Nsys / 2 can complete at least one full backup. The third component, with a size of disk-Nsys / 2-sys, is used to ensure the normal operation of the system and store data. In this case, although the disk space is larger than the size of N full backups, the backup partition size is not set to Nsys, but to Nsys / 2. This is to avoid wasting too much disk space on backups, which could lead to insufficient production partition space and affect operation. Alternatively, any of the three backup methods described above can be used. When the second or third backup method is used, the Nsys / 2 backup partition can complete multiple or even N backups of the system.

[0108] It should be understood that 2sys, 3sys, and Nsys mentioned above represent two times sys, three times sys, and N times sys, respectively.

[0109] In another example, when the disk space threshold is obtained using the "disk space threshold acquisition method" described above, the third preset value can be set to the aforementioned preset backup partition threshold (i.e., equal to the disk space required to perform the corresponding number of backups of the operating system according to the backup specifications, for example, denoted as T0). In this case, the disk space can be considered to consist of three components: the first component, sized as sys, is used to install the operating system, leaving disk-sys as the remaining space; the second component, sized as T0, is used to perform one or more backups of the operating system, not exceeding the number of backups specified; and the third component, sized as disk-T0-sys, is used to ensure the normal operation of the system and store data. In this case, the disk space is larger than Nsys. As can be seen from the description of the embodiments of the present invention, using the second or third method of the three backup methods described above, completing a full backup of the backup specification number of times does not require a space of Nsys size, and may not even require 2sys size. Therefore, when the disk space is larger than Nsys, the disk space is quite sufficient. Thus, enough space can be allocated to the backup partition for the maximum number of full backups. That is, the disk space required to perform the maximum number of backups of the operating system according to the backup specification is allocated on the disk as the space size of the backup partition. In this case, the disk space can still meet the needs of normal installation and operation of the operating system and storage of sufficient data.

[0110] Furthermore, the first to third preset values ​​mentioned above can also be modified according to actual needs.

[0111] Thus, when processing using the automatic partitioning method for backup partitions described above according to embodiments of the present invention, the user can be instructed to input the value of backup specification F before the partitioning operation, that is, to determine the maximum number of backups the current disk can perform on the system.

[0112] It should be understood that the steps in the above-described automatic partitioning method for backup partitions of the present invention are not limited to the above execution order, and can be reasonably changed, or processed in parallel, etc.

[0113] The following is combined Figure 5 and Figure 6 This is a preferred application example to describe the automatic partitioning method for the backup partitions described above. Figure 5 The logical flow for automatically partitioning backup partitions is given.

[0114] like Figure 5 As shown in the UML (Unified Modeling Language) diagram, when a user starts the installer, the interactive modules (such as...) on the device where the operating system is installed... Figure 5The interactive UI shown will prompt the user to select the software to install. For example, it will present the user with a list of optional business software, and determine which software to install based on the user's selection (mandatory software that must be installed is selected by default and cannot be unchecked). The business software mentioned here includes both mandatory and optional software as described above.

[0115] The partitioner queries the information of the software to be installed to obtain the static and dynamic space usage of that software. This information can be obtained in advance and stored in a pre-defined database, for example, as described above. Figure 5 The software information record library shown (equivalent to step S420 described above).

[0116] In addition, the disk space size on the device where the operating system is installed is obtained by calculating the disk space size (equivalent to step S410 described above).

[0117] In this way, the partitioner obtains the static and dynamic space usage sizes of these software programs returned from the software information record library and calculates their sum. Figure 5 The SoftInfo shown is given (equivalent to step S430 described above), and the disk space size returned from the disk is obtained. Figure 5 The DiskInfo shown above is sent to the backup partition size calculator for calculation to obtain the corresponding backup partition size (equivalent to step S440 described above). This backup partition information and other partition information are returned to the interactive UI as partition table information to complete the automatic partitioning.

[0118] like Figure 6 As shown, Figure 5 The obtained SoftInfo value is equivalent to Figure 6 In the sys. Thus, if the disk size is disk (i.e. Figure 5 The DiskInfo is less than or equal to sys (i.e., Figure 6 If the disk size is 1*sys, the current partition is considered a failure, and the reason will not be elaborated further. If the disk size is between 1*sys and 2*sys, the backup partition size is set to 0. If the disk size is between 2*sys and 3*sys, the backup partition size is set to sys. If the disk size is between 3*sys and N*sys, the backup partition size is set to (disk-sys) / 2. If the disk size is greater than N*sys, the backup partition size is set to N*sys / 2.

[0119] The following is combined Figure 7 Here is another preferred application example to describe the automatic partitioning method for backup partitions described above.Figure 7 The horizontal axis x represents the disk space size (disk), and the vertical axis y represents the backup partition size; both units are in sys. For example, Figure 7 In this context, 5.0 represents a size of 5 sys, 10.0 represents a size of 10 sys, and so on.

[0120] The difference from the previous preferred application example is that in this example, if the disk size (disk) is less than or equal to (sys), the current partitioning is considered a failure, and the disk space cannot guarantee normal system operation. Figure 7 The y-values ​​between the origin and point A are shown.

[0121] Furthermore, if the disk size is between 1*sys and 2*sys (excluding the endpoints), the backup partition size is set to 0. In this case, the remaining space is insufficient to perform a complete backup of the system. Figure 7 The y-value between point A and point B shown is 0.

[0122] If the disk size is between 2*sys and 3*sys (inclusive, exclusive), then the backup partition size should be set to sys. Figure 7 The y-value between point C and point D shown is sys.

[0123] If the disk size is between 3*sys and x I Between (including 3*sys, excluding x) I If the backup partition size is set to log2(x-1), then the backup partition size is set to log2(x-1). Figure 7 The y-value between point D and point H shown is log2(x-1), where x I for Figure 7 The x-coordinate of the midpoint I, and x I It is the value of x obtained when y = log2(x-1) = the preset backup partition threshold. Figure 5 In the context of the system, the preset backup partition threshold is the ordinate value corresponding to point G.

[0124] If the disk size (disk) is greater than x I The size of the backup partition is set to the preset backup partition threshold, which is the y-coordinate value corresponding to point G, taken from point H to the end, and the value is the preset backup partition threshold.

[0125] It should be noted that the automatic partitioning method for backup partitions in this invention can be achieved through methods such as... Figure 5 The process can be implemented through a portion of the partitioner and backup partition size calculator shown; or it can be implemented through the process in the entire operating system installation program. That is, the automatic partitioning method of the backup partition of the present invention and other related processes can be implemented by the corresponding subroutines in the operating system installation program.Figure 8 In the process, modules such as partitioners and backup size calculators are functional modules that implement the corresponding processing. In actual processing, the corresponding processing can also be performed by other functional modules.

[0126] Embodiments of the present invention also provide a disk partitioning method, comprising: during operating system installation, determining the size of the backup partition space of the disk according to the automatic partitioning method of the backup partition as described above, as backup partition information; obtaining other partition information of the disk (such as partition information of production partitions on the disk other than the backup partition, such as space size, format type, etc., which can be determined by user selection, or can be preset values ​​by default according to actual needs or experience); and completing the partitioning of the disk according to the other partition information of the disk and the backup partition information.

[0127] Figure 8 A possible processing flow of a disk partitioning method 800 according to an embodiment of the present invention is shown.

[0128] like Figure 8 As shown, in step S810, during operating system installation, the disk space size of the disk used to install the operating system is obtained. Next, step S820 is executed.

[0129] In step S820, based on the one or more software programs to be installed corresponding to the operating system, the static and dynamic space usage of each of the software programs is obtained. Next, step S830 is executed.

[0130] In step S830, the sum of the static and dynamic space occupied by all software in the one or more software programs mentioned above is calculated as the unit reference space size. Then, step S840 is executed.

[0131] In step S840, the backup partition size is determined by comparing the disk space size with the unit reference space size, and this is used as the backup partition information. Next, step S850 is executed.

[0132] In step S850, other partition information of the disk is obtained.

[0133] Finally, in step S860, the disk is partitioned based on the backup partition information and other partition information.

[0134] It should be noted that, Figure 4 Steps S810 to S840 in the disk partitioning method 800 shown can, for example, be executed in combination with the above-mentioned steps. Figure 9The automatic backup partitioning method 400 described herein employs similar processes as steps S410 to S440, and achieves similar functions and technical effects, which will not be elaborated upon here. Thus, using the disk partitioning method 800 according to an embodiment of the present invention, partitioning of hardware storage devices such as hard disks or other types of disks can be completed without manually dividing the backup partition size during this process.

[0135] An embodiment of the present invention also provides an operating system installation method, comprising: responding to a user's operating system installation request, prompting the user to select software to be installed, and receiving the user's input; determining the backup partition space size of the disk according to the automatic partitioning method of the backup partition as described above, as backup partition information; obtaining other partition information of the disk; completing the partitioning of the disk according to the other partition information of the disk and the backup partition information; and installing one or more software corresponding to the operating system to be installed onto the disk to complete the installation of the operating system.

[0136] Figure 9 This paper illustrates a possible processing flow for an operating system installation method 900 according to an embodiment of the present invention.

[0137] like Figure 9 As shown, in step S905, in response to the user's operating system installation request, the user is prompted to select the software to be installed, and the user's input is received. The user's input may be, for example, a command to select one or more optional installations.

[0138] Then, in step S910, during operating system installation, the disk space size of the disk used to install the operating system is obtained. Next, step S920 is executed.

[0139] In step S920, based on the one or more software programs to be installed on the operating system, the static and dynamic space usage of each of the aforementioned software programs is obtained. Next, step S930 is executed.

[0140] In step S930, the sum of the static and dynamic space occupied by all software in the aforementioned one or more software programs is calculated as the unit reference space size. Next, step S940 is executed.

[0141] In step S940, the backup partition size is determined by comparing the disk space size with the unit reference space size, and this is used as the backup partition information. Next, step S950 is executed.

[0142] In step S950, other partition information of the disk is obtained.

[0143] Next, in step S960, the disk is partitioned based on the backup partition information and other partition information.

[0144] Finally, in step S970, the operating system and one or more software programs corresponding to the software to be installed are installed to the disk to complete the installation of the operating system.

[0145] It should be noted that, Figure 8 Steps S910 to S960 in the operating system installation method 900 shown can be executed, for example, by combining the steps described above. Figure 10 The disk partitioning method 800 described herein employs similar processes (S810-S860) to achieve similar functions and technical effects, and will not be elaborated upon here. Thus, by utilizing the operating system installation method 900 according to an embodiment of the present invention, partitioning of hardware such as hard disks or other types of disks and installation of the operating system can be completed without manually dividing the backup partition size during this process.

[0146] Embodiments of the present invention also provide an automatic backup partitioning apparatus, comprising: a disk space acquisition unit, adapted to acquire the disk space size of the disk used to install the operating system during operating system installation; a software space acquisition unit, adapted to acquire the static space size and dynamic space size of each of the one or more software programs to be installed according to the operating system; a calculation unit, adapted to calculate the sum of the static space size and dynamic space size of all the software programs in the one or more software programs as a unit reference space size; and a backup space determination unit, adapted to determine the backup partition space size by comparing the disk space size with the unit reference space size to complete the automatic partitioning of the backup partition.

[0147] Figure 10 An exemplary structure of the automatic partitioning device 1000 for the aforementioned backup partition is shown.

[0148] like Figure 10 As shown, the automatic partitioning device 1000 for backup partitions includes a disk space acquisition unit 1010, a software space acquisition unit 1020, a calculation unit 1030, and a backup space determination unit 1040.

[0149] The disk space acquisition unit 1010 is adapted to acquire the disk space size of the disk used to install the operating system during the operating system installation process.

[0150] The software space acquisition unit 1020 is adapted to obtain the static space size and dynamic space size of each of the one or more software programs to be installed according to the operating system.

[0151] The calculation unit 1030 is adapted to calculate the sum of the static and dynamic space occupied by all software in one or more of the above software programs, and use it as a unit reference space size.

[0152] The backup space determination unit 1040 is adapted to determine the backup partition space size by comparing the disk space size with the unit reference space size in order to complete the automatic partitioning of the backup partition.

[0153] It should be noted that, Figure 4 The components of the automatic partitioning device 1000 for backup partitions shown can, for example, perform the operations described above in conjunction with... Figure 11 The steps in the automatic partitioning method 400 described are similar to those in the other steps and can achieve similar functions and technical effects, so they will not be described in detail here.

[0154] Embodiments of the present invention also provide a partitioning device, comprising: a disk space acquisition unit, adapted to acquire the disk space size of a disk used to install the operating system during operating system installation; a software space acquisition unit, adapted to acquire the static space size and dynamic space size of each of the one or more software programs to be installed according to the operating system; a calculation unit, adapted to calculate the sum of the static space size and dynamic space size of all the software programs in the one or more software programs as a unit reference space size; a backup space acquisition unit, adapted to determine a backup partition space size by comparing the disk space size with the unit reference space size as backup partition information; and a partitioning unit, adapted to acquire other partition information of the disk to complete the partitioning of the disk according to the other partition information of the disk and the backup partition information.

[0155] Figure 11 An exemplary structure of the partitioning device 1100 described above is shown.

[0156] like Figure 11 As shown, the partitioning device 1100 includes a disk space acquisition unit 1110, a software space acquisition unit 1120, a computing unit 1130, a backup space acquisition unit 1140, and a partitioning unit 1150.

[0157] The disk space acquisition unit 1110 is adapted to acquire the disk space size of the disk used to install the operating system during the operating system installation process.

[0158] The software space acquisition unit 1120 is adapted to obtain the static space size and dynamic space size of each of the one or more software programs to be installed according to the operating system.

[0159] The calculation unit 1130 is adapted to calculate the sum of the static and dynamic space occupied by all software in one or more of the above software programs, and use it as a unit reference space size.

[0160] The backup space acquisition unit 1140 is adapted to determine the backup partition space size by comparing the disk space size with the unit reference space size, and use this as backup partition information.

[0161] Partition unit 1150 is adapted to obtain other partition information of the disk in order to complete the partitioning of the disk based on the other partition information and backup partition information.

[0162] It should be noted that, Figure 8 Each component of the partitioning device 1100 shown can, for example, perform the combined functions described above. Figure 12 The disk partitioning method 800 described herein has similar processing steps and can achieve similar functions and technical effects, which will not be elaborated here.

[0163] Embodiments of the present invention also provide an operating system installation apparatus, comprising: an interaction unit, adapted to respond to a user's operating system installation request, prompting the user to select software to be installed, and receiving user input; a disk space acquisition unit, adapted to acquire, during operating system installation, the disk space size of the disk used to install the operating system; a software space acquisition unit, adapted to acquire, based on the one or more software programs to be installed corresponding to the operating system, the static space size and dynamic space size of each of the one or more software programs; a calculation unit, adapted to calculate the sum of the static space size and dynamic space size of all the software programs in the one or more software programs, as a unit reference space size; a backup space acquisition unit, adapted to determine the backup partition space size by comparing the disk space size with the unit reference space size, as backup partition information; a partitioning unit, adapted to acquire other partition information of the disk, so as to complete the partitioning of the disk based on the other partition information of the disk and the backup partition information; and an installation unit, adapted to install the one or more software programs to be installed corresponding to the operating system to the disk, so as to complete the installation of the operating system.

[0164] Figure 12 An exemplary structure of the aforementioned operating system installation apparatus 1200 is shown.

[0165] like Figure 12As shown, the operating system installation device 1200 includes an interaction unit 1205, a disk space acquisition unit 1210, a software space acquisition unit 1220, a computing unit 1230, a backup space acquisition unit 1240, a partitioning unit 1250, and an installation unit 1260.

[0166] The interaction unit 1205 is adapted to respond to the user's operating system installation request, prompt the user to select the software to be installed, and receive the user's input.

[0167] The disk space acquisition unit 1210 is adapted to acquire the disk space size of the disk used to install the operating system during operating system installation.

[0168] The software space acquisition unit 1220 is adapted to obtain the static space size and dynamic space size of each of the one or more software programs to be installed according to the operating system.

[0169] The calculation unit 1230 is adapted to calculate the sum of the static and dynamic space occupied by all software in one or more of the above software programs, and use it as a unit reference space size.

[0170] The backup space acquisition unit 1240 is adapted to determine the backup partition space size by comparing the disk space size with the unit reference space size, and use this as backup partition information.

[0171] Partition unit 1250 is adapted to obtain other partition information of the disk, so as to complete the partitioning of the disk based on the other partition information and backup partition information.

[0172] Installation unit 1260 is adapted to install one or more software programs corresponding to the operating system to the disk to complete the installation of the operating system.

[0173] It should be noted that, Figure 9 The components of the operating system installation device 1200 shown can, for example, execute the above-described combination of... ​ The steps in the described operating system installation method 900 are similar to those in the above methods and can achieve similar functions and technical effects, so they will not be described in detail here.

[0174] Embodiments of the present invention also provide a computing device, including: at least one processor and a memory storing program instructions; when the program instructions are read and executed by the processor, the computing device causes the computing device to perform the automatic partitioning method for backup partitions, the disk partitioning method as described above, or the operating system installation method as described above.

[0175] Embodiments of the present invention also provide a readable storage medium storing program instructions, which, when read and executed by a computing device, cause the computing device to perform the automatic partitioning method for backup partitions, the disk partitioning method, or the operating system installation method as described above.

[0176] The various techniques described herein can be implemented in combination with hardware or software, or a combination thereof. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, can take the form of program code (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, USB flash drive, floppy disk, CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into and executed by a machine such as a computer, the machine becomes an apparatus for practicing the present invention.

[0177] When the program code is executed on a programmable computer, the computing device generally includes a processor, a processor-readable storage medium (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store program code; the processor is configured to execute any method of the present invention according to instructions in the program code stored in the memory.

[0178] By way of example, and not limitation, readable media includes readable storage media and communication media. Readable storage media stores information such as computer-readable instructions, data structures, program modules, or other data. Communication media generally embodies computer-readable instructions, data structures, program modules, or other data in the form of modulated data signals such as carrier waves or other transmission mechanisms, and includes any information delivery medium. Any combination of the above is also included within the scope of readable media.

[0179] In the specification provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with the examples of this invention. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing preferred embodiments of the invention.

[0180] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0181] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more of the various aspects of the invention, features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this method of disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.

[0182] Those skilled in the art will understand that modules, units, or components of the devices disclosed in the examples herein can be arranged in the devices described in this embodiment, or alternatively, can be located in one or more devices different from the devices in this example. The modules in the foregoing examples can be combined into a single module or, in addition, can be divided into multiple sub-modules.

[0183] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0184] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention and form different embodiments.

[0185] Furthermore, some of the embodiments described herein are methods or combinations of method elements that can be implemented by a processor of a computer system or by other means of performing the functions. Therefore, a processor having the necessary instructions for implementing the methods or method elements forms means for implementing the methods or method elements. Furthermore, the elements described herein in the apparatus embodiments are examples of means for implementing the functions performed by elements for the purposes of carrying out the invention.

[0186] As used herein, unless otherwise specified, the use of ordinal numbers such as “first,” “second,” “third,” etc., to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects being described must have a given order in time, space, ordering, or any other manner.

[0187] Although the invention has been described with reference to a limited number of embodiments, those skilled in the art will understand from the foregoing description that other embodiments are conceivable within the scope of the invention described herein. Furthermore, it should be noted that the language used in this specification has been chosen primarily for readability and instructional purposes, and not for the purpose of explaining or limiting the subject matter of the invention.

Claims

1. An automatic partitioning method for backup partitions, comprising: During operating system installation, the disk space size of the disk used to install the operating system is obtained; Based on the one or more software programs to be installed corresponding to the operating system, obtain the static and dynamic space occupied by each software program in the one or more software programs. Calculate the sum of the static and dynamic space occupied by all software in the one or more software programs, and use it as the unit reference space size; as well as The backup partition size is determined by comparing the disk space size with the unit reference space size to complete the automatic partitioning of the backup partition; The step of determining the backup partition space size to complete the automatic partitioning of the backup partition includes: if the disk space size is less than or equal to the unit reference space size, the partitioning is determined to fail; if the disk space size is greater than the unit reference space size and less than a first preset multiple of the unit reference space size, the backup partition space size is determined to be 0; and if the disk space size is greater than or equal to the first preset multiple of the unit reference space size, the backup partition space size is determined to be equal to a preset value.

2. The automatic partitioning method according to claim 1, wherein, The first preset multiple is a real number greater than or equal to 2.

3. The automatic partitioning method according to claim 1 or 2, wherein: If the disk space is greater than or equal to a first preset multiple of the unit reference space and less than a second preset multiple of the unit reference space, the size of the backup partition space is equal to the first preset value, wherein the second preset multiple is greater than the first preset multiple; If the disk space is greater than or equal to a second preset multiple of the unit reference space and less than the disk space threshold, the size of the backup partition space is equal to the second preset value; as well as If the disk space is greater than or equal to the disk space threshold, the size of the backup partition space is equal to the third preset value.

4. The automatic partitioning method according to claim 3, wherein, The second preset multiple is a real number greater than or equal to 2.

5. The automatic partitioning method according to claim 3, wherein, The disk space threshold is equal to a third preset multiple of the unit reference space size, and the third preset multiple is greater than the second preset multiple; The first preset value is equal to the size of the unit reference space; The second preset value is equal to half of the difference between the disk space size and the unit reference space size; as well as The third preset value is equal to half the size of the third preset multiple of the unit reference space.

6. The automatic partitioning method according to claim 3, wherein, The disk space threshold is determined in the following way: Predetermine backup specifications; The disk space required to perform the corresponding number of backups of the operating system according to the backup specifications will be used as the preset backup partition threshold. Based on a preset backup partition threshold, the size of the disk space corresponding to the preset backup partition threshold is determined and used as the disk space threshold.

7. The automatic partitioning method according to claim 6, wherein: The first preset value is equal to the size of the unit reference space; The second preset value is equal to log2(x-1), where x represents the disk space size; and The third preset value is equal to the preset backup partition threshold.

8. The automatic partitioning method according to claim 6, wherein, The step of determining the size of the disk space corresponding to the preset backup partition threshold, and using it as a disk space threshold, includes: Substitute the obtained preset backup partition threshold as the y value into the formula y = log2(x-1), and the resulting x value is the disk space critical value.

9. A disk partitioning method, comprising: During operating system installation, the size of the backup partition space of the disk is determined according to the automatic partitioning method of any one of claims 1-8, and is used as backup partition information; Obtain other partition information of the disk; as well as The disk is partitioned based on the other partition information of the disk and the backup partition information.

10. An operating system installation method, comprising: In response to the user's operating system installation request, the system prompts the user to select the software to install and receives the user's input. The backup partition space size of the disk is determined according to the automatic partitioning method of any one of claims 1-8, and is used as backup partition information; Obtain other partition information of the disk; The disk is partitioned based on the other partition information of the disk and the backup partition information; as well as The operating system is installed by installing one or more software programs corresponding to the software to be installed onto the disk.

11. An automatic partitioning device for backup partitions, comprising: The disk space acquisition unit is adapted to acquire the disk space size of the disk used to install the operating system during operating system installation. The software space acquisition unit is adapted to obtain the static space size and dynamic space size of each software in the one or more software to be installed according to the operating system. The calculation unit is adapted to calculate the sum of the static and dynamic space occupied by all software in the one or more software programs, and use it as a unit reference space size; as well as The backup space determination unit is adapted to determine the backup partition space size by comparing the disk space size with the unit reference space size to complete the automatic partitioning of the backup partition, including: if the disk space size is less than or equal to the unit reference space size, the partitioning is determined to fail; If the disk space size is greater than the unit reference space size and less than a first preset multiple of the unit reference space size, the backup partition space size is determined to be 0; and if the disk space size is greater than or equal to the first preset multiple of the unit reference space size, the backup partition space size is determined to be equal to a preset value.

12. A partitioning device, comprising: The disk space acquisition unit is adapted to acquire the disk space size of the disk used to install the operating system during operating system installation. The software space acquisition unit is adapted to obtain the static space size and dynamic space size of each software in the one or more software to be installed according to the operating system. The calculation unit is adapted to calculate the sum of the static and dynamic space occupied by all software in the one or more software programs, and use it as a unit reference space size; A backup space acquisition unit is adapted to determine a backup partition space size as backup partition information by comparing the disk space size with the unit reference space size, including: if the disk space size is less than or equal to the unit reference space size, determining that the partitioning has failed; if the disk space size is greater than the unit reference space size and less than a first preset multiple of the unit reference space size, determining that the backup partition space size is 0; and if the disk space size is greater than or equal to a first preset multiple of the unit reference space size, determining that the backup partition space size is equal to a preset value; and A partitioning unit is adapted to obtain other partition information of the disk in order to complete the partitioning of the disk based on the other partition information of the disk and the backup partition information.

13. An operating system installation apparatus, comprising: The interactive unit is adapted to respond to the user's operating system installation request, prompt the user to select the software to be installed, and receive user input; The disk space acquisition unit is adapted to acquire the disk space size of the disk used to install the operating system during operating system installation. The software space acquisition unit is adapted to obtain the static space size and dynamic space size of each software in the one or more software to be installed according to the operating system. The calculation unit is adapted to calculate the sum of the static and dynamic space occupied by all software in the one or more software programs, and use it as a unit reference space size; A backup space acquisition unit is adapted to determine a backup partition space size as backup partition information by comparing the disk space size with the unit reference space size, including: if the disk space size is less than or equal to the unit reference space size, determining that the partitioning has failed; if the disk space size is greater than the unit reference space size and less than a first preset multiple of the unit reference space size, determining that the backup partition space size is 0; and if the disk space size is greater than or equal to a first preset multiple of the unit reference space size, determining that the backup partition space size is equal to a preset value. A partitioning unit, adapted to obtain other partition information of the disk, so as to complete the partitioning of the disk based on the other partition information of the disk and the backup partition information; and The installation unit is adapted to install one or more software programs corresponding to the operating system to the disk to complete the installation of the operating system.

14. A computing device, comprising: At least one processor and a memory storing program instructions; When the program instructions are read and executed by the processor, the computing device performs the automatic partitioning method for backup partitions as described in any one of claims 1-8, the disk partitioning method as described in claim 9, or the operating system installation method as described in claim 10.

15. A readable storage medium storing program instructions, which, when read and executed by a computing device, cause the computing device to perform an automatic partitioning method for a backup partition as described in any one of claims 1-8, a disk partitioning method as described in claim 9, or an operating system installation method as described in claim 10.

Citation Information

Patent Citations

  • Method for automatically programming volume of hard disk

    CN102135860A

  • Method for intelligently and automatically adjusting storage equipment partition in computer system

    CN102253895A