Operating system deployment method and computing device

By automatically identifying the file characteristics of the mirror file, the flexibility of batch deployment of the operating system is solved, efficient and flexible deployment of the operating system is achieved, and the user experience is improved.

CN120523481APending Publication Date: 2025-08-22HENAN KUNLUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510389977.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

The batch deployment flexibility of the operating system in the data center and other scenarios in the prior art is low, making it difficult to meet the actual deployment needs of users.

Method used

By obtaining the file characteristics of the image file, automatically identify the operating system type and version, and use the image file to deploy the operating system.

Benefits of technology

It realizes flexible and efficient deployment of the operating system and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120523481A_ABST
    Figure CN120523481A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides an operating system deployment method and computing equipment, which are used for flexibly and efficiently realizing deployment of an operating system. The operating system deployment method comprises the following steps: acquiring file characteristics of a mirror image file of a to-be-deployed operating system; the file features are used for representing file names of the mirror image files and / or used for representing folder structures of the mirror image files; identifying an operating system type and an operating system version of the mirror image file based on the file characteristics of the mirror image file; and deploying the to-be-deployed operating system by using the mirror image file based on the operating system type and the operating system version.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an operating system deployment method and computing device. Background Art

[0002] Currently, in scenarios like data centers where large numbers of servers are deployed, operating system (OS) batch deployment tools can be used to rapidly deploy OSes on servers. When using OS batch deployment tools, users must select the desired OS type and version from a selection of specified types and versions and upload the corresponding image file. This deployment method is inflexible and difficult to meet users' actual deployment needs. Summary of the Invention

[0003] The embodiments of the present application provide an operating system deployment method and a computing device for flexibly and efficiently implementing operating system deployment.

[0004] To achieve the above objectives, the present invention adopts the following technical solutions:

[0005] In a first aspect, embodiments of the present application provide an operating system deployment method that can obtain file features of an image file of an operating system to be deployed. The file features are used to characterize the image file's file name, enabling matching with the file names of image files of known operating systems. And / or, the file features can be used to characterize the image file's folder structure, enabling matching with the folder structure of image files of known operating systems. Furthermore, based on the image file's file features, the image file's operating system type and operating system version can be identified, and further based on the operating system type and operating system version, the image file can be used to deploy the operating system to be deployed.

[0006] Compared with the deployment method that requires manual selection of type and version, computing devices can automatically and accurately identify the operating system type and version of the operating system to be deployed, and can flexibly and efficiently implement the deployment of the operating system and improve the user experience.

[0007] In one possible implementation, identifying the operating system type and operating system version of an image file based on file features of the image file includes: identifying the operating system type of the image file based on the file features of the image file; obtaining the version information of the image file from the image file based on a preset version information storage location corresponding to the operating system type of the image file; and identifying the operating system version of the image file based on the version information of the image file.

[0008] In one possible implementation, the file features include a file name of the image file; and based on the file features of the image file, identifying the operating system type of the image file includes: obtaining an image file naming rule for each of a plurality of operating system types; determining a target operating system type from the plurality of operating system types whose image file naming rule matches the file name of the image file, and determining the target operating system type as the operating system type of the image file.

[0009] In one possible implementation, the file features include a folder structure feature vector of the image file; the folder structure feature vector is used to characterize the importance of each folder in the image file; and based on the file features of the image file, the operating system type of the image file is identified, including: obtaining a folder structure feature vector of each operating system type from a plurality of operating system types; and determining the operating system type of the image file from the plurality of operating system types based on a similarity between the folder structure feature vector of each operating system type and the folder structure feature vector of the image file.

[0010] In one possible implementation, the operating system type of the image file is determined from multiple operating system types based on the similarity between the folder structure feature vectors of each operating system type and the folder structure feature vector of the image file, including: determining the similarity between the folder structure feature vectors of each operating system type and the folder structure feature vector of the image file, and determining the operating system type with the greatest similarity as the operating system type of the image file.

[0011] In one possible implementation, the file features include a folder structure feature vector of the image file; the folder structure feature vector is used to characterize the importance of each folder in the image file; obtaining the file features of the image file of the operating system to be deployed includes: obtaining a preset weight of each known folder in multiple known folders, and a preset weight of an unknown folder; traversing the image file of the operating system to be deployed to determine all folders included in the image file of the operating system to be deployed; identifying a target folder in all the folders that has the same known folder in multiple known folders, determining the preset weight of the same known folder as the weight of the target folder, and determining the preset weight of the unknown folder as the weight of other folders in all the folders, to obtain the folder structure feature vector of the image file.

[0012] In one possible implementation, based on the version information of the image file, the operating system version of the image file is identified, including: obtaining the version name of each operating system version under the operating system type, and the specified operating system version corresponding to the operating system type; if there is a target operating system version whose version name matches the version information of the image file among the various operating system versions, the target operating system version is determined as the operating system version of the image file; if there is no target operating system version whose version name matches the version information of the image file among the various operating system versions, the specified operating system version is determined as the operating system version of the image file.

[0013] In a possible implementation, deploying the operating system to be deployed using an image file based on the operating system type and the operating system version includes: determining configuration item information of the image file based on the operating system type and the operating system version; and deploying the operating system to be deployed using the image file based on the configuration item information.

[0014] In one possible implementation, determining configuration item information of an image file based on an operating system type and an operating system version includes: obtaining configuration item information of each reference image file from a plurality of reference image files; determining a target reference image file from the plurality of reference image files whose operating system type is the same as that of the image file and whose operating system version is the same as that of the image file, and determining the configuration item information of the target reference image file as the configuration item information of the image file.

