[go: up one dir, main page]

WO2024179294A1 - Component deployment method and apparatus, electronic device, and storage medium - Google Patents

Component deployment method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2024179294A1
WO2024179294A1 PCT/CN2024/076368 CN2024076368W WO2024179294A1 WO 2024179294 A1 WO2024179294 A1 WO 2024179294A1 CN 2024076368 W CN2024076368 W CN 2024076368W WO 2024179294 A1 WO2024179294 A1 WO 2024179294A1
Authority
WO
WIPO (PCT)
Prior art keywords
component
target
target component
deployment
ram disk
Prior art date
Application number
PCT/CN2024/076368
Other languages
French (fr)
Chinese (zh)
Inventor
田永江
郭闯
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2024179294A1 publication Critical patent/WO2024179294A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Definitions

  • the present application relates to but is not limited to the field of computer technology.
  • the initial RAM (random access memory) disk is an important component and an important part of the operating system boot process.
  • the initial RAM disk is a global shared file. The creation of this file is obviously time-consuming, and the creation of this file can be independently created and overwritten multiple times by individual components, programs, or people, so that only the last result is applied.
  • Embodiments of the present application provide a component deployment method, device, electronic device, and storage medium.
  • an embodiment of the present application provides a component deployment device, comprising: a first acquisition unit, configured to acquire a component deployment instruction, and determine a target component that the component deployment instruction indicates to be deployed; a first execution unit, configured to execute a target deployment operation represented by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operations of an initial random access memory RAM disk; a second acquisition unit, configured to acquire preset global information from a system where the target component is located, wherein the preset global information is used to indicate a creation subject of the initial RAM disk; a control unit, configured to prohibit the target component from creating and overwriting the initial RAM disk when the creation subject is not the target component.
  • an embodiment of the present application provides an electronic device, comprising: a memory configured to store a computer program; a processor configured to execute the computer program stored in the memory, and when the computer program is executed, implements any component deployment method described herein.
  • an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, it implements any component deployment method described herein.
  • an embodiment of the present application provides a computer program, which includes a computer-readable code.
  • a processor in the device implements any component deployment method described herein.
  • FIG1 is a schematic diagram of a flow chart of a component deployment method provided in an embodiment of the present application.
  • FIG2 is a flow chart of another component deployment method provided in an embodiment of the present application.
  • FIG3A is a schematic diagram of a flow chart of another component deployment method provided in an embodiment of the present application.
  • FIG3B is a schematic diagram of a flow chart of another component deployment method provided in an embodiment of the present application.
  • FIG3C is a flow chart of another component deployment method provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of the structure of a component deployment device provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • first and second in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.
  • plurality may refer to two or more than two, and “at least one” may refer to one, two or more than two.
  • FIG1 is a flow chart of a component deployment method provided by an embodiment of the present application.
  • the method can be applied to one or more electronic devices such as smart phones, laptops, desktop computers, portable computers, servers, etc.
  • the execution subject of the method can be hardware or software.
  • the execution subject can be one or more of the above-mentioned electronic devices.
  • a single electronic device can execute the method, or multiple electronic devices can cooperate with each other to execute the method.
  • the above-mentioned execution subject is software
  • the method can be implemented as multiple software or software modules, or as a single software or software module. No special limitation is made here.
  • the method may include steps 101 to 104 .
  • Step 101 Obtain a component deployment instruction, and determine a target component to be deployed as instructed by the component deployment instruction.
  • the above component deployment instruction can be used to indicate the deployment target component.
  • the target component can be the main packaging form of the kernel, driver, and user-mode program before deployment.
  • the target component can be a component package in a management format such as rpm or deb.
  • the target component can be ixgbe, megaraid_sas, i40e, smartpqi, mpt3sas, ixgbevf, and igb.
  • the target component may be a component in various systems.
  • the target component may be a component in any of the following systems: Windows operating system, Linux operating system, Android operating system, etc.
  • Step 102 executing the target component represented by the component deployment instruction through the target component A deployment operation, wherein the target deployment operation does not include a creation and overwriting operation of an initial random access memory RAM disk.
  • the target deployment operation may be other deployment operations other than the creation and overwriting operations of the RAM disk among the target deployment operations represented by the component deployment instruction.
  • the component deployment instruction may also be used to instruct: to perform other deployment operations other than the creation and overwriting operations of the RAM disk.
  • the initial RAM disk is a complete root file system, which contains the necessary components of a Linux operating system (such as drivers, process user-mode programs, dynamic libraries, etc.) in addition to the kernel.
  • a Linux operating system such as drivers, process user-mode programs, dynamic libraries, etc.
  • the initial RAM disk creation is based on the files and configurations in the local root file system.
  • the configuration of the creation tool (such as dracut, mkinitrd) is used as the basis for file screening and supplementation.
  • the relevant files are collected, packaged according to the initial RAM disk format, and placed in the specified location for global use.
  • the Linux operating system mainly consists of grub, kernel, driver, initial RAM disk, local root file system, and user-mode programs.
  • the kernel, driver, and user-mode programs are mainly packaged in component packages (such as target components) before deployment, such as rpm and deb package management formats.
  • grub first boots the kernel, then the kernel loads the initial RAM disk as the root file system, loads the driver in it, executes related programs, and then the kernel cuts the root to the local root file system and starts related programs, finally completing the startup of the operating system.
  • the initial RAM disk is strongly related to the kernel. If multiple different kernels are deployed on a Linux system at the same time, each kernel will have a corresponding initial RAM disk to adapt to the kernel and serve as the initial RAM disk shared by the system when the kernel is running.
  • the target deployment operation includes at least one of the following: signature verification of the target component, checking dependent components of the target component, file deployment and configuration, and updating record information indicating that the target component has been deployed.
  • the target component can perform signature verification on the target component, check the dependent components of the target component, file deployment and configuration.
  • the method further comprises: configuring and updating at least one deployment operation in the record information indicating that the target component has been deployed.
  • Step 103 Acquire preset global information from the system where the target component is located, wherein the preset global information is used to indicate a creation subject of the initial RAM disk.
  • the following step may also be executed: when the creation subject is the target component, the initial RAM disk is created and overwritten by the target component.
  • the initial RAM disk is created and overwritten by the target component only when the creation subject is the target component. In this way, by presetting global information to control whether the initial RAM disk is created and overwritten by the target component, more effective control of the total component deployment duration in multiple component deployment scenarios is achieved.
  • the component deployment method provided in the embodiment of the present application can obtain a component deployment instruction and determine the target component to be deployed indicated by the component deployment instruction. Then, the target deployment operation indicated by the component deployment instruction is executed through the target component, wherein the target deployment operation does not include the creation and overwriting operation of the initial random access memory RAM disk. Then, preset global information is obtained from the system where the target component is located, wherein the preset global information is used to indicate the creation subject of the initial RAM disk. Finally, when the creation subject is not the target component, the creation and overwriting of the target component are prohibited. Overwrite the initial RAM disk.
  • Step 201 Obtain a component deployment instruction, and determine a target component to be deployed as instructed by the component deployment instruction.
  • step 201 is substantially the same as step 101 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.
  • Step 202 Execute the target deployment operation represented by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operation of the initial random access memory RAM disk.
  • step 202 is substantially the same as step 102 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.
  • Step 203 Obtain preset global information from the system where the target component is located, wherein the preset global information is used to indicate a creation subject of the initial RAM disk.
  • step 203 is substantially the same as step 103 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.
  • Step 204 when the creation subject is not the target component, prohibit the target component from creating and overwriting the initial RAM disk.
  • step 204 is substantially the same as step 104 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.
  • Step 205 When the operating environment of the target component does not match the system environment of the system, a component external object is determined as the creation subject.
  • the operating environment of the target component and the system can be determined by determining whether the target component can be successfully deployed or run normally in the system environment. Whether the system environment matches.
  • the component external object may be any object (such as a program or toolkit) included in the above system except the target component, or may be a user.
  • Step 206 creating and overwriting the initial RAM disk through the component external object.
  • the initial RAM disk when the creation subject is the target component and the operating environment of the target component does not match the system environment of the system, the initial RAM disk can be created and overwritten via the component external object.
  • the operating environment of the target component matches the system environment of the system (that is, the target component can be successfully deployed or run normally in the system environment)
  • the initial RAM disk may not be created and overwritten.
  • the following method can be adopted to obtain the preset global information from the system where the target component is located: obtain the preset global information from the system where the target component is located through the target component.
  • the initial RAM disk can be created and overwritten through the component external object in the following manner: the first step is to obtain the preset global information from the system where the target component is located through the component external object; the second step is to create and overwrite the initial RAM disk through the component external object when the creation subject is not the target component.
  • the target component may be controlled to be redeployed or repaired.
  • whether there is a deployment anomaly in the target component can be determined through a component external object to ensure that the target component is deployed normally.
  • the following methods can be used to Creating and overwriting the initial RAM disk through the component external object: performing the creation and overwriting operation of the initial RAM disk once through the component external object, so as to create and overwrite the initial RAM disk for at least two of the target components.
  • the operating environment information of the component can be recorded after each deployment of the target component.
  • the intersection of the default operating environment information and the recorded operating environment information can be used as the content of creating and deploying the initial RAM disk.
  • an initial RAM disk can be created and deployed for at least two target components by performing an initial RAM disk creation and overwriting operation. This reduces the number of times the initial RAM disk is created and overwritten, thereby reducing the loss of the initial RAM disk and saving the total component deployment time in multiple component deployment scenarios.
  • this embodiment may also include the corresponding technical features described in the embodiment corresponding to Figure 1, so as to achieve the technical effect of the component deployment method shown in Figure 1. Please refer to the relevant description of Figure 1 for details. For the sake of brevity, it will not be repeated here.
  • the component deployment method provided in the embodiment of the present application creates and overwrites the initial RAM disk through the external object of the component only when the creation subject is the above-mentioned target component and the operating environment of the target component does not match the system environment of the system. Therefore, when the operating environment of the target component matches the system environment of the system, there is no need to create and overwrite the initial RAM disk, which further reduces the number of times the initial RAM disk is created and overwritten, thereby reducing the loss of the initial RAM disk and saving the total component deployment time in multiple component deployment scenarios.
  • FIG3A is a flow chart of another component deployment method provided in an embodiment of the present application.
  • the method may include steps 301 to 305 .
  • Step 301 obtaining a component deployment instruction, and determining a target component to be deployed according to the component deployment instruction, wherein the system where the target component is located is a Linux operating system.
  • the above component deployment instruction can be used to indicate the deployment target group Piece.
  • the target component can be the main packaging form of the kernel, driver, and user-mode program before deployment.
  • the target component can be a component package in a management format such as rpm or deb.
  • the target component can be ixgbe, megaraid_sas, i40e, smartpqi, mpt3sas, ixgbevf, and igb.
  • target component may be a component in a Linux operating system.
  • step 301 is substantially the same as step 101 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.
  • Step 302 Execute the target deployment operation represented by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operation of the initial random access memory RAM disk.
  • step 302 is substantially the same as step 102 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.
  • Step 303 Determine a pre-set global configuration file from the Linux operating system where the target component is located.
  • Step 304 query preset global information from the global configuration file, wherein the preset global information is used to indicate a creation subject of the initial RAM disk.
  • Step 305 When the creation subject is not the target component, prohibit the target component from creating and overwriting the initial RAM disk.
  • system where the target component is located may be a Linux operating system.
  • the preset global information may be stored in a storage space other than the target component in the above system.
  • Figure 3B is a flow chart of another component deployment method provided in an embodiment of the present application. The method includes the following steps 1 to 9.
  • Step 1 a person or program (ie, the above-mentioned component external object) sets "whether to make the initial RAM disk is determined by the outside of the component package" information (ie, the above-mentioned preset global information) outside the component package (ie, the above-mentioned target component).
  • Step 2 When a person or program starts to deploy (install, upgrade, uninstall) a component package, several actions are first performed inside the component package (i.e., the target deployment operations described above, such as component package signature verification and dependent component checking).
  • Step 3 Deploy and configure files within the component package, that is, perform the above-mentioned target deployment operation.
  • Step 4 the component package queries the external decision information of the component package (that is, the above-mentioned preset global information). If it is determined by the outside (that is, the above-mentioned component external object) to make the initial RAM disk, jump to step 6; if not, continue to execute step 5.
  • the external decision information of the component package that is, the above-mentioned preset global information. If it is determined by the outside (that is, the above-mentioned component external object) to make the initial RAM disk, jump to step 6; if not, continue to execute step 5.
  • Step 5 If the component package determines that an initial RAM disk needs to be created, the initial RAM disk is created and overwritten with the initial RAM disk shared by the entire system; if it does not need to be created, the initial RAM disk is not created.
  • Step 6 Finishing actions within the component package (i.e., the target deployment operations mentioned above, such as updating the record information of the installed component packages of the entire system).
  • Step 8 Post-deployment inspection, for example, a person or program checks whether the component package deployment is abnormal. often.
  • Step 9 A person or program queries external decision information. If the initial RAM disk is not made by external decision, it will not be made; if it is, it will be made and will cover the initial RAM disk shared by the entire system. It should be pointed out that: in special scenarios (for example, the current environment is a virtual machine environment, even if a driver component is deployed, but the environment does not have a device corresponding to the driver), a person or program may decide not to make an initial RAM disk; a person or program may also create multiple initial RAM disks according to their own special needs.
  • a person or program that is, the external object of the above-mentioned component deploys (installs, upgrades, uninstalls) the rpm component package.
  • Figure 3C is a flow chart of another component deployment method provided in an embodiment of the present application.
  • the creation tool queries and determines internally.
  • the creation tool may be dracut or mkinitrd.
  • global information "whether the production of the initial RAM disk is determined by the outside of the component package" is set. Inside the component package, after completing the "file deployment and configuration” action, the above global information can be queried. Inside the component package, after completing the "file deployment and configuration” action, the above global information can be judged to determine whether the component package itself can produce the initial RAM disk. Outside the component package, in the tool for producing the initial RAM disk, the above global information can be queried. Outside the component package, in the tool for producing the initial RAM disk, the above global information can be judged to determine whether the production tool itself can produce the initial RAM disk. Outside the component package, a person can query the above global information.
  • a person can judge the above global information to determine whether the person himself can produce the initial RAM disk. Therefore, the operating system interface is not deleted, and a global query interface is added for querying whether the production of the initial RAM disk is determined by the outside of the component package, which can be queried by the component package, program, and person.
  • This solution can greatly reduce the time spent on new installation of Linux systems and batch deployment of component packages.
  • this embodiment may also include the technical features described in the above embodiments, so as to achieve the technical effects of the component deployment method shown above. Please refer to the above description for details. For the sake of brevity, it will not be repeated here.
  • the component deployment method provided in the embodiment of the present application can configure a global configuration file from the Linux operating system where the target component is located, and set global information therein, so that some components in the Linux operating system do not need to create and overwrite the initial RAM disk, thereby reducing the number of times the initial RAM disk is created and overwritten, thereby reducing the loss of the initial RAM disk, and saving the total time for component deployment that depends on the Linux operating system in multiple component deployment scenarios.
  • FIG4 is a schematic diagram of the structure of a component deployment device provided in an embodiment of the present application.
  • the device may include: a first acquisition unit 401, configured to acquire a component deployment instruction, and determine a target component that the component deployment instruction indicates to be deployed; a first execution unit 402, configured to execute a target deployment operation represented by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operation of an initial random access memory RAM disk; a second acquisition unit 403, configured to acquire preset global information from the system where the target component is located, wherein the preset global information is used to indicate a creation subject of the initial RAM disk; a control unit 404, configured to prohibit the target component from creating and overwriting the initial RAM disk when the creation subject is not the target component.
  • the device further includes: a first determination unit, configured to determine a component external object as the creation subject when the operating environment of the target component does not match the system environment of the system; and a first creation unit, configured to create and overwrite the initial RAM disk through the component external object.
  • obtaining preset global information from the system where the target component is located includes: obtaining preset global information from the system where the target component is located through the target component; and creating and overwriting the initial RAM disk through the component external object includes: obtaining the preset global information from the system where the target component is located through the component external object; and creating and overwriting the initial RAM disk through the component external object when the creation subject is not the target component.
  • the device before acquiring the preset global information from the system where the target component is located through the component external object, the device further includes: a second determination unit configured to determine whether there is a deployment anomaly in the target component through the component external object.
  • the creation and overwriting of the initial RAM disk through the component external object includes: a second execution unit, configured to perform a creation and overwriting operation of the initial RAM disk once through the component external object, so as to create and overwrite the initial RAM disk for at least two of the target components.
  • the system where the target component is located is a Linux operating system. and obtaining preset global information from the system where the target component is located, comprising: determining a preset global configuration file from the Linux operating system where the target component is located; and querying preset global information from the global configuration file.
  • the device after obtaining the preset global information from the system where the target component is located, the device further includes: a second creation unit configured to create and overwrite the initial RAM disk through the target component when the creation subject is the target component.
  • the target deployment operation includes at least one of the following: signature verification of the target component, checking dependent components of the target component, file deployment and configuration, and updating record information indicating that the target component has been deployed.
  • the component deployment device provided in this embodiment can be a component deployment device as shown in Figure 4, which can execute all steps of the component deployment methods described above, and then achieve the technical effects of the component deployment methods described above. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.
  • FIG5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • the electronic device 500 shown in FIG5 includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503.
  • the various components in the electronic device 500 are coupled together through a bus system 505.
  • the bus system 505 is used to realize the connection and communication between these components.
  • the bus system 505 also includes a power bus, a control bus and a status signal bus.
  • various buses are marked as bus systems 505 in FIG5.
  • the user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
  • a pointing device eg, a mouse, a trackball, a touch pad, or a touch screen.
  • the memory 502 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.
  • the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the volatile memory can be a random access memory. Random Access Memory (RAM) is used as an external high-speed cache.
  • RAM random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • DDRSDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • DRRAM direct RAM bus random access memory
  • the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .
  • the operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks.
  • the application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services.
  • the program for implementing the method of the embodiment of the present application can be included in the application 5022.
  • the processor 501 is used to execute the method steps provided by each method embodiment, for example, including: obtaining a component deployment instruction, and determining the target component indicated by the component deployment instruction for deployment; executing the target deployment operation represented by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operation of the initial random access memory RAM disk; obtaining preset global information from the system where the target component is located, wherein the preset global information is used to indicate the creation subject of the initial RAM disk; when the creation subject is not the target component, prohibiting the target component from creating and overwriting the initial RAM disk.
  • the method disclosed in the above embodiment of the present application can be applied to the processor 501, or implemented by the processor 501.
  • the processor 501 may be an integrated circuit chip having a signal Processing capability. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instruction in the processor 501.
  • the above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software units in the decoding processor are combined and executed.
  • the software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
  • the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof.
  • the processing unit can be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above-mentioned functions of the present application, or a combination thereof.
  • ASIC application specific integrated circuits
  • DSP digital signal processors
  • DSPDevice digital signal processing devices
  • PLD programmable logic devices
  • FPGA field programmable gate arrays
  • controllers controllers, microcontrollers, microprocessors, other electronic units for performing the above-mentioned functions of the present application, or a combination thereof.
  • the technology described above in this article can be implemented by a unit that performs the functions described above in this article.
  • the software code can be stored in a memory and executed by a processor.
  • the memory can be implemented in the processor or outside the processor.
  • the electronic device provided in this embodiment may be an electronic device as shown in FIG5 , which may execute all steps of the component deployment methods described above, thereby achieving the technical effects of the component deployment methods described above.
  • FIG5 may execute all steps of the component deployment methods described above, thereby achieving the technical effects of the component deployment methods described above.
  • the embodiment of the present application also provides a storage medium (computer-readable storage medium).
  • the storage medium here stores one or more programs.
  • the storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above types of memory.
  • the component deployment method executed on the electronic device side can be implemented.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The present application provides a component deployment method and apparatus, an electronic device, and a storage medium. The method comprises: obtaining a component deployment instruction, and determining a target component that the component deployment instruction indicates for deployment; executing, by means of the target component, a target deployment operation represented by the component deployment instruction, wherein the target deployment operation does not comprise creation and overwriting operations on an initial random access memory (RAM) disk; obtaining preset global information from a system where the target component is located, wherein the preset global information is used for indicating a creation body for the initial RAM disk; and when the creation body is not the target component, prohibiting the target component from creating and overwriting the initial RAM disk.

