Method and device for automatically initializing operating system and electronic equipment

By using preset initialization scripts on the preset configuration management platform, the operating system initialization process is automated, and the cost and error-prone problems caused by manual operations in the existing technology are solved, and efficient and accurate operating system initialization is achieved.

CN119645502APending Publication Date: 2025-03-18DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411592613.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In the prior art, operating system initialization relies on manual operations, resulting in high costs and error-proneness, especially in large-scale deployments that affect user experience.

Method used

Through the preset configuration management platform, the operating system initialization process is automated using preset initialization scripts. The method includes determining the target machine and the initialization script, negotiating the target interface, and transmitting and executing the initialization script through the interface.

Benefits of technology

The automatic initialization of the operating system is realized, which reduces manual intervention, reduces costs, and improves the accuracy and efficiency of the initialization process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645502A_ABST
    Figure CN119645502A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method for automatically initializing an operating system, which comprises the following steps of: uniformly initiating an interface calling task to each target machine needing to initialize the operating system by virtue of a preset configuration management platform, negotiating a corresponding target interface with the target machine, and automatically initializing the operating system. And then sending a target preset initialization script required by initialization of the operating system to the target machine based on the target interface, and sending a script starting execution instruction based on the target interface, so that each target machine executes the corresponding target preset initialization script based on the received script starting instruction. Therefore, the operation system initialization operation can be remotely, uniformly and automatically carried out on the target machine only by manually arriving at the physical position of the target machine, so that the labor cost is effectively saved, errors caused by insufficient artificial experience are reduced, and the use experience of a user is favorably guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software operation and maintenance technology, and in particular to a method, device, and electronic device for automatic initialization of an operating system. Background Art

[0002] In the computer industry, an operating system is system software that manages computer hardware and software resources. It provides an interface between users and applications and the computer hardware, managing system resources to ensure the efficient execution of programs and services. To ensure the proper operation of an operating system, it is typically necessary to configure the operating system based on the specific needs of the enterprise or user, and enter basic files and data when the operating system is first used. This initial setup and entry of basic files and data is referred to in the industry as operating system initialization.

[0003] In the prior art, operating system initialization is typically performed manually by maintenance personnel or administrators at server startup. This involves manually loading necessary drivers, configuring network settings, and installing software packages. This method of initializing an operating system requires significant administrator time and effort, especially in large-scale operating system deployments. This is costly and error-prone, negatively impacting user experience. Summary of the Invention

[0004] In view of this, embodiments of the present application provide a method, apparatus, and electronic device for automatically initializing an operating system to solve the problem of high cost and prone to errors in existing manual initialization of an operating system.

[0005] In a first aspect, a method for automatically initializing an operating system is provided, characterized in that the method is applied to a pre-configured configuration management platform, the pre-configured configuration management platform includes various pre-configured initialization scripts, each of the pre-configured initialization scripts corresponding to a different operating system initialization task, the method comprising:

[0006] Determine a target machine and a target preset initialization script, wherein the target machine is a machine device that requires automatic initialization of the operating system;

[0007] Initiating an interface call task to the target machine, negotiating a target interface with the target machine, and transmitting the target preset initialization script based on the target interface, wherein the target interface is a data interface obtained through negotiation with the target machine;

[0008] A script startup execution instruction is sent based on the target interface, so that the target machine executes the target preset initialization script based on the received script startup execution instruction.

[0009] In some possible embodiments, after the target machine executes the target preset initialization script step, the method further includes:

[0010] Based on the target interface, the execution result of the target preset initialization script is obtained, and the execution result is displayed on the user interface of the preset configuration management platform.

[0011] In some possible embodiments, the provisioning configuration management platform includes a user interface, and the method further includes:

[0012] According to the script group configuration policy input by the user in the user interface, the same script group identifier is assigned to the preset initialization scripts involved in the script group configuration policy;