[0015] In a second aspect, a computing device is provided, comprising a memory and a processor. The memory and the processor are electrically connected. The memory is configured to store program instructions, and the processor is configured to execute the program instructions, so that the computing device implements the operating system deployment method of the first aspect and possible implementations thereof.

[0016] In a third aspect, a chip is provided, which includes: a processor and an interface circuit; the interface circuit is used to receive program instructions and transmit them to the processor; the processor is used to run the program instructions to execute the operating system deployment method of the first aspect and its possible implementation methods.

[0017] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores program instructions. When the program instructions in the computer-readable storage medium are executed by a terminal device, the terminal device executes the operating system deployment method of the first aspect and possible implementations thereof.

[0018] In a fifth aspect, a computer program product including program instructions is provided. When the program instructions in the computer-readable storage medium are executed by a terminal device, the terminal device executes the operating system deployment method of the first aspect and possible implementations thereof.

[0019] It should be understood that the technical effects brought about by any implementation method in the second to fifth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of the structure of an operating system deployment tool provided in an embodiment of the present application;

[0021] Figure 2 A schematic diagram of the structure of an operating system deployment system provided in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of the hardware structure of a computing device provided in an embodiment of the present application;

[0023] Figure 4 A flowchart of an operating system deployment method provided in an embodiment of the present application;

[0024] Figure 5 A flowchart of another operating system deployment method provided in an embodiment of the present application;

[0025] Figure 6 A schematic diagram of an operating system deployment process provided in an embodiment of the present application;

[0026] Figure 7 A schematic diagram of the functional structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "a plurality" means two or more. Words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not limit them to be necessarily different.

[0028] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0029] An embodiment of the present application provides an operating system deployment method, in which a computing device can obtain file features of an image file of an operating system to be deployed. The file features are used to characterize the file name of the image file, and can support matching with the file name of an image file of a known operating system to identify the operating system type and operating system version of the image file. And / or, the file features can be used to characterize the folder structure of the image file, and can support matching with the folder structure of an image file of a known operating system to identify the operating system type and operating system version of the image file. Furthermore, the computing device can use the image file to deploy the operating system to be deployed based on the identified operating system type and operating system version.

[0030] Compared with the deployment method that requires manual selection of type and version, computing devices can automatically and accurately identify the operating system type and version of the operating system to be deployed, and can flexibly and efficiently implement the deployment of the operating system and improve the user experience.

[0031] The operating system deployment method provided in the embodiments of this application is applicable to any scenario requiring operating system deployment, such as data center server deployment and expansion, cloud computing, and virtualized environments. It should be noted that the above description of applicable scenarios for the operating system deployment method is merely illustrative and is not intended to limit the scope of this application.

[0032] In actual usage scenarios, when an operating system needs to be deployed on a device (such as a server), an operating system deployment tool can be constructed based on the operating system deployment method provided in the embodiments of the present application, and the operating system deployment tool can be installed on the device. Furthermore, the user can directly upload the image file of the operating system to be deployed to the device. The device can identify the operating system version and operating system type of the image file through the constructed operating system deployment tool, and use the image file to deploy the operating system to be deployed.

[0033] Alternatively, the operating system deployment tool can be installed on other devices connected to the one device (such as a cloud server). Furthermore, the user can directly upload the image file of the operating system to be deployed to the other device connected to the one device. The other device can identify the operating system version and operating system type of the image file through the constructed operating system deployment tool, and send the identified operating system version and operating system type of the image file to the one device. In this way, the one device can use the image file to deploy the operating system to be deployed based on the operating system version and operating system type of the received image file.

[0034] For example, Figure 1FIG2 is a schematic diagram of the structure of an operating system deployment tool provided by an embodiment of the present application. The operating system deployment tool constructed based on the operating system deployment method provided by an embodiment of the present application may include an image parsing unit, a configuration matching unit, and a deployment execution unit.

[0035] The image parsing unit is used to parse image files and identify the image file's operating system type and version. Specifically, the image parsing unit can receive an image file of the operating system to be deployed uploaded by the user, analyze and process the image file, obtain the file characteristics of the image file of the operating system to be deployed, and further identify the image file's operating system type and version. Furthermore, the image parsing unit can send the identified image file's operating system type and version to the configuration matching unit.

[0036] The configuration matching unit is responsible for matching configuration item information. Specifically, based on the operating system type and version of the image file identified by the image parsing unit, it intelligently matches configuration item information for compatible operating systems, thereby improving deployment compatibility and success rate. Furthermore, the configuration matching unit can send the matched configuration item information to the deployment execution unit.

[0037] The deployment execution unit is used to execute the deployment task, that is, to deploy the operating system to be deployed using the image file according to the configuration item information matched by the configuration matching unit.

[0038] like Figure 2 FIG. 1 is a schematic diagram of a structure of an operating system deployment system provided by an embodiment of the present application. The operating system deployment system includes a terminal device 101 and a server 102. The operating system deployment method provided by the embodiment of the present application can be applied to Figure 2 The terminal device 101 of the operating system deployment system is shown.

[0039] It should be noted that the number and connection relationship of the terminal devices 101 and servers 102 included in the above-mentioned operating system deployment system are only examples, and the embodiments of the present application do not limit this.