Description

组件部署方法、装置、电子设备及存储介质Component deployment method, device, electronic device and storage medium

相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS

本申请要求2023年2月27日提交给中国专利局的第202310209280.6号专利申请的优先权,其全部内容通过引用合并于此。This application claims priority to Patent Application No. 202310209280.6 filed with the China Patent Office on February 27, 2023, the entire contents of which are incorporated herein by reference.

技术领域Technical Field

本申请涉及但不限于计算机技术领域。The present application relates to but is not limited to the field of computer technology.

背景技术Background Art

在一些操作系统中,初始RAM(random access memory,随机存取存储器)磁盘是重要的组成部分,并且,在操作系统的启动过程中,初始RAM磁盘是重要的一环。在上述操作系统中,初始RAM磁盘是一个全局共有文件。该文件的创建有明显耗时,并且该文件的创建可由单个组件自身、或程序、或人,各自独立、多次创建并覆盖,所以只有最后一次的结果应用生效。In some operating systems, the initial RAM (random access memory) disk is an important component and an important part of the operating system boot process. In these operating systems, the initial RAM disk is a global shared file. The creation of this file is obviously time-consuming, and the creation of this file can be independently created and overwritten multiple times by individual components, programs, or people, so that only the last result is applied.

然而,目前的操作系统的组件包数量以千记、万记。其中多个组件包在部署(安装、升级、卸载)时,会造成耗时翻倍,不利于操作系统快速全新安装、大规模组件部署,多个组件部署场景下的组件部署花费较多时间。However, the number of component packages in current operating systems is in the thousands or tens of thousands. When deploying (installing, upgrading, uninstalling) multiple component packages, it will double the time consumption, which is not conducive to the rapid new installation of the operating system and large-scale component deployment. Component deployment in multiple component deployment scenarios takes a long time.