[0013] And according to the script execution order corresponding to each preset initialization script included in the script group configuration policy, each target preset initialization script with the same script group identifier and a script start execution instruction are sent to the target machine, wherein the script start execution instruction carries the script execution order, so that the target machine executes the corresponding target preset initialization scripts according to the script execution order.

[0014] In some possible embodiments, the method further includes:

[0015] Receive a new or modified instruction from a user, wherein the new or modified instruction carries the script identification information of the preset initialization script to be added or modified;

[0016] The initialization script review process is triggered, and syntax checking, logic verification, and security review are performed on the preset initialization script corresponding to the script identification information.

[0017] In some possible embodiments, the method further includes:

[0018] According to the preset record typesetting requirements, the execution record and historical version information of the target preset initialization script are recorded.

[0019] In a second aspect, an embodiment of the present application provides a device for automatically initializing an operating system, the device being applied to a preset configuration management platform, the preset configuration management platform including various preset initialization scripts, each of which corresponds to performing a different operating system initialization task, the device comprising:

[0020] A determination module, configured to determine a target machine and a target preset initialization script, wherein the target machine is a machine device that requires automatic initialization of the operating system;

[0021] a data interaction module, configured to initiate an interface call task to the target machine, negotiate a target interface with the target machine, and transmit the target preset initialization script based on the target interface, wherein the target interface is a data interface negotiated with the target machine;

[0022] The initialization module is used to send a script startup execution instruction based on the target interface, so that the target machine executes the target preset initialization script based on the received script startup execution instruction.

[0023] In some possible embodiments, the device further includes: a user interface, wherein:

[0024] The data interaction module is further configured to obtain, based on the target interface, an execution result of the target preset initialization script after the target machine executes the target preset initialization script step;

[0025] The user interface is used to display the execution result.

[0026] In some possible embodiments, the determining module is further configured to assign a same script group identifier to the preset initialization scripts involved in the script group configuration policy according to the script group configuration policy input by the user in the user interface;

[0027] The initialization module is further configured to send each target preset initialization script having the same script group identifier and a script start execution instruction to the target machine according to the script execution order corresponding to each preset initialization script included in the script group configuration policy, wherein the script start execution instruction carries the script execution order, so that the target machine executes the corresponding target preset initialization scripts according to the script execution order.

[0028] In a third aspect, an embodiment of the present application provides an electronic device, wherein the electronic device includes:

[0029] processor; and

[0030] Memory for storing programs,

[0031] The program includes instructions, which, when executed by the processor, enable the processor to execute the method for automatic initialization of the operating system described in the first aspect.

[0032] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, characterized in that the computer instructions are used to enable a computer to execute the method for automatic initialization of an operating system described in the first aspect.

[0033] Beneficial effects of this application:

[0034] The embodiment of the present application provides a method for automatic initialization of an operating system. With the help of a preset configuration management platform, an interface call task is uniformly initiated to each target machine that needs to initialize the operating system, a corresponding target interface is negotiated with the target machine, and then the target preset initialization script required for operating system initialization is sent to the target machine based on the target interface, and a script startup execution instruction is sent based on the target interface, so that each target machine executes the corresponding target preset initialization script based on the received script startup instruction. In this way, there is no need for manual arrival at the physical location of the target machine, and the operating system initialization operation can be performed remotely, uniformly, and automatically on the target machine, effectively saving labor costs and reducing errors caused by insufficient manual experience, which is conducive to ensuring the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Further details, features and advantages of the present application are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0036] Figure 1 A schematic diagram showing a flow chart of a method for automatic initialization of an operating system provided in an embodiment of the present application is shown;

[0037] Figure 2 A schematic diagram of the structure of an apparatus for automatic initialization of an operating system provided in an embodiment of the present application is shown;

[0038] Figure 3 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present application is shown. DETAILED DESCRIPTION

[0039] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of protection of the present application.

[0040] It should be understood that the various steps described in the method embodiments of the present application can be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.