[0040] The terminal device 101 can be a personal computer such as a desktop, tablet computer, or laptop computer, or a remote terminal, a user terminal (TE), or a mobile device. The embodiment of the present application does not limit the form of the terminal 1. The device for implementing the function of the terminal can be a terminal, or a device that can support the terminal to implement the function, such as a chip system. The device can be installed in the terminal or used in conjunction with the terminal. In the embodiment of the present application, the chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0041] The server 102 may be a single server, or a server cluster consisting of multiple servers. Alternatively, a server cluster may also be referred to as a computing device cluster. In some implementations, the server cluster may also be a distributed cluster. The embodiments of this application do not limit the form of the server.

[0042] Optional, Figure 2 The terminal device 101 and the server 102 may be integrated into the same device or may be two independently configured devices, which is not limited in this embodiment of the present application.

[0043] It is easy to understand that when the terminal device 101 and the server 102 are integrated into the same device, the communication between the terminal device 101 and the server 102 is carried out as communication between the internal modules of the device. In this case, the communication process between the two is the same as the communication process between the terminal device 101 and the server 102 when they are independently installed.

[0044] In terms of hardware implementation, both the terminal device 101 and the server 102 can be implemented as follows: Figure 3 The computing devices shown implement the corresponding functions. Figure 3 , which is a schematic diagram of the hardware structure of a computing device 20 provided in an embodiment of the present application.

[0045] Figure 3 The computing device 20 shown may include a processor 201 , a memory 202 , a communication interface 203 , and a bus 204 . The processor 201 , the memory 202 , and the communication interface 203 may be connected via the bus 204 .

[0046] The processor 201 is the control center of the computing device 20 and can be a general-purpose central processing unit (CPU) or other general-purpose processors, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0047] As an example, the processor 201 may include one or more CPUs, such as Figure 3 CPU 0 and CPU1 are shown in Figure 1.

[0048] The memory 202 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0049] In one possible implementation, memory 202 may exist independently of processor 201. Memory 202 may be connected to processor 201 via bus 204 and used to store data, instructions, or program code. When processor 201 calls and executes the instructions or program code stored in memory 202, the file verification method provided in the embodiment of the present application can be implemented.

[0050] In another possible implementation, the memory 202 may also be integrated with the processor 201 .

[0051] The communication interface 203 is used to connect the computing device 20 to other devices via a communication network, which may be Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The communication interface 203 may include a receiving unit for receiving data and a sending unit for sending data.

[0052] The bus 204 may be an ISA bus, a PCI bus, a PCI-Express bus, an EISA bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0053] It should be pointed out that Figure 3 The structure shown in the figure does not constitute a limitation on the computing device 20, except Figure 3 In addition to the components shown, computing device 20 may include more or fewer components than shown, or combine certain components, or arrange components differently.

[0054] like Figure 4 , which is a flow chart of an operating system deployment method provided in an embodiment of the present application. Figure 4 The method shown can be applied to a computing device. The computing device can be Figure 2 The terminal device or server of the operating system deployment system shown. Or further, the computing device can be Figure 3 The computing device shown in the figure is implemented in the structure. The operating system deployment method includes: S301-S303.

[0055] S301: Obtain file features of an image file of an operating system to be deployed.

[0056] The file feature is used to characterize the file name of the image file and / or the folder structure of the image file. The folder structure of the image file refers to the hierarchical structure of folders of different types and functions in the image file.

[0057] The operating system to be deployed is a built-in program for managing various hardware such as processors and memories on the device. For example, the operating system to be deployed can be a real-time system, a batch processing system, a time-sharing system, etc. This embodiment of the application does not limit this.

[0058] The image file of the operating system to be deployed is a data file containing the kernel, system files, and drivers of the operating system to be deployed. It is used to facilitate the deployment of the operating system to be deployed. The image file can be generated using an operating system creation tool or burning software, without restriction.

[0059] When deploying an operating system to a server, users can directly upload the image file of the operating system to a computing device. To accurately identify the operating system type and version of the image file, the computing device can obtain the file characteristics of the image file of the operating system to be deployed, thereby facilitating the deployment of the operating system.

[0060] For example, considering that the image file of the operating system may be named according to specific rules, the file name of the image file may carry keywords that reflect the type and / or version of the operating system. The computing device can parse the image file, identify the file name of the image file of the operating system to be deployed, and determine the file feature of the image file with the file name of the image file, so as to accurately identify the operating system type and operating system version of the image file.

[0061] For another example, considering that the folders of the operating system's image file may be organized in a specific structure, the folder structure of the image file may reflect the type and / or version of the operating system. The computing device can parse the image file, traverse all folders of the image file of the operating system to be deployed, and generate file features of the image file based on all folders of the image file, so as to accurately identify the operating system type and operating system version of the image file.

[0062] For example, the computing device may use the directories of all folders in the image file as the file characteristics of the image file. Alternatively, the computing device may generate a folder structure feature vector for the image file based on all folders in the image file, and use the folder structure feature vector for the image file as the file characteristics of the image file. The folder structure feature vector may record the weight of each folder to reflect the importance of each folder.

[0063] S302: Identify the operating system type and operating system version of the image file based on the file characteristics of the image file.

[0064] The computing device may match the file characteristics of the image file of the operating system to be deployed with the file characteristics of multiple preset image files. A preset image file is an image file with a known operating system type and version. Furthermore, the computing device may determine the operating system type and version of the preset image file whose file characteristics match as the operating system type and version of the image file of the operating system to be deployed.

[0065] The computing device may be pre-set with file features of multiple preset image files. Alternatively, the computing device may also obtain multiple preset image files and further identify and record the file features of each preset image file.