发明内容Summary of the invention

本申请实施例提供一种组件部署方法、装置、电子设备及存储介质。Embodiments of the present application provide a component deployment method, device, electronic device, and storage medium.

第一方面,本申请实施例提供一种组件部署方法,所述方法包括:获取组件部署指令,以及确定所述组件部署指令指示部署的目标组件;通过所述目标组件执行所述组件部署指令表示的目标部署操作,其中,所述目标部署操作并非包括初始随机存取存储器RAM磁盘的创建和覆盖操作;从所述目标组件所在的系统中,获取预设全局信息, 其中,所述预设全局信息用于指示所述初始RAM磁盘的创建主体;在所述创建主体并非所述目标组件的情况下,禁止所述目标组件创建和覆盖所述初始RAM磁盘。In a first aspect, an embodiment of the present application provides a component deployment method, the method comprising: obtaining a component deployment instruction, and determining a target component to be deployed indicated by the component deployment instruction; executing a target deployment operation indicated by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operation of an initial random access memory RAM disk; obtaining preset global information from a system where the target component is located, The preset global information is used to indicate the creation subject of the initial RAM disk; when the creation subject is not the target component, the target component is prohibited from creating and overwriting the initial RAM disk.

第二方面,本申请实施例提供一种组件部署装置,所述装置包括:第一获取单元,配置为获取组件部署指令,以及确定所述组件部署指令指示部署的目标组件;第一执行单元,配置为通过所述目标组件执行所述组件部署指令表示的目标部署操作,其中,所述目标部署操作并非包括初始随机存取存储器RAM磁盘的创建和覆盖操作;第二获取单元,配置为从所述目标组件所在的系统中,获取预设全局信息,其中,所述预设全局信息用于指示所述初始RAM磁盘的创建主体;控制单元,配置为在所述创建主体并非所述目标组件的情况下,禁止所述目标组件创建和覆盖所述初始RAM磁盘。In a second aspect, an embodiment of the present application provides a component deployment device, comprising: a first acquisition unit, configured to acquire a component deployment instruction, and determine a target component that the component deployment instruction indicates to be deployed; a first execution unit, configured to execute a target deployment operation represented by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operations of an initial random access memory RAM disk; a second acquisition unit, configured to acquire preset global information from a system where the target component is located, wherein the preset global information is used to indicate a creation subject of the initial RAM disk; a control unit, configured to prohibit the target component from creating and overwriting the initial RAM disk when the creation subject is not the target component.

第三方面,本申请实施例提供一种电子设备,包括:存储器,配置为存储计算机程序;处理器,配置为执行所述存储器中存储的计算机程序,且所述计算机程序被执行时,实现如本文所述的任一组件部署方法。In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory configured to store a computer program; a processor configured to execute the computer program stored in the memory, and when the computer program is executed, implements any component deployment method described herein.

第四方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现如本文所述的任一组件部署方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, it implements any component deployment method described herein.

第五方面,本申请实施例提供一种计算机程序,所述计算机程序包括计算机可读代码,当所述计算机可读代码在设备上运行时,使得该设备中的处理器实现如本文所述的任一组件部署方法。In a fifth aspect, an embodiment of the present application provides a computer program, which includes a computer-readable code. When the computer-readable code is executed on a device, a processor in the device implements any component deployment method described herein.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本申请实施例提供的一种组件部署方法的流程示意图;FIG1 is a schematic diagram of a flow chart of a component deployment method provided in an embodiment of the present application;

图2为本申请实施例提供的另一种组件部署方法的流程示意图;FIG2 is a flow chart of another component deployment method provided in an embodiment of the present application;

图3A为本申请实施例提供的又一种组件部署方法的流程示意图;FIG3A is a schematic diagram of a flow chart of another component deployment method provided in an embodiment of the present application;

图3B为本申请实施例提供的再一种组件部署方法的流程示意图; FIG3B is a schematic diagram of a flow chart of another component deployment method provided in an embodiment of the present application;

图3C为本申请实施例提供的再一种组件部署方法的流程示意图;FIG3C is a flow chart of another component deployment method provided in an embodiment of the present application;

图4为本申请实施例提供的一种组件部署装置的结构示意图;FIG4 is a schematic diagram of the structure of a component deployment device provided in an embodiment of the present application;

图5为本申请实施例提供的一种电子设备的结构示意图。FIG5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

现在将参照附图来详细描述本申请的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值并不限制本申请的范围。Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application.

本领域技术人员可以理解,本申请实施例中的“第一”、“第二”等术语仅用于区别不同步骤、设备或模块等对象,既不代表任何特定技术含义,也不表示它们之间的逻辑顺序。Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.

还应理解,在本实施例中,“多个”可以指两个或两个以上,“至少一个”可以指一个、两个或两个以上。It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.

还应理解,对于本申请实施例中提及的任一部件、数据或结构,在没有明确限定或者在前后文给出相反启示的情况下,一般可以理解为一个或多个。It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

另外,本申请中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请中字符“/”,一般表示前后关联对象是一种“或”的关系。In addition, the term "and/or" in this application is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this application generally indicates that the associated objects before and after are in an "or" relationship.

还应理解,本申请对各个实施例的描述着重强调各个实施例之间的不同之处,其相同或相似之处可以相互参考,为了简洁,不再一一赘述。It should also be understood that the description of each embodiment in this application focuses on the differences between the embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, they will not be described one by one.

以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本申请及其应用或使用的任何限制。The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.

对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,上述技术、方法和设备应当被视为说明书的一部分。Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered as part of the specification.

应注意到:相似的标号和字母在下面的附图中表示类似项,因 此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。It should be noted that like reference numerals and letters refer to similar items in the following drawings. Therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。为便于对本申请实施例的理解,下面将参考附图并结合实施例来详细说明本申请。显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

图1为本申请实施例提供的一种组件部署方法的流程示意图。本方法可以应用于智能手机、笔记本电脑、台式电脑、便携式计算机、服务器等一个或多个电子设备上。此外,本方法的执行主体可以是硬件,也可以是软件。当上述执行主体为硬件时,该执行主体可以为上述电子设备中的一个或多个。例如,单个电子设备可以执行本方法,或者,多个电子设备可以彼此配合来执行本方法。当上述执行主体为软件时,本方法可以实现成多个软件或软件模块,也可以实现成单个软件或软件模块。在此不作特殊限定。FIG1 is a flow chart of a component deployment method provided by an embodiment of the present application. The method can be applied to one or more electronic devices such as smart phones, laptops, desktop computers, portable computers, servers, etc. In addition, the execution subject of the method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute the method, or multiple electronic devices can cooperate with each other to execute the method. When the above-mentioned execution subject is software, the method can be implemented as multiple software or software modules, or as a single software or software module. No special limitation is made here.

如图1所示,该方法可以包括步骤101至104。As shown in FIG. 1 , the method may include steps 101 to 104 .

步骤101,获取组件部署指令,以及确定所述组件部署指令指示部署的目标组件。Step 101: Obtain a component deployment instruction, and determine a target component to be deployed as instructed by the component deployment instruction.

在本实施例中,上述组件部署指令,可以用于指示部署目标组件。In this embodiment, the above component deployment instruction can be used to indicate the deployment target component.

目标组件,可以是内核、驱动、用户态程序在部署前的主要封装形式。例如,目标组件可以是rpm、deb等管理格式的组件包。例如,目标组件可以是ixgbe、megaraid_sas、i40e、smartpqi、mpt3sas、ixgbevf、igb。The target component can be the main packaging form of the kernel, driver, and user-mode program before deployment. For example, the target component can be a component package in a management format such as rpm or deb. For example, the target component can be ixgbe, megaraid_sas, i40e, smartpqi, mpt3sas, ixgbevf, and igb.

此外,目标组件可以是各种系统中的组件。作为示例,目标组件可以是以下任一系统中的组件:Windows操作系统、Linux操作系统、Android操作系统等。In addition, the target component may be a component in various systems. As an example, the target component may be a component in any of the following systems: Windows operating system, Linux operating system, Android operating system, etc.

步骤102,通过所述目标组件执行所述组件部署指令表示的目标 部署操作,其中,所述目标部署操作并非包括初始随机存取存储器RAM磁盘的创建和覆盖操作。Step 102: executing the target component represented by the component deployment instruction through the target component A deployment operation, wherein the target deployment operation does not include a creation and overwriting operation of an initial random access memory RAM disk.

在本实施例中,目标部署操作,可以是所述组件部署指令表示的目标部署操作中,除RAM磁盘的创建和覆盖操作之外的其他部署操作。或者,组件部署指令也可以用于指示:执行除RAM磁盘的创建和覆盖操作之外的其他部署操作。In this embodiment, the target deployment operation may be other deployment operations other than the creation and overwriting operations of the RAM disk among the target deployment operations represented by the component deployment instruction. Alternatively, the component deployment instruction may also be used to instruct: to perform other deployment operations other than the creation and overwriting operations of the RAM disk.

在Linux操作系统中,初始RAM磁盘是一个完整的根文件系统,里面含有除内核之外,一个Linux操作系统的必要组成(例如驱动、进程用户态程序、动态库等)。In the Linux operating system, the initial RAM disk is a complete root file system, which contains the necessary components of a Linux operating system (such as drivers, process user-mode programs, dynamic libraries, etc.) in addition to the kernel.

初始RAM磁盘创建,是以本地根文件系统中的文件、配置为基础,根据创建工具(例如dracut、mkinitrd)自身的配置作为文件筛选、补充的依据,收集相关文件、并按照初始RAM磁盘格式打包,并放置到指定位置,以供全局使用。The initial RAM disk creation is based on the files and configurations in the local root file system. The configuration of the creation tool (such as dracut, mkinitrd) is used as the basis for file screening and supplementation. The relevant files are collected, packaged according to the initial RAM disk format, and placed in the specified location for global use.