[0041] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0042] It should be noted that the modifications of "one" and "multiple" mentioned in this application are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0043] In the first aspect, the present application provides a method for automatically initializing an operating system, which is applicable to any electronic device with the function of initializing an operating system, including but not limited to a personal mobile terminal, a computer, or a server. In some possible embodiments, Figure 1 As shown, the method includes the following steps:

[0044] S11, determining a target machine and a target preset initialization script, wherein the target machine is a machine device that requires automatic initialization of the operating system;

[0045] S12: Initiate an interface call task to the target machine, negotiate a target interface with the target machine, and transmit the target preset initialization script based on the target interface, wherein the target interface is a data interface negotiated with the target machine;

[0046] S13: Send a script start execution instruction based on the target interface, so that the target machine executes the target preset initialization script based on the received script start execution instruction.

[0047] Among them, the embodiment of the present application is selected, with the help of the preset configuration management platform, to uniformly initiate interface call tasks to each target machine that needs to initialize the operating system, negotiate the corresponding target interface with the target machine, and then send the target preset initialization script required for operating system initialization to the target machine based on the target interface, and send the script startup execution instruction based on the target interface, so that each target machine executes the corresponding target preset initialization script based on the received script startup instruction. In this way, there is no need for manual arrival at the physical location of the target machine, and the operating system initialization operation can be performed remotely, uniformly, and automatically on the target machine, which effectively saves labor costs and reduces errors caused by insufficient manual experience, which is conducive to ensuring the user experience.

[0048] The following will describe the above steps S11 to S13 in detail in conjunction with specific implementations:

[0049] In an embodiment of the present application, the method for automatic initialization of an operating system is applied to a pre-configured configuration management platform, which is a software platform installed on any electronic device with an operating system initialization function. The pre-configured configuration management platform includes various initialization scripts that are pre-uploaded, configured, or deployed on the platform by users. The initialization scripts that are pre-uploaded, configured, or deployed on the platform by users are referred to herein as preset initialization scripts. As a preferred embodiment, the pre-configured configuration management platform can be a software platform generated based on Ansible technology, wherein Ansible is an open source operation and maintenance tool developed based on the Python language.

[0050] In an embodiment of the present application, a script is a text file of a series of instructions or commands for performing a specific task or operation, specifically a text file of a series of instructions or commands for executing operating system initialization. Among them, the script is written in a specific scripting language, such as a Shell script, a Python script, a JavaScript script, etc. Scripting languages ​​generally have simple syntax and flexible features, and are used for tasks such as automation, batch processing, and system management. In an embodiment of the present application, the various scripts used for operating system initialization are collectively referred to as preset initialization scripts, which are script files written in Shell, Python, or JavaScript scripting languages ​​in advance by operation and maintenance personnel or users according to the processing actions required to be performed for operating system initialization.

[0051] As an implementation method, the preset initialization scripts in this application are specifically subdivided into: a general system kernel parameter adjustment script, a system software package installation script, and a third-party application installation script. The system kernel refers to the core part of the operating system, responsible for managing the operating system's underlying resources, such as memory resources, CPU processing resources, and device drivers. The system kernel is used to execute step S12 above to negotiate a target interface with the target machine, thereby allowing the operating system to call the target interface and allowing applications to access system resources.

[0052] In an embodiment of the present application, a general system kernel parameter adjustment script is used to adjust the operating system kernel parameters, specifically including adjusting file description limits, TCP parameter optimization, memory management parameter configuration, etc. A system software package installation script is used to install the software packages and dependencies required by the operating system to ensure that the operating system can work properly. Among them, different software installation package requirements correspond to different installation scripts. For example, the system software installation scripts corresponding to basic system tools, development libraries, compilers, etc. are not the same. A third-party application installation script is used to provide a host client and monitoring tools for scenarios where third-party applications need to be installed. Different third-party applications have different corresponding installation scripts, which can be flexibly designed according to actual needs.