[0066] S303: Deploy the operating system to be deployed using the image file based on the operating system type and operating system version.

[0067] The computing device can determine the configuration information of the operating system to be deployed based on the operating system type and version. This information includes configuration information for the language type, keyboard layout, time zone, startup method, and software package installation, as well as hardware parameters such as memory, number of CPU cores, and hard drive size. Furthermore, based on this configuration information, the computing device can automatically and accurately configure the image file during installation, thereby deploying the operating system to be deployed.

[0068] In one possible implementation, in the above S302, that is, when the computing device identifies the operating system type and operating system version of the image file based on the file characteristics of the image file, an embodiment of the present application provides an optional implementation, including: S3021-S3023.

[0069] S3021. Identify the operating system type of the image file based on the file characteristics of the image file.

[0070] The computing device may match the file characteristics of the image file of the operating system to be deployed with the file characteristics of multiple image files of known operating system types. Furthermore, the computing device may determine the known operating system type with the matching file characteristics as the operating system type of the image file of the operating system to be deployed.

[0071] S3022: Obtain version information of the image file from the image file based on a preset version information storage location corresponding to the operating system type of the image file.

[0072] The preset version information storage location is a location in the image file that is preset to store version information. One image file of one operating system type corresponds to one preset version information storage location.

[0073] After the computing device obtains the operating system type of the image file, it can read the corresponding preset version information storage location based on the operating system type of the image file, and further obtain the version information of the image file from the preset version information storage location of the image file to accurately identify the operating system version of the image file.

[0074] For example, the computing device may record the storage location of the preset version information corresponding to the image file of each operating system type based on the following first program code.

[0075]

[0076]

[0077] The first program code is configured to record the preset version information storage locations corresponding to each of File 1, File 2, File 3, and File 4. The preset version information storage locations may specifically be one or more folders within the image file. For example, Folder 1. Another example may be Folder 2, Folder 21, and Folder 22. These folders are used to store metadata such as image file version information, architecture type, and checksum. This allows the computing device to accurately determine the version information for each image file.

[0078] S3023: Identify the operating system version of the image file based on the version information of the image file.

[0079] The computing device can determine the operating system version of the image file by identifying keywords in the image file's version information. For example, the computing device can obtain the version name of each of multiple operating system versions. The computing device can then match the image file's version information with the multiple version names, identify a target operating system version among the multiple operating system versions whose version name matches the image file's version information, and determine the target operating system version as the operating system version of the image file.

[0080] In one possible implementation, when the file feature is used to characterize the file name of the image file, the file feature may include the file name of the image file. In this case, when the computing device identifies the operating system type of the image file based on the file feature of the image file, an embodiment of the present application provides an optional implementation, including: S30211-S30212.

[0081] S30211. Obtain the image file naming rules of each operating system type among multiple operating system types.

[0082] The image file naming rule of an operating system type is established based on the characteristics of the image file name of the operating system type.

[0083] For example, as shown in Table 1 below, the file names of the image files of each version of file 1 conform to the characteristics of WJ1-xxx-xx-xx.iso. The file names of the image files of each version of file 2 conform to the characteristics of WJ2-xx-xx.iso. The file names of the image files of each version of file 3 conform to the characteristics of WJ3-xxxxxxx.iso or WJ3-xxxxxx.iso. The image file names of each operating system type usually include multiple parts such as a specific prefix, version number format, architecture identifier, and file suffix. The image file naming rules of the operating system type are used to characterize the combination of these parts. For example, the image file naming rules of the operating system type can be regular expressions corresponding to the combination of these parts.

[0084] Table 1

[0085]

[0086]

[0087] S30212. Determine a target operating system type from multiple operating system types whose image file naming rule matches the file name of the image file, and determine the target operating system type as the operating system type of the image file.

[0088] The computing device may match the file name of the image file with the image file naming rules of each operating system type to determine the target operating system type.

[0089] For example, the computing device can implement the matching process of the image file name with the image file naming rules of each operating system type through the following second program code.

[0090]

[0091]

[0092] Based on this, the computing device can match the image file name of the operating system to be deployed with the naming rules of the operating system image files recorded in each "pattern" field in the above-mentioned second program code, determine the "pattern" field that records the matching naming rules, and further determine the operating system type in the "name" field of the record corresponding to the matching "pattern" field as the target operating system type.

[0093] In one possible implementation, the image file of the operating system to be deployed might be a newly released operating system, such as a non-standard operating system or a user-customized operating system. In this case, it's difficult to accurately match the image file's file name to the operating system type of the image file to be deployed, which can easily lead to deployment failure.

[0094] To improve the deployment success rate, in embodiments of the present application, file features can also be used to characterize the folder structure of the image file. The file features may include a folder structure feature vector for the image file. The folder structure feature vector for the image file can be used to characterize the importance of each folder in the image file. For example, the folder structure feature vector can record the weight of each folder in the order in which the folders are arranged, thereby reflecting the importance of each folder. The order in which the folders are arranged can be the order in which the folders appear in the directory.

[0095] In this case, when the computing device identifies the operating system type of the image file based on the file features of the image file, an embodiment of the present application provides an optional implementation method, including: S30213-S30214.

[0096] S30213. Obtain a folder structure feature vector for each operating system type among multiple operating system types.

[0097] Consider that image files of different operating system types have different folder structures.

[0098] For example, as shown in Table 2 below, the folder structure of the image file of type A operating system A1 and the folder structure of the image file of type A operating system A2 mainly include folders such as a1, a2, a3, a4, a5, and a6.