从Linux操作系统的组成角度看,主要为grub、内核、驱动、初始RAM磁盘、本地根文件系统、用户态程序。其中,内核、驱动、用户态程序在部署前的主要封装形式为组件包(例如目标组件),例如rpm、deb包管理格式。从功能角度看,在Linux操作系统启动阶段,先是grub引导内核,接着内核加载初始RAM磁盘作为根文件系统,并加载其中的驱动、执行相关的程序,然后内核切根到本地根文件系统并启动相关程序,最终完成操作系统启动。From the perspective of the composition of the Linux operating system, it mainly consists of grub, kernel, driver, initial RAM disk, local root file system, and user-mode programs. Among them, the kernel, driver, and user-mode programs are mainly packaged in component packages (such as target components) before deployment, such as rpm and deb package management formats. From a functional perspective, during the startup phase of the Linux operating system, grub first boots the kernel, then the kernel loads the initial RAM disk as the root file system, loads the driver in it, executes related programs, and then the kernel cuts the root to the local root file system and starts related programs, finally completing the startup of the operating system.

需要特别说明的是,初始RAM磁盘是与内核强相关的,若一个Linux系统上同时部署有多个不同的内核,那么每个内核会对应有一个初始RAM磁盘,以适配该内核,作为该内核运行时系统共用的初始RAM磁盘。It should be noted that the initial RAM disk is strongly related to the kernel. If multiple different kernels are deployed on a Linux system at the same time, each kernel will have a corresponding initial RAM disk to adapt to the kernel and serve as the initial RAM disk shared by the system when the kernel is running.

在本实施例的一些可选的实现方式中,所述目标部署操作,包括以下至少一项:对所述目标组件进行签名校验、检查所述目标组件的依赖组件、文件部署和配置、更新表示已部署所述目标组件的记录信息。In some optional implementations of this embodiment, the target deployment operation includes at least one of the following: signature verification of the target component, checking dependent components of the target component, file deployment and configuration, and updating record information indicating that the target component has been deployed.

可以理解,上述可选的实现方式中,目标组件可以执行对所述目标组件进行签名校验、检查所述目标组件的依赖组件、文件部署和配 置、更新表示已部署所述目标组件的记录信息中的至少一项部署操作。It can be understood that in the above optional implementation, the target component can perform signature verification on the target component, check the dependent components of the target component, file deployment and configuration. The method further comprises: configuring and updating at least one deployment operation in the record information indicating that the target component has been deployed.

步骤103,从所述目标组件所在的系统中,获取预设全局信息,其中,所述预设全局信息用于指示所述初始RAM磁盘的创建主体。Step 103: Acquire preset global information from the system where the target component is located, wherein the preset global information is used to indicate a creation subject of the initial RAM disk.

在本实施例中,目标组件所在的系统可以为以下任一项:Windows操作系统、Linux操作系统、Android操作系统等。In this embodiment, the system where the target component is located can be any one of the following: Windows operating system, Linux operating system, Android operating system, etc.

预设全局信息,可以存储于上述系统中除目标组件之外的存储空间中。此外,在一些情况下,预设全局信息可以包括用于指示所述初始RAM磁盘的创建主体的主体标识,或者,预设全局信息也可以包括关键字和值,以表明“是否由组件(例如目标组件)决定制作初始RAM磁盘”(例如create_initrd=yes、create_initrd=no)。The preset global information may be stored in a storage space other than the target component in the above system. In addition, in some cases, the preset global information may include a subject identifier for indicating a subject that creates the initial RAM disk, or the preset global information may also include a keyword and a value to indicate whether the component (e.g., the target component) decides to create the initial RAM disk (e.g., create_initrd=yes, create_initrd=no).

步骤104,在所述创建主体并非所述目标组件的情况下,禁止所述目标组件创建和覆盖所述初始RAM磁盘。Step 104: When the creation subject is not the target component, prohibit the target component from creating and overwriting the initial RAM disk.

在本实施例中,如果预设全局信息指示的初始RAM磁盘的创建主体并非上述目标组件,那么,目标组件在执行组件部署指令表示的目标部署操作之后,可以跳过创建和覆盖所述初始RAM磁盘的操作,进而禁止所述目标组件创建和覆盖所述初始RAM磁盘。In this embodiment, if the creation entity of the initial RAM disk indicated by the preset global information is not the above-mentioned target component, then after executing the target deployment operation indicated by the component deployment instruction, the target component can skip the operation of creating and overwriting the initial RAM disk, thereby prohibiting the target component from creating and overwriting the initial RAM disk.

在本实施例的一些可选的实现方式中,在执行上述步骤103之后,还可以执行如下步骤:在所述创建主体为所述目标组件的情况下,通过所述目标组件创建和覆盖所述初始RAM磁盘。In some optional implementations of this embodiment, after executing the above step 103, the following step may also be executed: when the creation subject is the target component, the initial RAM disk is created and overwritten by the target component.

可以理解,上述可选的实现方式中,仅在创建主体为目标组件的情况下,才通过目标组件创建和覆盖初始RAM磁盘,这样,通过预设全局信息,来控制是否经由目标组件创建和覆盖初始RAM磁盘,实现了对多个组件部署场景下的组件部署总时长更为有效的控制。It can be understood that in the above optional implementation method, the initial RAM disk is created and overwritten by the target component only when the creation subject is the target component. In this way, by presetting global information to control whether the initial RAM disk is created and overwritten by the target component, more effective control of the total component deployment duration in multiple component deployment scenarios is achieved.

本申请实施例提供的组件部署方法,可以获取组件部署指令,以及确定所述组件部署指令指示部署的目标组件,之后,通过所述目标组件执行所述组件部署指令表示的目标部署操作,其中,所述目标部署操作并非包括初始随机存取存储器RAM磁盘的创建和覆盖操作,然后,从所述目标组件所在的系统中,获取预设全局信息,其中,所述预设全局信息用于指示所述初始RAM磁盘的创建主体,最后,在所述创建主体并非所述目标组件的情况下,禁止所述目标组件创建和 覆盖所述初始RAM磁盘。由此,可以从目标组件所在的系统中,获取指示初始RAM磁盘的创建主体的预设全局信息,并在创建主体并非目标组件的情况下,禁止该目标组件创建和覆盖初始RAM磁盘,这样,部分组件无需创建和覆盖初始RAM磁盘,减少了创建和覆盖初始RAM磁盘的次数,进而减少了初始RAM磁盘的损耗,节约了多个组件部署场景下的组件部署总时长。The component deployment method provided in the embodiment of the present application can obtain a component deployment instruction and determine the target component to be deployed indicated by the component deployment instruction. Then, the target deployment operation indicated by the component deployment instruction is executed through the target component, wherein the target deployment operation does not include the creation and overwriting operation of the initial random access memory RAM disk. Then, preset global information is obtained from the system where the target component is located, wherein the preset global information is used to indicate the creation subject of the initial RAM disk. Finally, when the creation subject is not the target component, the creation and overwriting of the target component are prohibited. Overwrite the initial RAM disk. Thus, the preset global information indicating the creation subject of the initial RAM disk can be obtained from the system where the target component is located, and when the creation subject is not the target component, the target component is prohibited from creating and overwriting the initial RAM disk. In this way, some components do not need to create and overwrite the initial RAM disk, which reduces the number of times the initial RAM disk is created and overwritten, thereby reducing the loss of the initial RAM disk and saving the total component deployment time in multiple component deployment scenarios.

图2为本申请实施例提供的另一种组件部署方法的流程示意图。如图2所示,该方法可以包括步骤201至206。Fig. 2 is a flow chart of another component deployment method provided by an embodiment of the present application. As shown in Fig. 2, the method may include steps 201 to 206.

步骤201,获取组件部署指令,以及确定所述组件部署指令指示部署的目标组件。Step 201: Obtain a component deployment instruction, and determine a target component to be deployed as instructed by the component deployment instruction.

在本实施例中,步骤201与图1对应实施例中的步骤101基本一致,这里不再赘述。In this embodiment, step 201 is substantially the same as step 101 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.

步骤202,通过所述目标组件执行所述组件部署指令表示的目标部署操作,其中,所述目标部署操作并非包括初始随机存取存储器RAM磁盘的创建和覆盖操作。Step 202: Execute the target deployment operation represented by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operation of the initial random access memory RAM disk.

在本实施例中,步骤202与图1对应实施例中的步骤102基本一致,这里不再赘述。In this embodiment, step 202 is substantially the same as step 102 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.

步骤203,从所述目标组件所在的系统中,获取预设全局信息,其中,所述预设全局信息用于指示所述初始RAM磁盘的创建主体。Step 203: Obtain preset global information from the system where the target component is located, wherein the preset global information is used to indicate a creation subject of the initial RAM disk.

在本实施例中,步骤203与图1对应实施例中的步骤103基本一致,这里不再赘述。In this embodiment, step 203 is substantially the same as step 103 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.

步骤204,在所述创建主体并非所述目标组件的情况下,禁止所述目标组件创建和覆盖所述初始RAM磁盘。Step 204: when the creation subject is not the target component, prohibit the target component from creating and overwriting the initial RAM disk.

在本实施例中,步骤204与图1对应实施例中的步骤104基本一致,这里不再赘述。In this embodiment, step 204 is substantially the same as step 104 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.

步骤205,在所述目标组件的运行环境与所述系统的系统环境不匹配的情况下,将组件外部对象确定为所述创建主体。Step 205: When the operating environment of the target component does not match the system environment of the system, a component external object is determined as the creation subject.

在本实施例中,可以通过判断目标组件能否在所述系统环境中成功部署或正常运行,来判断所述目标组件的运行环境与所述系统的 系统环境是否匹配。In this embodiment, the operating environment of the target component and the system can be determined by determining whether the target component can be successfully deployed or run normally in the system environment. Whether the system environment matches.

组件外部对象,可以是上述系统中包括的除目标组件之外的任一对象(例如程序或工具包),也可以是用户。The component external object may be any object (such as a program or toolkit) included in the above system except the target component, or may be a user.

步骤206,通过所述组件外部对象创建和覆盖所述初始RAM磁盘。Step 206, creating and overwriting the initial RAM disk through the component external object.

在本实施例中,在创建主体为上述目标组件,并且,所述目标组件的运行环境与所述系统的系统环境不匹配的情况下,可以经由该组件外部对象创建和覆盖初始RAM磁盘。而在所述目标组件的运行环境与所述系统的系统环境相匹配(也即目标组件可以在所述系统环境中成功部署或正常运行)的情况下,则可以不进行初始RAM磁盘的创建和覆盖。In this embodiment, when the creation subject is the target component and the operating environment of the target component does not match the system environment of the system, the initial RAM disk can be created and overwritten via the component external object. When the operating environment of the target component matches the system environment of the system (that is, the target component can be successfully deployed or run normally in the system environment), the initial RAM disk may not be created and overwritten.