[0053] In an embodiment of the present application, the various preset initialization scripts used for operating system initialization can be uniformly managed and stored in a script library. Through a unified naming rule, the various preset initialization scripts can be stored in the same script library. Subsequent operation and maintenance personnel or users can update and maintain the preset initialization scripts through the script library.

[0054] In the embodiment of the present application, the target machine refers to a machine device that requires operating system initialization. The machine device can be any type of electronic device, wherein the judgment condition for the need for operating system initialization can be that the system starts to be enabled, or the operating system fails and needs to be reset. As an embodiment, the preset configuration management platform includes a user interface. When executing step S11, the user can enter or check the identifier of the device that requires operating system initialization on the user interface, such as the device number, device name, and communication address of the device. The preset configuration management platform obtains the target device that requires operating system initialization by parsing the device identifier passed in by the user interface.

[0055] Similarly, when executing step S11, the user may input or select a corresponding preset initialization script on the user interface. The preset configuration management platform parses the preset initialization script inputted by the user interface and determines the preset initialization script inputted by the user interface as the target preset initialization script. In the embodiment of the present application, the target preset initialization script does not refer to just one preset initialization script, but may be a batch of preset initialization scripts. Specifically, it refers to the preset initialization scripts selected by the user, and the specific number is not limited.

[0056] In some embodiments, the user can configure multiple preset initialization scripts based on the actual operating system initialization requirements, and configure multiple preset initialization scripts for the operating system initialization of the same target machine into a script group configuration policy. On this basis, the method for automatic operating system initialization provided in the embodiment of the present application may also include the following steps:

[0057] According to the script group configuration policy input by the user in the user interface, the same script group identifier is assigned to the preset initialization scripts involved in the script group configuration policy;

[0058] And according to the script execution order corresponding to each preset initialization script included in the script group configuration policy, each target preset initialization script with the same script group identifier and a script start execution instruction are sent to the target machine, wherein the script start execution instruction carries the script execution order, so that the target machine executes the corresponding target preset initialization scripts according to the script execution order.

[0059] As an implementation method, the script group configuration policy input by the user in the user interface includes multiple preset initialization scripts. At this time, the preset configuration management platform assigns a script group identifier to the script group configuration policy, specifically assigning the same script group identifier to the multiple preset initialization scripts in the script group configuration policy.

[0060] As another implementation, a target machine can be bound to a script group configuration policy. That is, each preset initialization script involved in the script group configuration policy is adapted to the target machine. Later, when the target machine's operating system fails and needs to be reset, the preset initialization scripts adapted to the target machine can be quickly retrieved according to the script group configuration policy to initialize the operating system of the target machine. In this way, when the user needs to initialize the operating system, they only need to directly enter or check the script group identifier to load the effects of multiple target preset initialization scripts.

[0061] As another embodiment, each configuration script in the script library can be combined according to different scenarios and requirements to form script groups, which can obtain a script configuration strategy group. Each script group has recorded the target script that needs to be executed, and these target scripts can come from different configuration scripts, thus realizing the integration and combination of multiple scripts. In this way, the user can flexibly select the script group that needs to be executed according to different scenario requirements, thereby realizing targeted initialization configuration. Different script groups can meet different scenario requirements, such as basic system initialization, development environment deployment, production environment configuration, etc., and the user can select and combine according to actual conditions.

[0062] In an embodiment of the present application, the script group configuration strategy includes not only the specific preset initialization scripts that need to be executed, but also the specific execution order of each preset initialization script that needs to be executed, so as to ensure the logical order and consistency of the execution of the preset initialization scripts, wherein the specific execution order of each preset initialization script can be determined according to the specific order of each preset initialization script. In the exemplary first preset initialization script-a and the second preset initialization script-b, a and b respectively represent the execution order of the first preset initialization script and the execution order of the second preset initialization script, wherein the first preset initialization script is executed before the second preset initialization script.