[0099] Table 2

[0100] A1 A2 a1 a1 a2 a2 a3 a3 a4 a4 a5 a5 a6 a6 a7 a7 a8 a8 a9 a9 a10 a11 a11

[0101] As shown in Table 3 below, the folder structures of the image files of type B operating systems B1, B2, and B3 respectively include folders such as b1, b2, and b3.

[0102] Table 3

[0103]

[0104]

[0105] As shown in Table 4 below, the folder structures of the image files of type C operating systems are C1, C2, and C3, mainly including folders such as c1, c2, and c3.

[0106] Table 4

[0107] C1 C2 C3 c1 c1 c1 c2 c2 c2 c3 c15 c3 c4 c4 c4 c5 c6 c5 c6 c8 c6 c7 c11 c7 c8 c12 c8 c9 c14 c9 c10 c10 c11 c11 c12 c15 c13 c12 c14 c16

[0108] Based on this, a corresponding folder structure feature vector can be set for each image of a known operating system type. The folder structure feature vector can include weights for each folder in the image file to represent the importance or uniqueness of each folder. For example, the folder structure feature vector can be viewed as a dictionary, with the keys being the folder names and the values ​​being the folder weights.

[0109] Optionally, when the computing device obtains the folder structure feature vector of each operating system type among multiple operating system types, it can determine all the folders included in the image file of each operating system type, and based on the preset weight of each folder in multiple known folders, further determine the weight of each folder included in the image file of each operating system type to obtain the folder structure feature vector of each operating system type.

[0110] Alternatively, the computing device may also pre-store a folder structure feature vector for each of the multiple operating system types. If it is necessary to determine the operating system type of the image file of the operating system to be deployed, the computing device may also directly read the folder structure feature vector for each of the multiple stored operating system types.

[0111] S30214: Determine the operating system type of the image file from multiple operating system types based on the similarity between the folder structure feature vector of each operating system type and the folder structure feature vector of the image file.

[0112] The computing device may determine the similarity between the folder structure feature vector of the image file of the operating system to be deployed and the folder structure feature vectors of each operating system type. Furthermore, the computing device may determine the operating system type whose folder structure feature vector has the greatest similarity to the folder structure feature vector of the image file of the operating system to be deployed as the operating system type of the image file of the operating system to be deployed.

[0113] Alternatively, after determining the similarity between the folder structure feature vector of the image file of the operating system to be deployed and the folder structure feature vectors of each operating system type, the computing device may determine as a candidate operating system type the operating system type whose folder structure feature vector has a similarity greater than a similarity threshold to the folder structure feature vector of the image file of the operating system to be deployed. Furthermore, the computing device obtains the usage of each candidate operating system type and determines the candidate operating system type with the highest usage among the candidate operating system types as the operating system type of the image file of the operating system to be deployed.

[0114] In one possible implementation, when a computing device determines the operating system type of an image file from multiple operating system types based on the similarity between the folder structure feature vectors of each operating system type and the folder structure feature vector of the image file, an embodiment of the present application provides an optional implementation, including: step A.

[0115] Step A: Determine the similarity between the folder structure feature vector of each operating system type and the folder structure feature vector of the image file, and determine the operating system type with the greatest similarity as the operating system type of the image file.

[0116] Optionally, the computing device determines the similarity between the folder structure feature vector of each operating system type and the folder structure feature vector of the image file of the operating system to be deployed by calculating the Euclidean distance or cosine similarity between the folder structure feature vector of the image file of the operating system to be deployed and the folder structure feature vector of each operating system type.

[0117] For example, the formula for calculating cosine similarity is: S = D / (norm_A * norm_B). Here, S is the dot product of two folder structure feature vectors: the sum of the product of the folder structure feature vector of the image file of the operating system to be deployed and the corresponding folder weights in the folder structure feature vector of the known operating system type. norm_A and norm_B are the norms (i.e., lengths) of the two folder structure feature vectors, i.e., the square root of the sum of the squares of all weights in the folder structure feature vectors.

[0118] In one possible implementation, when the file features of the image file of the operating system to be deployed are used to characterize the folder structure of the image file, in the above S301, that is, when the computing device obtains the file features of the image file of the operating system to be deployed, an embodiment of the present application provides an optional implementation, including: S3011-S3013.

[0119] S3011. Obtain a preset weight of each known folder in a plurality of known folders, and a preset weight of an unknown folder.

[0120] For image files of known operating system types, preset weights for each folder can be set based on the importance of each known folder included in the image file. For example, the preset weight of a known folder with a higher degree of importance can be set to 0.8 or 1. The preset weight of a known folder with a lower degree of importance can be set to 0.2 or 0.4. In addition, considering that there may be newly added unknown folders in the image file of the operating system to be deployed, that is, folders that have not appeared in image files of known operating system types, preset weights for unknown folders can also be set in advance. For example, the preset weight of an unknown folder can be set to 0 or 0.1.

[0121] S3012: traverse the image file of the operating system to be deployed, and determine all folders included in the image file of the operating system to be deployed.

[0122] The computing device may mount the image file of the operating system to be deployed, and traverse the folder structure of the image file of the operating system to be deployed to determine all folders included in the image file of the operating system to be deployed.

[0123] S3013. Identify a target folder among all folders that has the same known folder in multiple known folders, determine the weight of the target folder using the preset weight of the same known folder, and determine the weights of other folders in all folders using the preset weight of the unknown folder to obtain a folder structure feature vector of the mirror file.