在本实施例的一些可选的实现方式中,可以采用如下方式,从所述目标组件所在的系统中,获取预设全局信息:通过所述目标组件,从所述目标组件所在的系统中,获取预设全局信息。In some optional implementations of this embodiment, the following method can be adopted to obtain the preset global information from the system where the target component is located: obtain the preset global information from the system where the target component is located through the target component.

在此基础上,可以采用如下方式通过所述组件外部对象创建和覆盖所述初始RAM磁盘:第一步,通过所述组件外部对象,从所述目标组件所在的系统中,获取所述预设全局信息;第二步,在所述创建主体并非所述目标组件的情况下,通过所述组件外部对象创建和覆盖所述初始RAM磁盘。On this basis, the initial RAM disk can be created and overwritten through the component external object in the following manner: the first step is to obtain the preset global information from the system where the target component is located through the component external object; the second step is to create and overwrite the initial RAM disk through the component external object when the creation subject is not the target component.

可以理解,上述可选的实现方式中,通过目标组件和组件外部对象二者分别获取预设全局信息,进而可以进行两次创建主体的判断,降低了初始RAM磁盘的创建主体误创建的概率。It can be understood that in the above optional implementation, preset global information is obtained through both the target component and the component external object, and then the judgment of the creation subject can be performed twice, which reduces the probability of erroneous creation of the creation subject of the initial RAM disk.

在上述可选的实现方式中的一些应用场景下,在执行上述第一步之前,还可以通过所述组件外部对象,确定所述目标组件是否存在部署异常。In some application scenarios of the above optional implementation manner, before executing the above first step, it is also possible to determine whether the target component has a deployment exception through the component external object.

进一步地,如果目标组件存在部署异常,则可以控制目标组件进行重新部署或修复。Furthermore, if a deployment anomaly exists in a target component, the target component may be controlled to be redeployed or repaired.

可以理解,上述应用场景下,可以通过组件外部对象,来确定所述目标组件是否存在部署异常,以确保目标组件正常部署。It can be understood that in the above application scenario, whether there is a deployment anomaly in the target component can be determined through a component external object to ensure that the target component is deployed normally.

在本实施例的一些可选的实现方式中,可以采用如下方式,来通 过所述组件外部对象创建和覆盖所述初始RAM磁盘:通过所述组件外部对象执行一次所述初始RAM磁盘的创建和覆盖操作,以便为至少两个所述目标组件创建和覆盖所述初始RAM磁盘。In some optional implementations of this embodiment, the following methods can be used to Creating and overwriting the initial RAM disk through the component external object: performing the creation and overwriting operation of the initial RAM disk once through the component external object, so as to create and overwrite the initial RAM disk for at least two of the target components.

这里,可以在每次部署目标组件之后,记录该组件的运行环境信息。在创建和部署初始RAM磁盘时,可以将默认的运行环境信息和所记录的运行环境信息的交集,作为创建和部署初始RAM磁盘的内容。Here, the operating environment information of the component can be recorded after each deployment of the target component. When creating and deploying the initial RAM disk, the intersection of the default operating environment information and the recorded operating environment information can be used as the content of creating and deploying the initial RAM disk.

可以理解,上述可选的实现方式中,可以通过执行一次初始RAM磁盘的创建和覆盖操作,为至少两个目标组件创建和部署初始RAM磁盘,由此,减少了创建和覆盖初始RAM磁盘的次数,进而减少了初始RAM磁盘的损耗,节约了多个组件部署场景下的组件部署总时长。It can be understood that in the above optional implementation method, an initial RAM disk can be created and deployed for at least two target components by performing an initial RAM disk creation and overwriting operation. This reduces the number of times the initial RAM disk is created and overwritten, thereby reducing the loss of the initial RAM disk and saving the total component deployment time in multiple component deployment scenarios.

需要说明的是,除以上所记载的内容之外,本实施例还可以包括图1对应的实施例中所描述的相应技术特征,进而实现图1所示组件部署方法的技术效果,具体请参照图1相关描述,为简洁描述,在此不作赘述。It should be noted that, in addition to the contents recorded above, this embodiment may also include the corresponding technical features described in the embodiment corresponding to Figure 1, so as to achieve the technical effect of the component deployment method shown in Figure 1. Please refer to the relevant description of Figure 1 for details. For the sake of brevity, it will not be repeated here.

本申请实施例提供的组件部署方法,仅在创建主体为上述目标组件,并且,所述目标组件的运行环境与所述系统的系统环境不匹配的情况下,才经由该组件外部对象创建和覆盖初始RAM磁盘,由此,在目标组件的运行环境与所述系统的系统环境相匹配的情况下,无需进行初始RAM磁盘的创建和覆盖,进一步减少了创建和覆盖初始RAM磁盘的次数,进而减少了初始RAM磁盘的损耗,节约了多个组件部署场景下的组件部署总时长。The component deployment method provided in the embodiment of the present application creates and overwrites the initial RAM disk through the external object of the component only when the creation subject is the above-mentioned target component and the operating environment of the target component does not match the system environment of the system. Therefore, when the operating environment of the target component matches the system environment of the system, there is no need to create and overwrite the initial RAM disk, which further reduces the number of times the initial RAM disk is created and overwritten, thereby reducing the loss of the initial RAM disk and saving the total component deployment time in multiple component deployment scenarios.

图3A为本申请实施例提供的又一种组件部署方法的流程示意图。FIG3A is a flow chart of another component deployment method provided in an embodiment of the present application.

如图3A所示,该方法可以包括步骤301至305。As shown in FIG. 3A , the method may include steps 301 to 305 .

步骤301,获取组件部署指令,以及确定所述组件部署指令指示部署的目标组件,其中,所述目标组件所在的系统为Linux操作系统。Step 301, obtaining a component deployment instruction, and determining a target component to be deployed according to the component deployment instruction, wherein the system where the target component is located is a Linux operating system.

在本实施例中,上述组件部署指令,可以用于指示部署目标组 件。In this embodiment, the above component deployment instruction can be used to indicate the deployment target group Piece.

目标组件,可以是内核、驱动、用户态程序在部署前的主要封装形式。例如,目标组件可以是rpm、deb等管理格式的组件包。例如,目标组件可以是ixgbe、megaraid_sas、i40e、smartpqi、mpt3sas、ixgbevf、igb。The target component can be the main packaging form of the kernel, driver, and user-mode program before deployment. For example, the target component can be a component package in a management format such as rpm or deb. For example, the target component can be ixgbe, megaraid_sas, i40e, smartpqi, mpt3sas, ixgbevf, and igb.

此外,目标组件可以是Linux操作系统中的组件。Furthermore, the target component may be a component in a Linux operating system.

在本实施例中,步骤301与图1对应实施例中的步骤101基本一致,这里不再赘述。In this embodiment, step 301 is substantially the same as step 101 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.

步骤302,通过所述目标组件执行所述组件部署指令表示的目标部署操作,其中,所述目标部署操作并非包括初始随机存取存储器RAM磁盘的创建和覆盖操作。Step 302: Execute the target deployment operation represented by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operation of the initial random access memory RAM disk.

在本实施例中,步骤302与图1对应实施例中的步骤102基本一致,这里不再赘述。In this embodiment, step 302 is substantially the same as step 102 in the corresponding embodiment of FIG. 1 , and will not be described in detail here.

步骤303,从所述目标组件所在的Linux操作系统中,确定预先设置的全局配置文件。Step 303: Determine a pre-set global configuration file from the Linux operating system where the target component is located.

在本实施例中,全局配置文件,可以用于记录Linux操作系统中的配置值。其中可以包括指示初始RAM磁盘的创建主体的信息。例如全局配置文件在Linux操作系统中的路径可以是/etc/yum/extra.conf。在其中可以设置关键字和值,以表明“是否由组件外部对象决定制作初始RAM磁盘”(例如create_initrd=yes)。In this embodiment, the global configuration file can be used to record the configuration values in the Linux operating system. It can include information indicating the creation subject of the initial RAM disk. For example, the path of the global configuration file in the Linux operating system can be /etc/yum/extra.conf. Keywords and values can be set in it to indicate whether "the creation of the initial RAM disk is determined by the component external object" (for example, create_initrd=yes).

步骤304,从所述全局配置文件中,查询预设全局信息,其中,所述预设全局信息用于指示所述初始RAM磁盘的创建主体。Step 304: query preset global information from the global configuration file, wherein the preset global information is used to indicate a creation subject of the initial RAM disk.

在本实施例中,部署(安装、升级、卸载)目标组件时,在目标组件内部阶段,查询上述全局配置文件中的值并判断,若是由组件外部对象决定(例如create_initrd=yes),则跳过本目标组件制作初始RAM磁盘相关的判断、以及操作;若不是由组件外部对象决定(例如create_initrd=no,或没有全局配置文件,或全局配置文件未记录初始RAM磁盘的创建主体),则不会跳过任何既有操作。In this embodiment, when deploying (installing, upgrading, uninstalling) the target component, in the internal stage of the target component, the value in the above-mentioned global configuration file is queried and judged. If it is determined by an external object of the component (for example, create_initrd=yes), the judgment and operation related to the creation of the initial RAM disk by this target component are skipped; if it is not determined by an external object of the component (for example, create_initrd=no, or there is no global configuration file, or the global configuration file does not record the creation subject of the initial RAM disk), no existing operations will be skipped.

步骤305,在所述创建主体并非所述目标组件的情况下,禁止所述目标组件创建和覆盖所述初始RAM磁盘。 Step 305: When the creation subject is not the target component, prohibit the target component from creating and overwriting the initial RAM disk.

在本实施例中,目标组件所在的系统可以为Linux操作系统。In this embodiment, the system where the target component is located may be a Linux operating system.

预设全局信息,可以存储于上述系统中除目标组件之外的存储空间中。此外,在一些情况下,预设全局信息可以包括用于指示所述初始RAM磁盘的创建主体的主体标识,或者,预设全局信息也可以包括关键字和值,以表明“是否由组件(例如目标组件)决定制作初始RAM磁盘”(例如create_initrd=yes、create_initrd=no)。The preset global information may be stored in a storage space other than the target component in the above system. In addition, in some cases, the preset global information may include a subject identifier for indicating a subject that creates the initial RAM disk, or the preset global information may also include a keyword and a value to indicate whether the component (e.g., the target component) decides to create the initial RAM disk (e.g., create_initrd=yes, create_initrd=no).

下面对本申请实施例进行示例性说明,但需要注意的是,本申请实施例可以具有以下所描述的特征,但以下描述并不构成对本申请实施例保护范围的限定。The following is an illustrative description of the embodiments of the present application, but it should be noted that the embodiments of the present application may have the features described below, but the following description does not constitute a limitation on the scope of protection of the embodiments of the present application.