[0063] In this way, when each preset initialization script in the entire script group configuration policy is executed in the target machine, the target machine can determine the corresponding script execution order according to the script group configuration policy sent by the preset configuration management platform, and then execute the corresponding target preset initialization script according to the script execution order required by the script group configuration policy, which can avoid execution order conflicts and uncertainties between scripts and ensure the effectiveness and stability of the preset initialization script execution.

[0064] In an embodiment of the present application, the preset configuration management platform and the target machine are two independent devices, and the two can establish a communication connection through a remote communication protocol. Based on this, when the preset configuration management platform executes step S12, it can remotely send an interface call task to the target machine. The interface call task carries the communication address of the preset configuration management platform and the corresponding data interface information. After receiving the interface call task, the target machine can obtain and record the communication address and corresponding data interface information of the preset configuration management platform by parsing the interface call task. The target machine allocates a data interface to the preset configuration management platform based on the received interface call task. The two can determine which specific interface to use for data interaction through negotiation. After the target interface is negotiated, the target preset initialization script is transmitted based on the target interface, or a script group configuration strategy carrying multiple preset initialization scripts is transmitted.

[0065] In this way, when executing step S13, after the target machine completely receives and saves the target preset initialization script or script group configuration policy, the preset configuration management platform can send a script startup execution instruction to the target interface to instruct the target machine to execute the target preset initialization script or multiple target preset initialization scripts in the script group configuration policy based on the received script startup execution instruction.

[0066] Based on step S13, in some embodiments, the method for automatic initialization of the operating system provided by this application may further include the following steps:

[0067] Based on the target interface, the execution result of the target preset initialization script is obtained, and the execution result is displayed on the user interface of the preset configuration management platform.

[0068] In an embodiment of the present application, the target machine will continuously generate execution results during the execution of the target preset initialization script. During this process, the target machine can continuously transmit the execution results back to the preset configuration management platform through the target interface, and the preset configuration management platform will display the corresponding execution results through the user interface.

[0069] In some embodiments, there is a need to update and maintain a preset initialization script. Based on this, the method for automatic initialization of the operating system provided in this application may further include the following steps:

[0070] Receive a new or modified instruction from a user, wherein the new or modified instruction carries the script identification information of the preset initialization script to be added or modified;

[0071] The initialization script review process is triggered, and syntax checking, logic verification, and security review are performed on the preset initialization script corresponding to the script identification information.

[0072] Among them, the user can input or check the corresponding operation type in the user interface, such as adding or modifying, and then the user interface generates the corresponding new instruction or modification instruction, which carries the script identification information of the preset initialization script to be added or modified. According to the script identification information, the corresponding preset initialization script is retrieved from the script library, and the corresponding preset initialization script editing box is displayed to the user, and the user modifies the script in the script editing box, or the corresponding preset initialization script submission box is displayed to the user, and the user submits the already written initialization script in the script submission box.

[0073] When a user modifies or adds a new script, the initialization script review process will be automatically triggered, and the information of each reviewer responsible for reviewing the initialization script will be added to the review process. The review process will then be distributed to different reviewers, who will review the newly added or modified initialization scripts. As another implementation method, the preset configuration management platform can automatically review the initialization script based on the provisions of the audit logic file. The specific review content includes: syntax checking, logic verification, and security review. When all the review contents are reviewed and passed, the initialization script can be sent to the script library for update, thereby ensuring the timeliness and effectiveness of the initialization script.

[0074] In some embodiments, the method for automatic initialization of an operating system provided by this application may further include the following steps:

[0075] According to the preset record typesetting requirements, the execution record and historical version information of the target preset initialization script are recorded.

[0076] In an embodiment of the present application, after the execution of the operating system initialization task is completed, the execution status of each preset initialization script, such as whether each script is executed successfully and the reason for the execution failure, etc., can be transmitted back to the preset configuration management platform through the target interface. After receiving the execution status, the preset configuration management platform records the execution record and historical version information in accordance with the pre-required record typesetting format, so that the user can view the detailed task execution results in time, and promptly discover and solve problems that may arise during the execution process, and view the task execution history and results at any time, so that the user can trace back the specific execution status, understand the details and changes of each operating system initialization, help analyze and troubleshoot problems, and ensure the stability and reliability of the operating system.