[0124] The target folder is a known folder among all folders included in the image file of the operating system to be deployed, and the other folders are folders other than the target folders among all folders included in the image file of the operating system to be deployed, that is, unknown folders.

[0125] Based on this, the computing device can accurately identify the weights of each folder included in the image file of the operating system to be deployed, and obtain the folder structure feature vector of the image file, so as to accurately identify the operating system type of the image file of the operating system to be deployed.

[0126] In one possible implementation, in the above S3023, that is, when the operating system version of the image file is identified based on the version information of the image file, the embodiment of the present application provides an optional implementation, including: S30231-S30233.

[0127] S30231. Obtain the version name of each operating system version under the operating system type, and the specified operating system version corresponding to the operating system type.

[0128] Considering that different operating system types have different version naming rules, and different operating system versions under the same operating system type have different version names, the computing device can pre-record the version names of different operating system versions under each operating system type.

[0129] Furthermore, it is considered that the image file of the operating system to be deployed may be a newly released operating system version. In this case, it is difficult to accurately match the version name of the known operating system version to the operating system version of the image file of the operating system to be deployed, which can easily lead to deployment failure. In order to improve the deployment success rate, the computing device in the embodiment of the present application can also obtain the pre-recorded specified operating system versions corresponding to each operating system type. The specified operating system version corresponding to an operating system type can be the most commonly used version under that operating system type, or it can be a manually set version.

[0130] For example, the computing device may record the version names of different operating system versions of each operating system type based on the following third program code. The third program code:

[0131]

[0132]

[0133] The third program code uses the "IsoInfoRegex" field in the third program code to record the version names of some operating system image files in the form of regular expressions. After obtaining the version information of the image file of the operating system to be deployed, the computing device can use the third program code to match each regular expression in turn to accurately determine the operating system version of the image file of the operating system to be deployed.

[0134] S30232: If there is a target operating system version among the operating system versions whose version name matches the version information of the image file, the target operating system version is determined as the operating system version of the image file.

[0135] If there is a target operating system version whose version name matches the version information of the image file among the various operating system versions, it can indicate that the operating system version of the operating system to be deployed is not newly released but is already known. In this case, the computing device can determine the target operating system version as the operating system version of the image file to facilitate accurate installation of the image file.

[0136] S30233: If there is no target operating system version whose version name matches the version information of the image file among the operating system versions, the specified operating system version is determined as the operating system version of the image file.

[0137] If no target operating system version exists among the various operating system versions whose version name matches the image file's version information, this may indicate that the operating system version of the operating system to be deployed is newly released and not known. In this case, to accurately install the image file and avoid extending the deployment cycle by waiting for adaptation to the newly released operating system version, the computing device may determine the specified operating system version as the operating system version of the image file, and attempt to install the image file based on the specified operating system version, thereby improving the flexibility and success rate of the deployment process.

[0138] In one possible implementation, in the above S303, that is, when the computing device deploys the operating system to be deployed using an image file based on the operating system type and operating system version, an embodiment of the present application provides an optional implementation, including: S3031-S3032.

[0139] S3031. Determine configuration item information of the image file based on the operating system type and operating system version.

[0140] To avoid the inefficiencies and configuration errors often associated with manually setting individual configuration items, the computing device can accurately identify the configuration item information of the image file of the operating system to be deployed based on the operating system type and version, allowing for accurate installation of the image file. For example, the computing device can pre-record the configuration item information for each operating system type and version. This allows the computing device to accurately match the recorded information with the configuration item information of the operating system to be deployed based on the operating system type and version.

[0141] Optionally, the configuration item information of the operating system to be deployed may include configuration information of at least one configuration item, such as a language type configuration item, a keyboard layout configuration item, a time zone configuration item, a startup mode configuration item, and a software package installation configuration item.

[0142] S3032: Deploy the operating system to be deployed using the image file based on the configuration item information.

[0143] In one possible implementation, in the above S3031, that is, when the computing device determines the configuration item information of the operating system to be deployed based on the operating system type and operating system version, an embodiment of the present application provides an optional implementation, including: S30311-S30312.

[0144] S30311. Obtain configuration item information of each reference image file among multiple reference image files.

[0145] A reference image file is a published image file whose corresponding operating system type and operating system version are known. Different reference image files may correspond to different operating system types and / or different operating system versions.

[0146] S30312. Determine a target reference image file from multiple reference image files, whose operating system type is the same as that of the image file and whose operating system version is the same as that of the image file, and determine the configuration item information of the target reference image file as the configuration item information of the image file.

[0147] Based on this, the computing device can identify a reference image file whose operating system type and operating system version are consistent with the image file of the operating system to be deployed, so as to accurately determine the configuration item information of the image file of the operating system to be deployed, thereby correctly installing the image file of the operating system to be deployed.

[0148] In one embodiment, Figure 5 , which is a flow chart of another operating system deployment method provided in an embodiment of the present application. Figure 5 The operating system deployment method shown includes: S401-S404.

[0149] S401. Match file names based on a file name configuration file.

[0150] The file name configuration file includes an image file naming rule for each operating system type among multiple operating system types.

[0151] The computing device may determine, based on the file name configuration file, a target operating system type from among multiple operating system types whose image file naming rules match the image file's file name, and determine the target operating system type as the operating system type of the image file. For the specific implementation of this process, please refer to the detailed description in S30211-S30212 above and will not be repeated here.

[0152] S402: Compare folder structures based on the folder structure configuration file.