如图3B所示,图3B为本申请实施例提供的再一种组件部署方法的流程示意图。该方法包括如下步骤1至9。As shown in Figure 3B, Figure 3B is a flow chart of another component deployment method provided in an embodiment of the present application. The method includes the following steps 1 to 9.

步骤1、人或程序(也即上述组件外部对象)在组件包(也即上述目标组件)外部设置“是否由组件包外部决定制作初始RAM磁盘”信息(也即上述预设全局信息)。Step 1, a person or program (ie, the above-mentioned component external object) sets "whether to make the initial RAM disk is determined by the outside of the component package" information (ie, the above-mentioned preset global information) outside the component package (ie, the above-mentioned target component).

步骤2、人或程序开始部署(安装、升级、卸载)组件包时,组件包内部先执行若干动作(也即上述目标部署操作,例如组件包签名校验、依赖组件检查)。Step 2: When a person or program starts to deploy (install, upgrade, uninstall) a component package, several actions are first performed inside the component package (i.e., the target deployment operations described above, such as component package signature verification and dependent component checking).

步骤3、组件包内部进行文件部署以及配置,也即执行上述目标部署操作。Step 3: Deploy and configure files within the component package, that is, perform the above-mentioned target deployment operation.

步骤4、组件包查询组件包外部决定信息(也即上述预设全局信息),若是由外部(也即上述组件外部对象)决定制作初始RAM磁盘,则跳到步骤6;若不是,则继续执行步骤5。Step 4, the component package queries the external decision information of the component package (that is, the above-mentioned preset global information). If it is determined by the outside (that is, the above-mentioned component external object) to make the initial RAM disk, jump to step 6; if not, continue to execute step 5.

步骤5、若组件包内部判断,需要制作初始RAM磁盘,则制作初始RAM磁盘,并覆盖到整个系统共用的初始RAM磁盘;若不需要制作,则不制作初始RAM磁盘。Step 5: If the component package determines that an initial RAM disk needs to be created, the initial RAM disk is created and overwritten with the initial RAM disk shared by the entire system; if it does not need to be created, the initial RAM disk is not created.

步骤6、组件包内部收尾动作(也即上述目标部署操作,例如更新整个系统已安装组件包的记录信息)。Step 6: Finishing actions within the component package (i.e., the target deployment operations mentioned above, such as updating the record information of the installed component packages of the entire system).

当本次部署的所有组件包(1或N个,N>1)都依次执行完上述步骤后,则继续如下步骤8。When all component packages (1 or N, N>1) of this deployment have executed the above steps in sequence, proceed to step 8 below.

步骤8、部署后检查,例如,人或程序检查组件包部署是否有异 常。Step 8: Post-deployment inspection, for example, a person or program checks whether the component package deployment is abnormal. often.

步骤9、人或程序查询外部决定信息,若不是由外部决定制作初始RAM磁盘,则不制作;若是,则制作初始RAM磁盘,并覆盖到整个系统共用的初始RAM磁盘。需要特别指出的是:在特殊场景下(例如当前是虚拟机环境,即使部署了某驱动组件,但该环境无该驱动对应的设备),人或程序可决定不制作初始RAM磁盘;人或程序也可根据自身的特殊需要,创建多次初始RAM磁盘。Step 9. A person or program queries external decision information. If the initial RAM disk is not made by external decision, it will not be made; if it is, it will be made and will cover the initial RAM disk shared by the entire system. It should be pointed out that: in special scenarios (for example, the current environment is a virtual machine environment, even if a driver component is deployed, but the environment does not have a device corresponding to the driver), a person or program may decide not to make an initial RAM disk; a person or program may also create multiple initial RAM disks according to their own special needs.

以下以目标组件为rpm组件包管理格式为例,对上述步骤进行说明:The following takes the target component as the rpm component package management format as an example to illustrate the above steps:

首先,在系统中设置一个全局配置文件,例如/etc/yum/extra.conf,在其中设置关键字和值,以表明“是否由组件包外部(也即上述组件外部对象)决定制作初始RAM磁盘”(例如create_initrd=yes)。First, set up a global configuration file in the system, such as /etc/yum/extra.conf, in which keywords and values are set to indicate whether "making the initial RAM disk is determined by the outside of the component package (that is, the above-mentioned component external object)" (such as create_initrd = yes).

其次,由人或程序(也即上述组件外部对象),部署(安装、升级、卸载)rpm组件包,此时在rpm内部“%post”、“%postun”阶段,查询上述全局配置文件中的值并判断,若是由外部决定(例如create_initrd=yes),则跳过本rpm包制作初始RAM磁盘相关的判断、以及操作;若不是由外部决定(例如create_initrd=no,或没有全局配置文件),则不会跳过任何既有动作。Secondly, a person or program (that is, the external object of the above-mentioned component) deploys (installs, upgrades, uninstalls) the rpm component package. At this time, in the "%post" and "%postun" stages inside rpm, the value in the above-mentioned global configuration file is queried and judged. If it is determined externally (for example, create_initrd=yes), the judgment and operation related to the creation of the initial RAM disk by this rpm package are skipped; if it is not determined externally (for example, create_initrd=no, or there is no global configuration file), no existing actions will be skipped.

然后,当所有rpm组件包都部署(安装、升级、卸载)完毕后,由人或程序对部署结果进行检查(例如无任何报错)。Then, when all rpm component packages are deployed (installed, upgraded, uninstalled), a person or program checks the deployment results (eg, no errors are reported).

最后,由人或程序,查询上述全局配置文件中的值并判断,若是由外部决定(例如create_initrd=yes),则人或程序执行初始RAM磁盘制作工具,制作初始RAM磁盘并覆盖(例如dracut-f/boot/initramfs-3.10.0-693.el7.x86_64.img);若不是由外部决定(例如create_initrd=no,或没有全局配置文件),则人或程序不对初始RAM磁盘做任何操作。Finally, a person or a program queries the value in the above global configuration file and judges. If it is determined by an external party (for example, create_initrd=yes), the person or program executes the initial RAM disk creation tool to create an initial RAM disk and overwrite it (for example, dracut -f/boot/initramfs-3.10.0-693.el7.x86_64.img); if it is not determined by an external party (for example, create_initrd=no, or there is no global configuration file), the person or program does not perform any operation on the initial RAM disk.

接下来,请继续参考图3C。如图3C所示,图3C为本申请实施例提供的再一种组件部署方法的流程示意图。Next, please continue to refer to Figure 3C. As shown in Figure 3C, Figure 3C is a flow chart of another component deployment method provided in an embodiment of the present application.

图3C所示的组件部署方法与图3B所示的组件部署方法之间的差别在于以下两点。 The differences between the component deployment method shown in FIG. 3C and the component deployment method shown in FIG. 3B are in the following two points.

第一,不是在组件包内部直接查询外部决定信息,而是在组件包内部调用的初始RAM磁盘创建工具时,由创建工具内部查询、判断。例如,上述创建工具可以是dracut、mkinitrd。First, instead of directly querying external decision information in the component package, when the initial RAM disk creation tool is called in the component package, the creation tool queries and determines internally. For example, the creation tool may be dracut or mkinitrd.

第二,在创建工具中增加判断,若是被组件包使用,则受外部决定控制,若不是被组件包使用,则既有动作保持不变。Second, add judgments in the creation tool. If it is used by the component package, it is controlled by external decisions. If it is not used by the component package, the existing actions remain unchanged.

由此,在操作系统中,设置有全局“是否由组件包外部决定制作初始RAM磁盘”信息。在组件包内部,在完成“文件部署以及配置”动作后,可以查询上述全局信息。在组件包内部,在完成“文件部署以及配置”动作后,可以判断上述全局信息,以决定组件包自身是否可以制作初始RAM磁盘。在组件包外部,制作初始RAM磁盘的工具中,可以查询上述全局信息。在组件包外部,制作初始RAM磁盘的工具中,可以判断上述全局信息,以决定制作工具自身,是否可以制作初始RAM磁盘。在组件包外部,人可以查询上述全局信息。在组件包外部,人可以判断上述全局信息,以决定人自身,是否可以制作初始RAM磁盘。由此,操作系统接口无删除,增加一个全局查询接口,供查询是否由组件包外部决定制作初始RAM磁盘,可由组件包、程序、人查询。Therefore, in the operating system, global information "whether the production of the initial RAM disk is determined by the outside of the component package" is set. Inside the component package, after completing the "file deployment and configuration" action, the above global information can be queried. Inside the component package, after completing the "file deployment and configuration" action, the above global information can be judged to determine whether the component package itself can produce the initial RAM disk. Outside the component package, in the tool for producing the initial RAM disk, the above global information can be queried. Outside the component package, in the tool for producing the initial RAM disk, the above global information can be judged to determine whether the production tool itself can produce the initial RAM disk. Outside the component package, a person can query the above global information. Outside the component package, a person can judge the above global information to determine whether the person himself can produce the initial RAM disk. Therefore, the operating system interface is not deleted, and a global query interface is added for querying whether the production of the initial RAM disk is determined by the outside of the component package, which can be queried by the component package, program, and person.

由本方案,在Linux系统全新安装、组件包批量部署时,可以极大减少耗时。This solution can greatly reduce the time spent on new installation of Linux systems and batch deployment of component packages.

需要说明的是,除以上所记载的内容之外,本实施例还可以包括以上各实施例中所描述的技术特征,进而实现以上所示组件部署方法的技术效果,具体请参照以上描述,为简洁描述,在此不作赘述。It should be noted that, in addition to the contents recorded above, this embodiment may also include the technical features described in the above embodiments, so as to achieve the technical effects of the component deployment method shown above. Please refer to the above description for details. For the sake of brevity, it will not be repeated here.

本申请实施例提供的组件部署方法,可以从所述目标组件所在的Linux操作系统中配置全局配置文件,并在其中设置全局信息,可以使得Linux操作系统中的部分组件无需创建和覆盖初始RAM磁盘,减少了创建和覆盖初始RAM磁盘的次数,进而减少了初始RAM磁盘的损耗,节约了多个组件部署场景下的依赖Linux操作系统的组件部署的总时长。The component deployment method provided in the embodiment of the present application can configure a global configuration file from the Linux operating system where the target component is located, and set global information therein, so that some components in the Linux operating system do not need to create and overwrite the initial RAM disk, thereby reducing the number of times the initial RAM disk is created and overwritten, thereby reducing the loss of the initial RAM disk, and saving the total time for component deployment that depends on the Linux operating system in multiple component deployment scenarios.