[0077] In a second aspect, an embodiment of the present application provides a device for automatically initializing an operating system, the device being applied to a preset configuration management platform, the preset configuration management platform including various preset initialization scripts, each of which corresponds to performing a different operating system initialization task, the device 20 comprising:

[0078] The determination module 201 is used to determine a target machine and a target preset initialization script, wherein the target machine is a machine device that needs to perform automatic initialization of the operating system;

[0079] The data interaction module 202 is configured to initiate an interface call task to the target machine, negotiate a target interface with the target machine, and transmit the target preset initialization script based on the target interface, wherein the target interface is a data interface negotiated with the target machine;

[0080] The initialization module 203 is configured to send a script start execution instruction based on the target interface, so that the target machine executes the target preset initialization script based on the received script start execution instruction.

[0081] In some possible embodiments, the device further includes: a user interface, wherein:

[0082] The data interaction module is further configured to obtain, based on the target interface, an execution result of the target preset initialization script after the target machine executes the target preset initialization script step;

[0083] The user interface is used to display the execution result.

[0084] In some possible embodiments, the determining module is further configured to assign a same script group identifier to the preset initialization scripts involved in the script group configuration policy according to the script group configuration policy input by the user in the user interface;

[0085] The initialization module is further configured to send each target preset initialization script having the same script group identifier and a script start execution instruction to the target machine according to the script execution order corresponding to each preset initialization script included in the script group configuration policy, wherein the script start execution instruction carries the script execution order, so that the target machine executes the corresponding target preset initialization scripts according to the script execution order.

[0086] In some possible embodiments, the determining module is further configured to:

[0087] Receive a new or modified instruction from a user, wherein the new or modified instruction carries the script identification information of the preset initialization script to be added or modified;

[0088] The device further includes a script review module, which is used to trigger an initialization script review process and perform syntax checking, logic verification, and security review on a preset initialization script corresponding to the script identification information.

[0089] In some possible embodiments, the device further includes: a historical data recording module, wherein the historical data recording module is further configured to record execution records and historical version information of the target preset initialization script according to preset record typesetting requirements.

[0090] Among them, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0091] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0092] In a third aspect, exemplary embodiments of the present application further provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, wherein the computer program, when executed by the at least one processor, causes the electronic device to perform a method according to an embodiment of the present application.

[0093] In a fourth aspect, an exemplary embodiment of the present application further provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to enable the computer to perform a method according to an embodiment of the present application.

[0094] In a fifth aspect, an exemplary embodiment of the present application further provides a computer program product, comprising a computer program, wherein the computer program, when executed by a processor of a computer, is used to enable the computer to perform a method according to an embodiment of the present application.

[0095] refer to Figure 3 , a block diagram of an electronic device 300 that can serve as a server or client of the present application will now be described, which is an example of a hardware device that can be applied to various aspects of the present application. The electronic device is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0096] like Figure 3 As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. Various programs and data required for the operation of the electronic device 300 can also be stored in the RAM 303. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0097] Multiple components within electronic device 300 are connected to I / O interface 305, including an input unit 306, an output unit 307, a storage unit 308, and a communication unit 309. Input unit 306 can be any type of device capable of inputting information into electronic device 300. Input unit 306 can receive input numeric or character information and generate key input signals related to user settings and / or function control of the electronic device. Output unit 307 can be any type of device capable of presenting information and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. Storage unit 308 may include, but is not limited to, a magnetic disk or an optical disk. Communication unit 309 allows electronic device 300 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunication networks and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver and / or chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0098] The computing unit 301 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above. For example, in some embodiments, the aforementioned method for automatic initialization of the operating system can be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 300 via the ROM 302 and / or the communication unit 309. In some embodiments, the computing unit 301 can be configured to perform the aforementioned method for automatic initialization of the operating system by any other appropriate means (e.g., by means of firmware).