[0153] The folder structure configuration file includes a folder structure feature vector of each operating system type among multiple operating system types.

[0154] If the image file's operating system type cannot be identified based on the file name, the computing device may determine the image file's operating system type from multiple operating system types based on the folder structure configuration file and the similarity between the folder structure feature vectors of each operating system type and the folder structure feature vector of the image file. The specific implementation of this process is described in S30213-S30214 above and will not be repeated here.

[0155] S403: Identify version information based on the version information configuration file.

[0156] The version information configuration file includes a preset version information storage location corresponding to each operating system type, a version name of each operating system version under each operating system type, and a designated operating system version corresponding to each operating system type.

[0157] The computing device can identify the operating system version of the image file based on the version information configuration file. Regarding the specific implementation of this process, please refer to the relevant description of S3022-S3023 above, which will not be repeated here.

[0158] S404: Match configuration item information based on the configuration item configuration file.

[0159] The configuration item configuration file may include configuration item information of each reference image file in the plurality of reference image files.

[0160] Based on the configuration item configuration file, the computing device may determine, from multiple reference image files, a target reference image file whose operating system type is the same as the image file's operating system type and whose operating system version is the same as the image file's operating system version, and determine the configuration item information of the target reference image file as the configuration item information of the image file. For the specific implementation of this process, please refer to the relevant description of S30311-S30312 above and will not be repeated here.

[0161] In one embodiment, Figure 6 , which is a schematic diagram of an operating system deployment process provided in an embodiment of the present application. Figure 6 The operating system deployment process shown includes: S1-S5.

[0162] S1. The user uploads the image file of the operating system to be deployed.

[0163] S2. The computing device identifies the operating system type and operating system version of the image file.

[0164] S3. The computing device outputs configuration item information of the operating system to be deployed.

[0165] S4. The user confirms whether to make adjustments based on the output configuration item information.

[0166] S5. The computing device completes deployment based on the confirmed configuration item information.

[0167] Based on the operating system deployment method provided in the embodiment of the present application, the user uploads the image file and confirms the configuration item information automatically matched by the device to complete the operating system deployment. There is no need to select the type and version of the operating system, nor is there any need to manually configure each configuration item.

[0168] The above mainly introduces the scheme of the embodiment of the present application from the perspective of method. It is understandable that, in order to realize the above functions, the computing device includes at least one of the hardware structure and software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0169] The embodiment of the present application can divide the computing device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0170] In the case of dividing each functional module into corresponding functional modules, Figure 7 FIG. 1 shows a possible structural diagram of the computing device involved in the above embodiment. Figure 7 FIG. 5 is a functional structure diagram of a computing device provided in an embodiment of the present application. The computing device 30 includes: an acquisition unit 501, a processing unit 502, and an execution unit 503.

[0171] The acquisition unit 501 is configured to acquire file features of the image file of the operating system to be deployed. The file features are used to characterize the file name of the image file and / or the folder structure of the image file.

[0172] The processing unit 502 is configured to identify the operating system type and operating system version of the image file based on the file characteristics of the image file.

[0173] The execution unit 503 is configured to deploy the operating system to be deployed using the image file based on the operating system type and the operating system version.

[0174] In one example, processing unit 502 is specifically configured to: identify an operating system type of the image file based on file features of the image file; obtain version information of the image file from the image file based on a preset version information storage location corresponding to the operating system type of the image file; and identify the operating system version of the image file based on the version information of the image file.

[0175] In one example, processing unit 502 is specifically configured to obtain an image file naming rule for each of a plurality of operating system types, determine a target operating system type from the plurality of operating system types whose image file naming rule matches the file name of the image file, and determine the target operating system type as the operating system type of the image file.

[0176] In one example, the file features include a folder structure feature vector of the image file. The folder structure feature vector is used to represent the importance of each folder in the image file. Processing unit 502 is specifically configured to obtain a folder structure feature vector for each of a plurality of operating system types. Based on the similarity between the folder structure feature vectors of each operating system type and the folder structure feature vector of the image file, the operating system type of the image file is determined from the plurality of operating system types.

[0177] In one example, the processing unit 502 is specifically configured to determine the similarity between the folder structure feature vectors of each operating system type and the folder structure feature vector of the image file, and determine the operating system type with the greatest similarity as the operating system type of the image file.

[0178] In one example, the file feature includes a folder structure feature vector of the image file. The folder structure feature vector is used to characterize the importance of each folder in the image file. The acquisition unit 501 is specifically used to: obtain the preset weight of each known folder in a plurality of known folders, and the preset weight of an unknown folder. Traverse the image file of the operating system to be deployed, and determine all the folders included in the image file of the operating system to be deployed. Identify the target folder in all the folders where the same known folder exists in multiple known folders, determine the preset weight of the same known folder as the weight of the target folder, and determine the preset weight of the unknown folder as the weight of other folders in all the folders, and obtain the folder structure feature vector of the image file.

[0179] In one example, processing unit 502 is specifically configured to obtain the version name of each operating system version under the operating system type, and the specified operating system version corresponding to the operating system type. If a target operating system version exists among the operating system versions, whose version name matches the version information of the image file, the target operating system version is determined as the operating system version of the image file. If a target operating system version does not exist among the operating system versions, whose version name matches the version information of the image file, the specified operating system version is determined as the operating system version of the image file.

[0180] In one example, the execution unit 503 is specifically configured to: determine configuration item information of the image file based on the operating system type and the operating system version, and deploy the operating system to be deployed using the image file based on the configuration item information.