图4为本申请实施例提供的一种组件部署装置的结构示意图。 如图4所示,所述装置可以包括:第一获取单元401,配置为获取组件部署指令,以及确定所述组件部署指令指示部署的目标组件;第一执行单元402,配置为通过所述目标组件执行所述组件部署指令表示的目标部署操作,其中,所述目标部署操作并非包括初始随机存取存储器RAM磁盘的创建和覆盖操作;第二获取单元403,配置为从所述目标组件所在的系统中,获取预设全局信息,其中,所述预设全局信息用于指示所述初始RAM磁盘的创建主体;控制单元404,配置为在所述创建主体并非所述目标组件的情况下,禁止所述目标组件创建和覆盖所述初始RAM磁盘。FIG4 is a schematic diagram of the structure of a component deployment device provided in an embodiment of the present application. As shown in Figure 4, the device may include: a first acquisition unit 401, configured to acquire a component deployment instruction, and determine a target component that the component deployment instruction indicates to be deployed; a first execution unit 402, configured to execute a target deployment operation represented by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operation of an initial random access memory RAM disk; a second acquisition unit 403, configured to acquire preset global information from the system where the target component is located, wherein the preset global information is used to indicate a creation subject of the initial RAM disk; a control unit 404, configured to prohibit the target component from creating and overwriting the initial RAM disk when the creation subject is not the target component.

在一个可能的实施方式中,在所述通过所述目标组件执行所述组件部署指令表示的目标部署操作之后,所述装置还包括:第一确定单元,配置为在所述目标组件的运行环境与所述系统的系统环境不匹配的情况下,将组件外部对象确定为所述创建主体;第一创建单元,配置为通过所述组件外部对象创建和覆盖所述初始RAM磁盘。In one possible implementation, after the target deployment operation represented by the component deployment instruction is executed by the target component, the device further includes: a first determination unit, configured to determine a component external object as the creation subject when the operating environment of the target component does not match the system environment of the system; and a first creation unit, configured to create and overwrite the initial RAM disk through the component external object.

在一个可能的实施方式中,所述从所述目标组件所在的系统中,获取预设全局信息,包括:通过所述目标组件,从所述目标组件所在的系统中,获取预设全局信息;以及所述通过所述组件外部对象创建和覆盖所述初始RAM磁盘,包括:通过所述组件外部对象,从所述目标组件所在的系统中,获取所述预设全局信息;在所述创建主体并非所述目标组件的情况下,通过所述组件外部对象创建和覆盖所述初始RAM磁盘。In one possible implementation, obtaining preset global information from the system where the target component is located includes: obtaining preset global information from the system where the target component is located through the target component; and creating and overwriting the initial RAM disk through the component external object includes: obtaining the preset global information from the system where the target component is located through the component external object; and creating and overwriting the initial RAM disk through the component external object when the creation subject is not the target component.

在一个可能的实施方式中,,在所述通过所述组件外部对象,从所述目标组件所在的系统中,获取所述预设全局信息之前,所述装置还包括:第二确定单元,配置为通过所述组件外部对象,确定所述目标组件是否存在部署异常。In a possible implementation, before acquiring the preset global information from the system where the target component is located through the component external object, the device further includes: a second determination unit configured to determine whether there is a deployment anomaly in the target component through the component external object.

在一个可能的实施方式中,所述通过所述组件外部对象创建和覆盖所述初始RAM磁盘,包括:第二执行单元,配置为通过所述组件外部对象执行一次所述初始RAM磁盘的创建和覆盖操作,以为至少两个所述目标组件创建和覆盖所述初始RAM磁盘。In one possible implementation, the creation and overwriting of the initial RAM disk through the component external object includes: a second execution unit, configured to perform a creation and overwriting operation of the initial RAM disk once through the component external object, so as to create and overwrite the initial RAM disk for at least two of the target components.

在一个可能的实施方式中,所述目标组件所在的系统为Linux操 作系统;以及所述从所述目标组件所在的系统中,获取预设全局信息,包括:从所述目标组件所在的Linux操作系统中,确定预先设置的全局配置文件;从所述全局配置文件中,查询预设全局信息。In a possible implementation, the system where the target component is located is a Linux operating system. and obtaining preset global information from the system where the target component is located, comprising: determining a preset global configuration file from the Linux operating system where the target component is located; and querying preset global information from the global configuration file.

在一个可能的实施方式中,在所述从所述目标组件所在的系统中,获取预设全局信息之后,所述装置还包括:第二创建单元,配置为在所述创建主体为所述目标组件的情况下,通过所述目标组件创建和覆盖所述初始RAM磁盘。In a possible implementation, after obtaining the preset global information from the system where the target component is located, the device further includes: a second creation unit configured to create and overwrite the initial RAM disk through the target component when the creation subject is the target component.

在一个可能的实施方式中,所述目标部署操作,包括以下至少一项:对所述目标组件进行签名校验、检查所述目标组件的依赖组件、文件部署和配置、更新表示已部署所述目标组件的记录信息。In a possible implementation, the target deployment operation includes at least one of the following: signature verification of the target component, checking dependent components of the target component, file deployment and configuration, and updating record information indicating that the target component has been deployed.

本实施例提供的组件部署装置可以是如图4中所示的组件部署装置,可执行以上所述的各组件部署方法的所有步骤,进而实现以上所述的各组件部署方法的技术效果,具体请参照以上相关描述,为简洁描述,在此不作赘述。The component deployment device provided in this embodiment can be a component deployment device as shown in Figure 4, which can execute all steps of the component deployment methods described above, and then achieve the technical effects of the component deployment methods described above. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.

图5为本申请实施例提供的一种电子设备的结构示意图,图5所示的电子设备500包括:至少一个处理器501、存储器502、至少一个网络接口504和其他用户接口503。电子设备500中的各个组件通过总线系统505耦合在一起。可理解,总线系统505用于实现这些组件之间的连接通信。总线系统505除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图5中将各种总线都标为总线系统505。FIG5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 500 shown in FIG5 includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the electronic device 500 are coupled together through a bus system 505. It can be understood that the bus system 505 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as bus systems 505 in FIG5.

其中,用户接口503可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(trackball)、触感板或者触摸屏等。The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).

可以理解,本申请实施例中的存储器502可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存 取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本文描述的存储器502旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 502 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory. Random Access Memory (RAM) is used as an external high-speed cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

在一些实施方式中,存储器502存储了如下的元素,可执行单元或者数据结构,或者他们的子集,或者他们的扩展集:操作系统5021和应用程序5022。In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .

其中,操作系统5021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序5022,包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。实现本申请实施例方法的程序可以包含在应用程序5022中。The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 5022.

在本实施例中,通过调用存储器502存储的程序或指令,示例性的,可以是应用程序5022中存储的程序或指令,处理器501用于执行各方法实施例所提供的方法步骤,例如包括:获取组件部署指令,以及确定所述组件部署指令指示部署的目标组件;通过所述目标组件执行所述组件部署指令表示的目标部署操作,其中,所述目标部署操作并非包括初始随机存取存储器RAM磁盘的创建和覆盖操作;从所述目标组件所在的系统中,获取预设全局信息,其中,所述预设全局信息用于指示所述初始RAM磁盘的创建主体;在所述创建主体并非所述目标组件的情况下,禁止所述目标组件创建和覆盖所述初始RAM磁盘。In this embodiment, by calling the program or instruction stored in the memory 502, exemplarily, it can be the program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including: obtaining a component deployment instruction, and determining the target component indicated by the component deployment instruction for deployment; executing the target deployment operation represented by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operation of the initial random access memory RAM disk; obtaining preset global information from the system where the target component is located, wherein the preset global information is used to indicate the creation subject of the initial RAM disk; when the creation subject is not the target component, prohibiting the target component from creating and overwriting the initial RAM disk.

上述本申请实施例揭示的方法可以应用于处理器501中,或者由处理器501实现。处理器501可能是一种集成电路芯片,具有信号 的处理能力。在实现过程中,上述方法的各步骤可以通过处理器501中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器501可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件单元组合执行完成。软件单元可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器502,处理器501读取存储器502中的信息,结合其硬件完成上述方法的步骤。The method disclosed in the above embodiment of the present application can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip having a signal Processing capability. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instruction in the processor 501. The above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software units in the decoding processor are combined and executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.

可以理解的是,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSPDevice,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请的上述功能的其它电子单元或其组合中。It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above-mentioned functions of the present application, or a combination thereof.

对于软件实现,可通过执行本文上述功能的单元来实现本文上述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

本实施例提供的电子设备可以是如图5中所示的电子设备,可执行以上所述的各组件部署方法的所有步骤,进而实现以上所述的各组件部署方法的技术效果,具体请参照以上相关描述,为简洁描述,在此不作赘述。The electronic device provided in this embodiment may be an electronic device as shown in FIG5 , which may execute all steps of the component deployment methods described above, thereby achieving the technical effects of the component deployment methods described above. For details, please refer to the above related descriptions. For the sake of brevity, they will not be elaborated here.

本申请实施例还提供了一种存储介质(计算机可读存储介质)。 这里的存储介质存储有一个或者多个程序。其中,存储介质可以包括易失性存储器,例如随机存取存储器;存储器也可以包括非易失性存储器,例如只读存储器、快闪存储器、硬盘或固态硬盘;存储器还可以包括上述种类的存储器的组合。The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above types of memory.

当存储介质中一个或者多个程序可被一个或者多个处理器执行,以实现上述在电子设备侧执行的组件部署方法。When one or more programs in the storage medium can be executed by one or more processors, the component deployment method executed on the electronic device side can be implemented.

上述处理器用于执行存储器中存储的组件部署程序,以实现以下在电子设备侧执行的组件部署方法的步骤:获取组件部署指令,以及确定所述组件部署指令指示部署的目标组件;通过所述目标组件执行所述组件部署指令表示的目标部署操作,其中,所述目标部署操作并非包括初始随机存取存储器RAM磁盘的创建和覆盖操作;从所述目标组件所在的系统中,获取预设全局信息,其中,所述预设全局信息用于指示所述初始RAM磁盘的创建主体;在所述创建主体并非所述目标组件的情况下,禁止所述目标组件创建和覆盖所述初始RAM磁盘。The above-mentioned processor is used to execute the component deployment program stored in the memory to implement the following steps of the component deployment method performed on the electronic device side: obtain a component deployment instruction, and determine the target component indicated by the component deployment instruction for deployment; execute the target deployment operation represented by the component deployment instruction through the target component, wherein the target deployment operation does not include the creation and overwriting operation of the initial random access memory RAM disk; obtain preset global information from the system where the target component is located, wherein the preset global information is used to indicate the creation subject of the initial RAM disk; when the creation subject is not the target component, prohibiting the target component from creating and overwriting the initial RAM disk.

专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software 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.

结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

以上所述的示例性实施方式,对本申请的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本申请的示例性实施方式而已,并不用于限定本申请的保护范围,凡在本申请 的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。此外,对于前述的各实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。 The exemplary embodiments described above further explain the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only an exemplary embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles shall be included in the scope of protection of this application. In addition, for the aforementioned embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the described order of actions, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.

Claims (11)