[0099] The program code for implementing the methods of the present application can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow charts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0100] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0101] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., a magnetic disk, an optical disk, a memory, a programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0103] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0104] A computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The client and server relationship arises through computer programs running on the respective computers and having a client-server relationship to each other.

Claims

1. A method for automatically initializing an operating system, characterized in that: The method is applied to a preset configuration management platform, wherein the preset configuration management platform includes various preset initialization scripts, each of which corresponds to executing a different operating system initialization task. The method includes: Determine a target machine and a target preset initialization script, wherein the target machine is a machine device that needs to automatically initialize the operating system; Initiating an interface call task to the target machine, negotiating a target interface with the target machine, and transmitting the target preset initialization script based on the target interface, wherein the target interface is a data interface negotiated with the target machine; A script startup execution instruction is sent based on the target interface, so that the target machine executes the target preset initialization script based on the received script startup execution instruction.

2. The method according to claim 1, characterized in that After sending a script startup execution instruction based on the target interface so that the target machine executes the target preset initialization script step based on the received script startup execution instruction, the method further includes: Based on the target interface, the execution result of the target preset initialization script is obtained, and the execution result is displayed on the user interface of the preset configuration management platform.

3. The method according to claim 1, characterized in that The pre-configuration management platform includes a user interface, and the method further includes: According to the script group configuration policy input by the user in the user interface, the same script group identifier is assigned to the preset initialization scripts involved in the script group configuration policy; And according to the script execution order corresponding to each preset initialization script contained in the script group configuration strategy, each target preset initialization script with the same script group identifier and a script start execution instruction are sent to the target machine, wherein the script start execution instruction carries the script execution order, so that the target machine executes the corresponding target preset initialization scripts according to the script execution order.

4. The method according to claim 1, characterized in that: The method further comprises: Receive a new or modified instruction from a user, wherein the new or modified instruction carries script identification information of a preset initialization script to be added or modified; The initialization script review process is triggered, and syntax checking, logic verification, and security review are performed on the preset initialization script corresponding to the script identification information.

5. The method according to claim 1, characterized in that: The method further comprises: According to the preset record typesetting requirements, the execution record and historical version information of the target preset initialization script are recorded.

6. A device for automatically initializing an operating system, characterized in that: The device is applied to a preset configuration management platform, the preset configuration management platform includes various preset initialization scripts, each of the preset initialization scripts corresponds to executing a different operating system initialization task, and the device includes: A determination module, used to determine a target machine and a target preset initialization script, wherein the target machine is a machine device that needs to perform automatic initialization of the operating system; A data interaction module, used to initiate an interface call task to the target machine, negotiate a target interface with the target machine, and transmit the target preset initialization script based on the target interface, wherein the target interface is a data interface negotiated with the target machine; The initialization module is used to send a script startup execution instruction based on the target interface, so that the target machine executes the target preset initialization script based on the received script startup execution instruction.

7. The device according to claim 6, characterized in that The device also includes: a user interface, wherein: The data interaction module is further configured to obtain, based on the target interface, an execution result of the target preset initialization script after the target machine executes the target preset initialization script step; The user interface is used to display the execution result.

8. The device according to claim 6, characterized in that The determination module is further configured to allocate a same script group identifier to the preset initialization scripts involved in the script group configuration policy according to the script group configuration policy input by the user in the user interface; The initialization module is also used to send each target preset initialization script with the same script group identifier and a script start execution instruction to the target machine according to the script execution order corresponding to each preset initialization script contained in the script group configuration strategy, wherein the script start execution instruction carries the script execution order, so that the target machine executes the corresponding each target preset initialization script according to the script execution order.

9. An electronic device, characterized in that: The electronic device comprises: Processor; and Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 5.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-5.