[0181] In one example, the execution unit 503 is specifically configured to obtain configuration item information of each reference image file from a plurality of reference image files, determine a target reference image file from the plurality of reference image files having an operating system type identical to that of the image file and an operating system version identical to that of the image file, and determine the configuration item information of the target reference image file as the configuration item information of the image file.

[0182] For the detailed description of the above optional manner, please refer to the above method embodiment, which will not be repeated here. In addition, the explanation of any computing device 30 provided above and the description of its beneficial effects can refer to the above corresponding method embodiment, which will not be repeated here.

[0183] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is run on a computer, the computer is caused to execute the method executed by any one of the computing devices provided above.

[0184] For explanations of the relevant contents and descriptions of the beneficial effects of any of the computer-readable storage media provided above, reference may be made to the corresponding embodiments described above, and no further details will be given here.

[0185] The embodiment of the present application also provides a chip. The chip integrates a control circuit and one or more ports for implementing the functions of the above-mentioned computing device 30. Optionally, the functions supported by the chip can be referred to above and will not be repeated here. A person of ordinary skill in the art will understand that all or part of the steps of implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, an application specific integrated circuit (ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (FPGA) or other programmable logic device, transistor logic device, hardware component or any combination thereof.

[0186] The present application also provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to perform any of the methods described in the above embodiments. The computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available media may be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., SSD).

[0187] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to the above-mentioned memories, computer-readable storage media and communication chips, etc., are all non-transitory.

[0188] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more media that can be integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0189] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0190] Although the present application has been described with reference to specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely illustrative of the present application as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, the present application is intended to include such modifications and variations as fall within the scope of the claims of the present application and their equivalents.

Claims

1. A method for deploying an operating system, characterized in that: include: Obtain file characteristics of the image file of the operating system to be deployed; The file feature is used to characterize the file name of the image file and / or to characterize the folder structure of the image file; Based on the file characteristics of the image file, identifying the operating system type and operating system version of the image file; The operating system to be deployed is deployed using the image file based on the operating system type and the operating system version.

2. The method according to claim 1, characterized in that The identifying the operating system type and the operating system version of the image file based on the file features of the image file includes: Identifying an operating system type of the image file based on file characteristics of the image file; Obtaining the version information of the image file from the image file based on a preset version information storage location corresponding to the operating system type of the image file; Based on the version information of the image file, the operating system version of the image file is identified.

3. The method according to claim 2, characterized in that The file feature includes the file name of the image file; The identifying the operating system type of the image file based on the file features of the image file includes: Obtain the image file naming rules for each operating system type among multiple operating system types; A target operating system type whose image file naming rule matches the file name of the image file is determined from the multiple operating system types, and the target operating system type is determined as the operating system type of the image file.

4. The method according to claim 2, characterized in that The file feature includes a folder structure feature vector of the image file; the folder structure feature vector is used to represent the importance of each folder in the image file; The identifying the operating system type of the image file based on the file features of the image file includes: Obtaining a folder structure feature vector for each operating system type among multiple operating system types; The operating system type of the image file is determined from the multiple operating system types according to the similarity between the folder structure feature vector of each operating system type and the folder structure feature vector of the image file.

5. The method according to claim 4, characterized in that The determining the operating system type of the image file from the multiple operating system types according to the similarity between the folder structure feature vector of each operating system type and the folder structure feature vector of the image file includes: The similarity between the folder structure feature vector of each operating system type and the folder structure feature vector of the image file is determined, and the operating system type with the greatest similarity is determined as the operating system type of the image file.

6. The method according to claim 1, characterized in that The file feature includes a folder structure feature vector of the image file; the folder structure feature vector is used to represent the importance of each folder in the image file; The step of obtaining the file characteristics of the image file of the operating system to be deployed includes: Get the preset weight of each known folder in multiple known folders, as well as the preset weight of unknown folders; Traversing the image file of the operating system to be deployed, and determining all folders included in the image file of the operating system to be deployed; Identify a target folder among all the folders that has the same known folder as the multiple known folders, determine the weight of the target folder as the preset weight of the same known folder, and determine the weights of other folders in all the folders as the preset weight of the unknown folder, to obtain a folder structure feature vector of the mirror file.

7. The method according to claim 2, characterized in that The identifying the operating system version of the image file based on the version information of the image file includes: Obtain the version name of each operating system version under the operating system type, and the specified operating system version corresponding to the operating system type; If there is a target operating system version among the operating system versions whose version name matches the version information of the image file, the target operating system version is determined as the operating system version of the image file; If there is no target operating system version whose version name matches the version information of the image file among the various operating system versions, the designated operating system version is determined as the operating system version of the image file.

8. The method according to claim 1, characterized in that The deploying the operating system to be deployed by using the image file based on the operating system type and the operating system version includes: Determining configuration item information of the image file based on the operating system type and the operating system version; Based on the configuration item information, the operating system to be deployed is deployed using the image file.

9. The method according to claim 8, characterized in that The determining, based on the operating system type and the operating system version, the configuration item information of the image file includes: Obtain configuration item information of each reference image file in multiple reference image files; A target reference image file having the same operating system type and the same operating system version as the image file is determined from the multiple reference image files, and the configuration item information of the target reference image file is determined as the configuration item information of the image file.

10. A computing device, characterized in that The computing device includes a memory and a processor; the memory and the processor are electrically connected; the memory is used to store program instructions, and the processor is used to execute the program instructions, so that the computing device implements the operating system deployment method according to any one of claims 1 to 9.