一种组件部署方法,包括:A component deployment method, comprising: 获取组件部署指令,以及确定所述组件部署指令指示部署的目标组件;Obtaining a component deployment instruction, and determining a target component that the component deployment instruction indicates to deploy; 通过所述目标组件执行所述组件部署指令表示的目标部署操作,其中,所述目标部署操作并非包括初始随机存取存储器RAM磁盘的创建和覆盖操作;Executing, by the target component, a target deployment operation represented by the component deployment instruction, wherein the target deployment operation does not include a creation and overwriting operation of an initial random access memory RAM disk; 从所述目标组件所在的系统中,获取预设全局信息,其中,所述预设全局信息用于指示所述初始RAM磁盘的创建主体;Acquire preset global information from the system where the target component is located, wherein the preset global information is used to indicate a creation subject of the initial RAM disk; 在所述创建主体并非所述目标组件的情况下,禁止所述目标组件创建和覆盖所述初始RAM磁盘。In the case where the creation subject is not the target component, the target component is prohibited from creating and overwriting the initial RAM disk. 根据权利要求1所述的方法,其中,在所述通过所述目标组件执行所述组件部署指令表示的目标部署操作之后,所述方法还包括:The method according to claim 1, wherein, after the target component executes the target deployment operation represented by the component deployment instruction, the method further comprises: 在所述目标组件的运行环境与所述系统的系统环境不匹配的情况下,将组件外部对象确定为所述创建主体;In the case that the operating environment of the target component does not match the system environment of the system, determining a component external object as the creation subject; 通过所述组件外部对象创建和覆盖所述初始RAM磁盘。The initial RAM disk is created and overwritten by the component external object. 根据权利要求2所述的方法,其中,所述从所述目标组件所在的系统中,获取预设全局信息,包括:The method according to claim 2, wherein the obtaining preset global information from the system where the target component is located comprises: 通过所述目标组件,从所述目标组件所在的系统中,获取预设全局信息;以及Obtaining preset global information from the system where the target component is located through the target component; and 所述通过所述组件外部对象创建和覆盖所述初始RAM磁盘,包括:The creating and overwriting the initial RAM disk by the component external object comprises: 通过所述组件外部对象,从所述目标组件所在的系统中,获取所述预设全局信息;Acquiring the preset global information from the system where the target component is located through the component external object; 在所述创建主体并非所述目标组件的情况下,通过所述组件外部对象创建和覆盖所述初始RAM磁盘。 In the case where the creation subject is not the target component, the initial RAM disk is created and overwritten by the component external object. 根据权利要求3所述的方法,其中,在所述通过所述组件外部对象,从所述目标组件所在的系统中,获取所述预设全局信息之前,所述方法还包括:The method according to claim 3, wherein, before acquiring the preset global information from the system where the target component is located through the component external object, the method further comprises: 通过所述组件外部对象,确定所述目标组件是否存在部署异常。It is determined whether the target component has a deployment anomaly through the component external object. 根据权利要求2所述的方法,其中,所述通过所述组件外部对象创建和覆盖所述初始RAM磁盘,包括:The method according to claim 2, wherein the creating and overwriting the initial RAM disk by the component external object comprises: 通过所述组件外部对象执行一次所述初始RAM磁盘的创建和覆盖操作,以便为至少两个所述目标组件创建和覆盖所述初始RAM磁盘。The creation and overwriting operation of the initial RAM disk is performed once through the component external object so as to create and overwrite the initial RAM disk for at least two of the target components. 根据权利要求1所述的方法,其中,所述目标组件所在的系统为Linux操作系统;以及The method according to claim 1, wherein the system where the target component is located is a Linux operating system; and 所述从所述目标组件所在的系统中,获取预设全局信息,包括:The obtaining of preset global information from the system where the target component is located includes: 从所述目标组件所在的Linux操作系统中,确定预先设置的全局配置文件;Determine a pre-set global configuration file from the Linux operating system where the target component is located; 从所述全局配置文件中,查询预设全局信息。The preset global information is queried from the global configuration file. 根据权利要求1所述的方法,其中,在所述从所述目标组件所在的系统中,获取预设全局信息之后,所述方法还包括:The method according to claim 1, wherein, after acquiring the preset global information from the system where the target component is located, the method further comprises: 在所述创建主体为所述目标组件的情况下,通过所述目标组件创建和覆盖所述初始RAM磁盘。In the case where the creation subject is the target component, the initial RAM disk is created and overwritten by the target component. 根据权利要求1-7之一所述的方法,其中,所述目标部署操作,包括以下至少一项:The method according to any one of claims 1 to 7, wherein the target deployment operation comprises at least one of the following: 对所述目标组件进行签名校验、检查所述目标组件的依赖组件、文件部署和配置、更新表示已部署所述目标组件的记录信息。Perform signature verification on the target component, check dependent components, file deployment and configuration of the target component, and update record information indicating that the target component has been deployed. 一种组件部署装置,包括:A component deployment device, comprising: 第一获取单元,配置为获取组件部署指令,以及确定所述组件部 署指令指示部署的目标组件;The first acquisition unit is configured to acquire a component deployment instruction and determine the component deployment instruction. The deployment instruction indicates the target component to be deployed; 第一执行单元,配置为通过所述目标组件执行所述组件部署指令表示的目标部署操作,其中,所述目标部署操作并非包括初始随机存取存储器RAM磁盘的创建和覆盖操作;A first execution unit is configured to execute, through the target component, a target deployment operation represented by the component deployment instruction, wherein the target deployment operation does not include a creation and overwriting operation of an initial random access memory RAM disk; 第二获取单元,配置为从所述目标组件所在的系统中,获取预设全局信息,其中,所述预设全局信息用于指示所述初始RAM磁盘的创建主体;A second acquisition unit is configured to acquire preset global information from a system where the target component is located, wherein the preset global information is used to indicate a creation subject of the initial RAM disk; 控制单元,配置为在所述创建主体并非所述目标组件的情况下,禁止所述目标组件创建和覆盖所述初始RAM磁盘。The control unit is configured to prohibit the target component from creating and overwriting the initial RAM disk when the creation subject is not the target component. 一种电子设备,包括:An electronic device, comprising: 存储器,配置为存储计算机程序;a memory configured to store a computer program; 处理器,配置为执行所述存储器中存储的计算机程序,且所述计算机程序被执行时,实现上述权利要求1-8任一所述的方法。The processor is configured to execute the computer program stored in the memory, and when the computer program is executed, the method described in any one of claims 1 to 8 is implemented. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时,实现上述权利要求1-8任一所述的方法。 A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method described in any one of claims 1 to 8 is implemented.
PCT/CN2024/076368 2023-02-27 2024-02-06 Component deployment method and apparatus, electronic device, and storage medium WO2024179294A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310209280.6A CN118585251A (en) 2023-02-27 2023-02-27 Component deployment method, device, electronic device and storage medium
CN202310209280.6 2023-02-27

Publications (1)

Publication Number Publication Date
WO2024179294A1 true WO2024179294A1 (en) 2024-09-06

Family

ID=92536080

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/076368 WO2024179294A1 (en) 2023-02-27 2024-02-06 Component deployment method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN118585251A (en)
WO (1) WO2024179294A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090320019A1 (en) * 2008-06-24 2009-12-24 International Business Machines Corporation Multi-scenerio software deployment
CN110399159A (en) * 2019-07-23 2019-11-01 广州夏达信息科技有限公司 Dispositions method, device, computer equipment and the storage medium of operating system
CN112148315A (en) * 2020-09-22 2020-12-29 京东数字科技控股股份有限公司 Software deployment method, device, server and storage medium
CN113656049A (en) * 2021-08-30 2021-11-16 浪潮商用机器有限公司 An operating system deployment method, device, electronic device and storage medium
CN114356345A (en) * 2021-12-31 2022-04-15 远光软件股份有限公司 A solution deployment method, device, and computer-readable storage medium
CN114610334A (en) * 2022-02-28 2022-06-10 珠海优特电力科技股份有限公司 Product visualization deployment method, device, system and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090320019A1 (en) * 2008-06-24 2009-12-24 International Business Machines Corporation Multi-scenerio software deployment
CN110399159A (en) * 2019-07-23 2019-11-01 广州夏达信息科技有限公司 Dispositions method, device, computer equipment and the storage medium of operating system
CN112148315A (en) * 2020-09-22 2020-12-29 京东数字科技控股股份有限公司 Software deployment method, device, server and storage medium
CN113656049A (en) * 2021-08-30 2021-11-16 浪潮商用机器有限公司 An operating system deployment method, device, electronic device and storage medium
CN114356345A (en) * 2021-12-31 2022-04-15 远光软件股份有限公司 A solution deployment method, device, and computer-readable storage medium
CN114610334A (en) * 2022-02-28 2022-06-10 珠海优特电力科技股份有限公司 Product visualization deployment method, device, system and storage medium

Also Published As

Publication number Publication date
CN118585251A (en) 2024-09-03

Similar Documents

Publication Publication Date Title
US9940330B2 (en) System and method for converting a physical disk to a virtual disk
JP6258940B2 (en) Layout and execution of software applications using BPRAM
JP6018590B2 (en) Application compatibility with library operating system
US6725178B2 (en) Use of hidden partitions in a storage device for storing BIOS extension files
US6996706B1 (en) Booting an operating system or running other pre-boot code from a file stored under a different operating system
JP6259459B2 (en) Operating system layout and execution using BPRAM
US8037291B2 (en) Master boot record management
US8281116B2 (en) System and method for utilizing a protected/hidden region of semiconductor based memory/storage
US11030047B2 (en) Information handling system and method to restore system firmware to a selected restore point
US20060064576A1 (en) Boot systems and methods
CN114756290B (en) Operating system installation method, device and readable storage medium
TWI743480B (en) Computer system and a booting method for the same
CN103106086B (en) Operating system disposal route and system
US20060112313A1 (en) Bootable virtual disk for computer system recovery
US20240168732A1 (en) Method for generating driver package, method for deploying driver, electronic device, and computer readable storage medium
WO2024179294A1 (en) Component deployment method and apparatus, electronic device, and storage medium
CN102346676B (en) Calculator multiple boot management method
TWI834494B (en) Firmware burning method, device, electronic equipment and computer storage media
US20240168768A1 (en) Method for packaging driver kernel module, electronic device and storage medium
CN116661876B (en) System startup method, file generation method, electronic equipment and server
CN108536453A (en) Method for Updating Unified Extensible Firmware Interface Firmware
JP2000137580A (en) Device driver for realizing logical hard disk by utilizing unused hard disk sector
CN118467052A (en) Device tree loading method, device, computing device and storage medium
CN119201330A (en) Virtual machine restoration method and device and electronic equipment
CN118409804A (en) Version switching method and device of boot loader

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24762977

Country of ref document: EP

Kind code of ref document: A1