Data processing method, electronic device, storage medium and computer program product

By acquiring DPU device hardware information to generate configuration files, trimming the kernel, and installing a customized operating system, the problems of large DPU operating system size and low resource utilization are solved, achieving efficient and secure operating system deployment.

CN121785620APending Publication Date: 2026-04-03CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

The existing DPU operating system is based on a customized version of the general Linux kernel, which results in problems such as large system size, low resource utilization, high deployment complexity, and insufficient security management.

Method used

By acquiring device hardware information to generate configuration files, the kernel is trimmed to create a customized operating system, retaining only necessary modules, and then installation and deployment are performed using automated tools and scripts, integrating on-demand security management modules.

Benefits of technology

It enables lightweight and customized operating system deployment, improves resource utilization, simplifies the deployment process, provides efficient and secure management, and is suitable for scenarios such as high-performance computing and network acceleration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121785620A_ABST
    Figure CN121785620A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, electronic equipment, a storage medium and a computer program product.The method comprises the steps that hardware information of first equipment is obtained, and the first equipment is provided with a first processor; generating a configuration file of the first equipment according to the hardware information, wherein the configuration file is used for indicating one or more first modules which are required to be configured by the first processor for executing the first task; cutting the first kernel according to the configuration file to obtain a second kernel; and generating a first installation package of a first operating system based on the second kernel, the first operating system being an operating system of the first processor, and the first installation package being used for installation of the first operating system in the first device. Through the method and the device, unnecessary modules can be prevented from being introduced into the operating system, resources occupied by the operating system of the processor are reduced, and the resource utilization rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method, electronic device, storage medium, and computer program product. Background Technology

[0002] In fields such as high-performance computing, cloud computing, data centers, edge computing, and network acceleration, more and more devices need to be configured with processor operating systems. Taking the Data Processing Unit (DPU) operating system as an example, in related technologies, the DPU operating system is generally customized based on the general Linux kernel to meet the needs of data processing and network acceleration. However, this may result in the processor operating system containing a large number of redundant modules and drivers, consuming a lot of processor resources, and resulting in low resource utilization. Summary of the Invention

[0003] To address the related technical problems, embodiments of this application provide a data processing method, an electronic device, a storage medium, and a computer program product.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a data processing method, the method comprising: Obtain the hardware information of the first device, which is configured with a first processor; A configuration file for the first device is generated based on the hardware information. The configuration file is used to indicate one or more first modules that the first processor must configure in order to perform the first task. The first kernel is trimmed according to the configuration file to obtain the second kernel; A first installation package for a first operating system is generated based on the second kernel. The first operating system is the operating system of the first processor. The first installation package is used to install the first operating system on the first device.

[0005] In the above scheme, generating the configuration file for the first device based on the hardware information includes: The system configuration requirements are determined based on the hardware information and the requirements of the first application, wherein the first task is a task that the first application instructs the first device to perform; The configuration file is generated according to the system configuration requirements.

[0006] In the above scheme, the step of trimming the first kernel according to the configuration file to obtain the second kernel includes: The configuration file is used as input to the kernel compilation system when compiling the source code of the first kernel, and the first kernel is trimmed by the kernel configuration tool to obtain the second kernel.

[0007] In the above scheme, before trimming the first kernel using the kernel configuration tool, the method further includes: Determine the dependencies between each of the one or more first modules and the system library; The step of trimming the first kernel using a kernel configuration tool includes: Based on the dependencies, the first kernel is trimmed using the kernel configuration tool to obtain the second kernel, wherein the second kernel includes libraries that have dependencies on the first module.

[0008] In the above scheme, after trimming the first kernel according to the configuration file to obtain the second kernel, the method further includes: According to the configuration file and / or the requirements of the first application, the configuration of the first module in the second kernel is adjusted, wherein the first module includes one or more of the following: network protocol stack; memory management; scheduler; security management module.

[0009] In the above scheme, generating the first installation package of the first operating system based on the second kernel includes: The image file of the first operating system is generated based on the second kernel; Generate a first installation script, which is used to detect the hardware environment of the first device; The first installation package is obtained based on the image file and the first installation script.

[0010] In the above scheme, before generating the first installation package of the first operating system based on the second kernel, the method further includes: Perform a first operation on the first file system to obtain a second file system, wherein the first operation includes one or more of the following: trimming the first file system according to the configuration file; adjusting the configuration parameters of the first file system according to the hardware information; The process of generating the first installation package of the first operating system based on the second kernel includes: The image file of the first operating system is generated based on the second kernel and the second file system; The first installation package is obtained based on the image file.

[0011] The method in the above scheme further includes: Based on the scenario corresponding to the first task, determine whether to add a security management module; If the addition of a security management module is determined, after trimming the first kernel according to the configuration file to obtain the second kernel, the method further includes: The security management module is integrated into the first operating system.

[0012] This application also provides a data processing apparatus, including: The first acquisition unit is used to acquire hardware information of the first device, wherein the first device is configured with a first processor; The first generation unit is configured to generate a configuration file for the first device based on the hardware information, wherein the configuration file is configured to indicate one or more first modules that the first processor must configure in order to perform the first task; The first processing unit is used to trim the first kernel according to the configuration file to obtain the second kernel; The second generation unit is used to generate a first installation package of a first operating system based on the second kernel. The first operating system is the operating system of the first processor. The first installation package is used to install the first operating system on the first device.

[0013] This application also provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor. The processor is used to execute the steps of any of the above-mentioned technical solutions when running the computer program.

[0014] This application also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above methods.

[0015] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.

[0016] As can be seen from the above, in this embodiment, the first device is configured with a first processor. The hardware information of the first device is obtained, and a configuration file for the first device is generated based on the hardware information. This configuration file indicates one or more first modules that the first processor must configure to execute the first task. The first kernel is trimmed according to the configuration file to obtain a second kernel. A first installation package for a first operating system is generated based on the second kernel. The first operating system is the operating system of the first processor, and this first installation package is used to install the first operating system on the first device. It is evident that in this embodiment, the kernel is customized using hardware information, thereby ensuring that the modules in the final operating system installation package for the processor are only those necessary for the processor to complete its tasks. This avoids introducing unnecessary modules into the operating system, reduces the resources occupied by the processor's operating system, and improves resource utilization. Attached Figure Description

[0017] Figure 1 A schematic flowchart illustrating the data processing method provided in the application embodiments of this application; Figure 2 A schematic diagram of the architecture of DPU-OS provided for application embodiments of this application; Figure 3 A flowchart illustrating Embodiment 1 provided for application of this application; Figure 4 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0019] It should be understood that the term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, the term "one or more" in this document is an exemplary expression and can be replaced with any possible expression, such as one or more, at least one, or at least one item.

[0020] It should also be understood that the term "instruction" mentioned in the embodiments of this application can be a direct instruction, an indirect instruction, or an indication of a relationship. For example, A instructing B can mean that A directly instructs B, such as B being able to obtain information through A; it can also mean that A indirectly instructs B, such as A instructing C, so B can obtain information through C; or it can mean that there is a relationship between A and B.

[0021] It should also be understood that the term "correspondence" mentioned in the embodiments of this application may indicate a direct or indirect correspondence between the two, or an association between the two, or a relationship of instruction and being instructed, configuration and being configured, etc.

[0022] It should be noted that terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0023] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.

[0024] In fields such as high-performance computing, cloud computing, data centers, edge computing, and network acceleration, an increasing number of devices require processor operating systems. Taking DPU operating systems as an example, related technologies typically use customized versions of the general-purpose Linux kernel to meet data processing and network acceleration needs. The following solutions are commonly used in these technologies: One approach in related technologies is a Linux-based tailored solution, which typically involves modifying a Linux distribution to create a lightweight operating system suitable for the DPU. However, this approach often includes many redundant modules and drivers, resulting in a still relatively large system size.

[0025] Related technologies include using containers or virtualization to run DPU tasks. While the operating system itself is relatively general-purpose, containers isolate different task or application environments. Container technology offers rapid deployment and isolation capabilities, but because it needs to run a general-purpose operating system (OS) kernel, its performance cannot fully reach the limits of the DPU hardware.

[0026] Related technologies can also employ network device acceleration and offloading solutions. For example, frameworks such as the Data Plane Development Kit (DPDK) can be used to manage packet processing tasks in user space, reducing kernel load. This approach can improve network throughput, but it offers less support for lightweighting and customization of other system modules.

[0027] The DPU operating systems in related technologies have the following drawbacks: First, large system size: Linux-based customized operating systems still contain a large number of redundant modules and drivers, resulting in a large system size and consuming valuable DPU storage resources. Second, high deployment complexity: Due to the general nature of the systems, the deployment process is cumbersome and cannot be completed quickly, especially for batch deployments. Third, low resource utilization: General-purpose operating systems are designed for various hardware scenarios and cannot fully utilize the characteristics and hardware acceleration capabilities of the DPU, leading to low resource utilization. Fourth, insufficient security management: Many related technologies lack efficient and lightweight security management mechanisms, which can easily lead to security vulnerabilities or system instability.

[0028] To address at least one of the aforementioned technical problems, this application proposes a data processing method. In this embodiment, a first device is configured with a first processor. The method involves acquiring the hardware information of the first device and generating a configuration file for the first device based on the hardware information. This configuration file indicates one or more first modules that the first processor must configure to execute a first task. A first kernel is then trimmed according to the configuration file to obtain a second kernel. A first installation package for a first operating system is generated based on the second kernel. The first operating system is the operating system of the first processor, and this first installation package is used to install the first operating system on the first device. As can be seen, this application customizes the kernel using hardware information, thereby ensuring that the modules in the final operating system installation package for the processor are only those necessary for the processor to complete its tasks. This avoids introducing unnecessary modules into the operating system, reduces the resources occupied by the processor's operating system, and improves resource utilization.

[0029] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.

[0030] This application uses an electronic device as an example of an execution subject, and a data processing device as one of the manifestations of an electronic device. This application does not limit the manifestation of electronic devices.

[0031] Please see Figure 1 The data processing method provided in this application includes: Step 101: Obtain the hardware information of the first device, which is configured with a first processor.

[0032] For example, hardware information refers to descriptive data about the hardware resources possessed by the first device.

[0033] For example, hardware information includes one or more of the following: memory capacity, network interface type, storage device type, and accelerator type.

[0034] For example, taking the processor as a DPU, the processor architecture can be x86_64, the memory capacity can be 32GB DDR4, the network interface type can be 100GbE Ethernet, the storage device type can be Non-Volatile Memory Host Controller Interface Specification (NVMe) or Solid State Disk (SSD), and the accelerator type can be Field Programmable Gate Array (FPGA) or Application Specific Integrated Circuit (ASIC).

[0035] For example, the first processor includes one or more of the following: DPU; tensor processing unit (TPU); central processing unit (CPU); graphics processing unit (GPU); neural processing unit (NPU); FPGA; ASIC; digital signal processor (DSP); microcontroller unit (MCU); microprogrammed control unit (MPU); accelerated processing unit (APU); holographic processing unit (HPU).

[0036] For example, the hardware information of the first device is obtained through the first detection script.

[0037] For example, the first detection script runs on the first device, and the first detection script can automatically obtain the hardware information of the first device. The first detection script is a customized hardware detection script.

[0038] For example, a hardware test report is generated, wherein the hardware information includes the hardware test report, or the hardware test report is generated based on the hardware information.

[0039] Step 102: Generate a configuration file for the first device based on the hardware information. The configuration file is used to indicate one or more first modules that the first processor must configure in order to perform the first task.

[0040] For example, the configuration file includes the identifier and / or configuration information of each of the one or more first modules. For instance, the configuration file may include the identifier of the kernel module necessary for the DPU to perform the task, drivers, and / or user space services, such as network detection tools.

[0041] For example, a kernel module may include one or more of the following: the Transmission Control Protocol / Internet Protocol (TCP / IP) of the network protocol stack; and necessary drivers. For example, a necessary driver may be a network adapter driver.

[0042] For example, "configuration file includes driver" means that the configuration file includes the driver's identifier and / or the driver's configuration information, such as a driver list, driver settings, etc.

[0043] For example, "configuration file includes user space service" means that the configuration file includes the identifier of the user space service and / or the configuration information of the user space service, such as the settings of the user space service.

[0044] For example, the first module includes one or more of the following: a network protocol stack; memory management; a scheduler; and a security management module. For instance, the network protocol stack can be used to implement relevant network protocols (such as TCP / IP); memory management is the mechanism in the operating system responsible for memory resource allocation and reclamation, determining the mapping relationship between physical memory and virtual memory and controlling memory access permissions; and the scheduler is used to determine the execution order and priority of various processes and threads.

[0045] For example, for different types of first devices, such as devices that support multiple accelerators, storage media or network interfaces, different drivers and first modules can be dynamically loaded for adaptation. Different network protocol stacks and storage management schemes can also be selected according to different application scenarios to achieve more efficient task processing.

[0046] For example, generating a configuration file for a first device based on hardware information includes: generating a minimal configuration file using an automated tool.

[0047] For example, automation tools can be related scripts, which can be used to select the first module and adjust the relevant parameters of the first module, and generate configuration files.

[0048] For example, if the first device does not support fully automated hardware detection, the user can manually enter or import configuration files to customize the system according to the actual needs of the device.

[0049] For example, an optimization strategy can be performed when generating the configuration file for the first device, namely ensuring that the configuration file does not contain any unnecessary system modules or drivers to reduce redundancy.

[0050] In practical applications, generating the configuration file for the first device based on the hardware information includes: The system configuration requirements are determined based on the hardware information and the requirements of the first application, wherein the first task is a task that the first application instructs the first device to perform; The configuration file is generated according to the system configuration requirements.

[0051] In this embodiment of the application, by generating system configuration requirements based on comprehensive hardware information and first application requirements, it can be ensured that the final generated operating system only contains the functions required to complete the task, which can effectively reduce system redundancy, thereby improving resource utilization and system performance. In this way, it is possible to deploy a customized, lightweight data processor operating system (DPU-OS) to meet the needs of various application scenarios such as high-performance computing and network acceleration.

[0052] For example, the requirement of the first application refers to the requirement of the first application for the first task to be performed by the first device, or the requirement corresponding to the application scenario. For example, the requirement of the first application could be high-performance computing or network acceleration.

[0053] For example, the first task is a specific operation performed by the first device as instructed by the first application, such as data forwarding, encryption / decryption, traffic monitoring, etc.

[0054] For example, system configuration requirements include basic information about the first module necessary to complete the first task. The process of determining system configuration requirements can identify which first modules must be configured. For instance, in a high-performance computing scenario, the first module may include an algorithm acceleration module; in a network acceleration scenario, the first module may include a network protocol stack, etc.

[0055] For example, determining system configuration requirements based on the hardware information and the requirements of the first application includes: determining system configuration requirements based on the hardware test report and the requirements of the first application.

[0056] Step 103: Trim the first kernel according to the configuration file to obtain the second kernel.

[0057] For example, the first kernel refers to the Linux kernel source code, which is usually a general version of the kernel that contains a large number of modules that support different hardware platforms and application scenarios.

[0058] For example, trimming the first kernel means removing functional modules and drivers that are irrelevant to the current application scenario by configuring and controlling the compilation of the first kernel, thereby enabling developers to generate a streamlined and efficient customized kernel that runs on a specific hardware platform.

[0059] For example, the second kernel is a customized kernel that has been trimmed down, retaining only the modules necessary for the DPU task and removing all redundant and unnecessary functions.

[0060] For example, the kernel module of the second kernel is the first module. For instance, in this application, the kernel module of the second kernel may only retain the network protocol stack, memory management, scheduler, and security management module.

[0061] In practical applications, before trimming the first kernel using the kernel configuration tool, the method further includes: Determine the dependencies between each of the one or more first modules and the system library; The step of trimming the first kernel using a kernel configuration tool includes: Based on the dependencies, the first kernel is trimmed using the kernel configuration tool to obtain the second kernel, wherein the second kernel includes libraries that have dependencies on the first module.

[0062] In this embodiment, by identifying the dependencies between modules before trimming the kernel and performing precise trimming based on these dependencies, it can be ensured that critical dependencies are not mistakenly deleted during the trimming process, thereby avoiding system malfunctions or functional deficiencies. The step of determining the dependencies between each of one or more first modules and the system libraries helps improve system stability and functionality, while ensuring that the trimmed kernel can still fully support the required tasks.

[0063] For example, the goal of the trimming is to generate a streamlined but fully functional second kernel that includes the first module and system libraries that depend on the first module, while removing all unnecessary modules and drivers.

[0064] For example, a dependency refers to a module's need for the functionality of another module or library to function properly during runtime. For instance, a network protocol stack module might depend on a TCP / IP implementation library, a memory management library, or a scheduler library.

[0065] For example, a system library refers to a library in an operating system that supports the operation of modules. System libraries are also known as runtime libraries, such as standard C libraries (e.g., glibc) and POSIX (Portable Operating System Interface, POSIX) thread libraries (e.g., pthread).

[0066] For example, determining the dependencies between each of one or more first modules and system libraries includes: identifying the dependencies between kernel modules, drivers, and system libraries required for the first task.

[0067] For example, the dependency relationship between the first module and the system library includes a strong dependency relationship. This application mainly focuses on strong dependencies, but this application does not limit the dependency relationship between the first module and the system library to only be a strong dependency relationship. The dependency relationship between the first module and the system library can also be a strong dependency relationship.

[0068] For example, the decision on whether to include a security management module and / or an optimization algorithm module in the first module is determined based on the scenario of the first application or the scenario of the first task. For instance, a security management module may include an encryption module or an access control module, and an optimization algorithm module may include an acceleration algorithm module.

[0069] In practical applications, the step of trimming the first kernel according to the configuration file to obtain the second kernel includes: The configuration file is used as input to the kernel compilation system when compiling the source code of the first kernel, and the first kernel is trimmed by the kernel configuration tool to obtain the second kernel.

[0070] In this embodiment, the configuration file provides guidance for the entire trimming process. The kernel compilation system is responsible for executing the compilation task according to the requirements of the configuration file, while the kernel configuration tool serves as a bridge for automated configuration execution. This allows for the trimming from the first kernel to the second kernel without manual intervention, thereby achieving kernel lightweighting and efficiency. This significantly reduces system size and resource consumption, and better adapts to the high performance, low power consumption, and rapid deployment requirements of DPU devices.

[0071] To help understand the above practical application, for example, the configuration file is used as input to the kernel compilation system when compiling the source code of the first kernel. The first kernel is trimmed by a kernel configuration tool (such as make menuconfig), keeping only the network protocol stack, memory management, scheduler and basic security management modules. The kernel source code is then compiled to generate a second kernel, which is a customized kernel suitable for the first processor (such as DPU).

[0072] For example, a kernel compilation system refers to the toolchain and / or process used in the Linux kernel compilation process. For instance, a kernel compilation system includes compilation tools such as the GNU Compiler Collection (GCC) and / or the Kconfig configuration system.

[0073] For example, in this application implementation, the kernel compilation system is responsible for parsing the options in the configuration file and selectively compiling the source code of the first kernel according to the options in the configuration file to generate a customized second kernel that meets specific needs.

[0074] For example, kernel configuration tools include `make menuconfig` and / or `make xconfig`, etc. Kernel configuration tools are used to select whether to enable or disable different kernel modules and feature options.

[0075] For example, before the configuration file is used as input to the kernel compilation system when compiling the source code of the first kernel, the source code of the first kernel needs to be prepared. Preparing the source code of the first kernel includes: obtaining the source code of the Linux kernel and applying patches to support the features of the first processor (e.g., DPU).

[0076] In practical applications, after trimming the first kernel according to the configuration file to obtain the second kernel, the method further includes: According to the configuration file and / or the requirements of the first application, the configuration of the first module in the second kernel is adjusted, wherein the first module includes one or more of the following: network protocol stack; memory management; scheduler; security management module.

[0077] In this embodiment, by adjusting the configuration of the first module, the requirements of different application scenarios can be flexibly adapted without recompiling the entire kernel. For example, in network acceleration scenarios, the performance of the network protocol stack can be enhanced, while simplifying the complexity of memory management and the scheduler; in scenarios where network security is emphasized, the depth of the security management module can be increased, while other non-critical modules can be simplified to reduce system overhead.

[0078] Step 104: Generate a first installation package for a first operating system based on the second kernel. The first operating system is the operating system of the first processor. The first installation package is used to install the first operating system on the first device.

[0079] For example, the first installation package includes: an image file of a first operating system, a first installation script and / or a first deployment script, etc.

[0080] In practical applications, before generating the first installation package of the first operating system based on the second kernel, the method further includes: Perform a first operation on the first file system to obtain a second file system, wherein the first operation includes one or more of the following: trimming the first file system according to the configuration file; adjusting the configuration parameters of the first file system according to the hardware information; The process of generating the first installation package of the first operating system based on the second kernel includes: The image file of the first operating system is generated based on the second kernel and the second file system; The first installation package is obtained based on the image file.

[0081] In this embodiment, the first file system is trimmed and optimized before generating the first installation package to generate a more streamlined and efficient second file system. An image file is then generated using the second kernel and the second file system, and this image file is used to build an installation package suitable for the DPU hardware. This method effectively reduces system size and improves system efficiency, thereby achieving a highly customized operating system deployment solution for a specific hardware platform. This meets the lightweight DPU operating system requirements in scenarios such as high-performance computing, edge computing, and cloud computing.

[0082] For example, performing a first operation on a first file system to obtain a second file system may include: selecting a first file system suitable for a first processor (such as EXT4), trimming the first file system to reduce unnecessary files and directories, and adjusting the read and write performance parameters of the first file system, such as cache size and I / O scheduling strategy, based on hardware information (such as the storage devices and input / output (I / O requirements) of the first processor) to obtain a second file system.

[0083] For example, drivers required by the first processor, such as network adapters, storage devices, and accelerators, are filtered from the driver library.

[0084] For example, the drivers required by the first processor are integrated into the first operating system and tested to ensure stability and compatibility.

[0085] For example, only necessary daemons and services, such as system logs and network services, are retained in the user space service, while unnecessary system services are removed. The application and data processing flow of the user service space are then optimized according to the needs of the first application to obtain the optimized user service space.

[0086] In practical applications, generating the first installation package of the first operating system based on the second kernel includes: The image file of the first operating system is generated based on the second kernel; Generate a first installation script, which is used to detect the hardware environment of the first device; The first installation package is obtained based on the image file and the first installation script.

[0087] In this embodiment, intelligent adaptation for different DPU hardware can be achieved through the first installation pin. By generating an image file based on the second kernel, generating an installation script containing the first detection script, and combining the installation script containing the first detection script with the image file into a first installation package, the automation and flexibility of the processor's operating system installation process are improved, and the risk of human configuration errors is reduced.

[0088] For example, generating an image file of the first operating system based on the second kernel includes: packaging the second kernel, the second file system, the drivers required by the first processor, and the user service space (e.g., an optimized user service space) into an image file of the first operating system. Taking the first processor as a DPU as an example, the image file of the first operating system can be a lightweight DPU-OS image file.

[0089] For example, the image file is validated in a test environment to ensure its functional integrity and stability.

[0090] For example, the first installation script is a one-click installation script that can automatically detect the hardware environment of the first processor and adapt it to the configuration file.

[0091] For example, the deployment of the first operating system can be accomplished through the Grand Unified Bootloader (GRUB) interface.

[0092] For example, the method further includes: writing automated deployment scripts that support remote batch installation and configuration of the first operating system via tools such as Secure Shell (SSH) and Ansible. For instance, the first operating system can be installed and configured on multiple first devices with DPUs deployed.

[0093] For example, in a large-scale data center environment, it is necessary to ensure the configuration synchronization and consistency of multiple primary devices. For instance, a unified configuration template of the primary operating system for these multiple primary devices can be generated (e.g., the primary kernels corresponding to multiple primary devices are the same), thereby ensuring the configuration synchronization and consistency of the multiple primary devices.

[0094] In practical applications, the method further includes: Based on the scenario corresponding to the first task, determine whether to add a security management module; If the addition of a security management module is confirmed, after trimming the first kernel according to the configuration file to obtain the second kernel, the method further includes: The security management module is integrated into the first operating system.

[0095] In this embodiment, by dynamically deciding whether to integrate the security management module based on the scenario of the first task, and efficiently integrating the security management module into the operating system when needed, a security mechanism that integrates on demand can be achieved through this dynamic decision-making and integration method. This avoids introducing the security management module unnecessarily, thereby improving the overall system security and operating efficiency.

[0096] For example, taking DPU-OS as the first operating system, a security management module can be integrated into DPU-OS. The security management module has functions including access control, data encryption and / or basic firewall functions.

[0097] For example, if the first task involves operations such as financial transactions, network communication, or user authentication, a security management module can be integrated; while for simple tasks such as data caching and forwarding, a security management module can be integrated to save system resources and improve operating efficiency.

[0098] For example, the integration process of the security management module includes packaging the driver code, configuration files and related dependencies of the security management module into the first installation package, and ensuring that the driver code, configuration files and related dependencies of the security management module are compatible with the kernel version, thereby ensuring the stability and functionality of the system after startup.

[0099] For example, for security management and rapid update modules, in application scenarios with low security requirements, it is possible to choose not to integrate security management and other modules to further simplify the first operating system.

[0100] To aid in understanding the above data processing methods, let's take DPU-OS as the first operating system as an example, combined with... Figure 2The final architecture of DPU-OS is described below. DPU-OS comprises user-space services, a second file system, a second kernel, a hardware driver layer, and a hardware layer. The user-space services layer is the highest layer of DPU-OS, including all user-space task daemons, data processing applications, and security modules. This layer has been streamlined and optimized, retaining only the essential services required by the DPU to improve efficiency and security. To adapt to the specific needs of the DPU, DPU-OS uses a trimmed-down version of EXT4 or XFS as the second file system. This optimized file system provides better read and write performance while reducing system resource consumption. The second kernel has been streamlined, retaining only critical modules such as the network protocol stack, memory management, scheduler, and security management, while removing kernel modules unrelated to the DPU. This kernel customization optimizes DPU-OS for performance and resource utilization. The hardware driver layer of DPU-OS integrates only hardware drivers related to DPU tasks, such as drivers for network adapters, storage devices, and accelerators. Removing unnecessary drivers further reduces system overhead. At the hardware layer, DPU-OS runs on top of the DPU hardware, making full use of the DPU's high-performance processor, memory, network interface, and accelerator hardware resources to achieve high-speed data processing and computing.

[0101] Through the design of the operating system for the first processor, the first operating system not only maximizes the performance of the DPU hardware but also achieves a customized, lightweight, and efficient operating system experience through a streamlined design. Lightweight security management and rapid update mechanisms further enhance system security and maintainability, providing reliable technical support for enterprise applications.

[0102] Taking the DPU as the first processor in this embodiment as an example, this embodiment aims to design a customized lightweight DPU operating system that can be optimized according to the specific needs of the DPU hardware, reducing system size, simplifying deployment processes, improving resource utilization efficiency, and providing a lightweight security management mechanism. This embodiment automatically detects DPU-related hardware information and generates a minimal configuration file based on the detection results, ensuring that the DPU-OS only loads necessary kernel modules and drivers. This technology significantly differs from traditional Linux trimming schemes, reducing system redundancy and improving resource utilization efficiency. This embodiment deeply customizes and optimizes the kernel for the specific needs of the DPU, such as customizing the network protocol stack, memory management, scheduler, and security management. These optimizations not only improve system performance but also reduce resource consumption. This embodiment proposes an efficient and convenient operating system deployment scheme, including a one-click installer and automated batch deployment scripts. These technologies significantly reduce the deployment complexity of the DPU device operating system and improve operational efficiency, especially suitable for large-scale data center environments. This application integrates a lightweight security management module designed specifically for DPUs and provides a fast security update mechanism. This module ensures basic security functions without significantly impacting DPU performance.

[0103] The present application will be further described in detail below with reference to application examples.

[0104] Example 1 Example 1 uses DPU as the first processor, DPU as the first device, and DPU-OS as the first operating system as an example. Please refer to [link to example]. Figure 3 , Figure 3 Here is an exemplary flowchart of Example 1. Figure 3 The process shown includes four parts: hardware detection and configuration selection, customized system building, rapid installation and deployment, and lightweight security management. The first part, hardware detection and configuration selection, includes the following steps: S301: Obtain hardware information of the target DPU device.

[0105] For example, hardware information of a target DPU device can be obtained by detecting the hardware of the target DPU device, such as by running a custom hardware detection script (i.e., the first detection script) on the target DPU device. The hardware detection script automatically obtains the hardware information of the target DPU device, including DPU architecture (e.g., x86_64), memory size (e.g., 32GB DDR4), network interface type (e.g., 100GbE Ethernet), storage device type (e.g., NVMe SSD), and accelerator type (e.g., FPGA or ASIC accelerator).

[0106] For example, a hardware testing report can be generated as a basis for subsequent steps. For example, the hardware information may include the hardware testing report, or the hardware testing report may be generated based on the hardware information.

[0107] S302: Generate configuration file.

[0108] For example, system configuration requirements are determined based on hardware testing reports and the needs of the target application (such as high-performance computing, network acceleration, etc.). For example, the target application can be a first application.

[0109] For example, an automated tool is used to generate a minimal configuration file that contains only the identifiers of kernel modules (such as TCP / IP for the network protocol stack, and necessary drivers such as network adapter drivers) and user-space services (such as network monitoring tools) necessary for the DPU to perform its tasks.

[0110] For example, an optimization strategy for generating configuration files is to ensure that the configuration files do not contain any unnecessary system modules or drivers, thereby reducing redundancy.

[0111] S303: Perform dependency analysis.

[0112] For example, taking the first task as the DPU task, the dependencies between the kernel modules, drivers and system libraries required by the DPU task are identified.

[0113] For example, depending on the scenario of the target application and / or the scenario of the DPU, it is decided whether to add a specific security module (such as an encryption module or an access control module) or an optimization algorithm module (such as an acceleration algorithm for specific data processing).

[0114] Part Two, Customized System Construction, includes the following steps: S304: Trimming the first kernel.

[0115] For example, preparing the Linux kernel source code (i.e., the source code of the first kernel) includes: obtaining the source code of the Linux kernel and applying patches to support the features of the first processor (e.g., DPU).

[0116] For example, using the configuration file generated in step S302 as input, the first kernel is trimmed using a kernel configuration tool (such as makemenuconfig), retaining only the network protocol stack (customized, XGP, parameters), memory management, scheduler, and basic security management modules.

[0117] For example, the kernel source code is compiled to generate a customized kernel, i.e., a second kernel, suitable for the DPU.

[0118] S305: Build a second file system.

[0119] For example, a first file system suitable for the DPU (such as EXT4) is selected, and the first file system is trimmed to reduce unnecessary files and directories.

[0120] For example, the read / write performance parameters of the first file system, such as cache size and I / O scheduling strategy, are adjusted according to the storage device and I / O requirements of the DPU.

[0121] By adjusting the first file system through one or more of the examples above, the second file operation can eventually be obtained.

[0122] S306: Integrated driver.

[0123] For example, drivers required by the DPU, such as network adapters, storage devices, and accelerators, can be filtered from the driver library.

[0124] For example, selected drivers are integrated into the system and rigorously tested to ensure stability and compatibility.

[0125] S307: Optimize user space services.

[0126] For example, only necessary daemons and services, such as system logs and network services, are retained in the user space service, while unnecessary system services are removed.

[0127] For example, the application and data processing flow of the user service space are optimized according to the needs of the first application to obtain the optimized user service space.

[0128] Part Three, Quick Installation and Deployment, includes the following steps: S308: Generates the DPU-OS image file.

[0129] For example, a customized kernel (i.e., a second kernel), a second file system, drivers, and user-space services are packaged into a lightweight DPU-OS image file.

[0130] For example, the DPU-OS image file is validated and tested in a test environment to ensure the functional integrity and stability of the DPU-OS image file.

[0131] S309: Generate a one-click installer.

[0132] For example, a one-click installation script (i.e., the first installation script) is developed, which can automatically detect the DPU hardware environment and adapt to the configuration file generated in step S302.

[0133] For example, embodiments of this application support simplified operations, allowing DPU-OS deployment to be completed simply through the grub interface.

[0134] S310: Batch deployment of DPU-OS.

[0135] Develop automated deployment scripts that support remote batch installation and configuration of the primary operating system via tools such as SSH and Ansible. For example, the primary operating system can be installed and configured on multiple primary devices with DPUs deployed.

[0136] For example, in a large-scale data center environment, it is necessary to ensure the configuration synchronization and consistency of multiple target DPU devices.

[0137] Part Four, Lightweight Security Management, includes the following steps: S311: Integrated security module.

[0138] For example, the security module includes a security management module.

[0139] For example, a security management module is integrated into DPU-OS, the security management module having functions including access control, data encryption and / or basic firewall functions.

[0140] Taking the DPU of the first processor as an example, the core of this application's embodiment lies in starting from low-level hardware detection, automatically generating a minimal configuration file for the DPU hardware characteristics, and customizing the kernel based on this configuration file. This deeply customized method not only eliminates kernel modules unrelated to DPU tasks but also optimizes performance for the specific needs of the DPU, such as customizing the network protocol stack, memory management, and scheduler, significantly improving system performance and resource utilization. This application's embodiment proposes a one-click rapid deployment and batch installation solution, and a highly automated installation and deployment process, including one-click installation scripts and batch deployment scripts. These tools can greatly reduce the deployment complexity of the operating system on DPU devices, especially suitable for large-scale data center environments, significantly shortening deployment time and improving operational efficiency. This application's embodiment integrates a lightweight security management module designed specifically for DPUs, which ensures basic security functions (such as access control, data encryption, and firewall configuration). Considering the diversity of DPU hardware and the complexity of application scenarios, this application's embodiment supports dynamically loading different drivers and modules to adapt to different types of DPU hardware and application scenarios. This design ensures the flexibility and scalability of the DPU-OS, meeting the needs of future hardware and technology development.

[0141] This application embodiment supports dynamically loading different drivers and modules to adapt to different types of DPU hardware and application scenarios. This design ensures the flexibility and scalability of the DPU-OS. Compared with related technologies, this application embodiment has the following technical advantages: First, smaller size and higher performance: Through customized kernel optimization, file system trimming and user space optimization, the system size of DPU-OS has been greatly reduced, while the performance has been improved, enabling more efficient use of DPU hardware resources.

[0142] Second, rapid deployment and batch installation: It provides one-click rapid installation and batch deployment functions, which significantly reduces the complexity of operating system installation and configuration, and is especially suitable for DPU device deployment in large-scale data centers.

[0143] Third, security management: Integrated lightweight security management ensures that DPU-OS has good security protection capabilities during operation and can quickly update security patches and fix vulnerabilities.

[0144] Fourth. Highly targeted: Unlike general Linux trimming solutions, this application's embodiment starts with low-level hardware detection, automatically generates a minimal configuration, and performs deep optimization for the characteristics of the DPU, avoiding the impact of redundant system modules on performance.

[0145] This application's embodiments can be applied to high-performance computing and cloud computing, edge computing and IoT devices, network security and acceleration, and other fields. DPUs play a crucial role in high-performance computing and cloud computing, and a customized lightweight DPU-OS can significantly improve resource utilization and reduce system maintenance costs, making it suitable for enterprise-level data centers and cloud service providers. The application of DPUs in edge computing and IoT devices is becoming increasingly widespread. This application's embodiments provide a rapidly deployable and customized optimized operating system, which can accelerate device deployment and reduce development and maintenance costs. DPUs are commonly used for network traffic acceleration and security management. The lightweight security management module in this application's embodiments can ensure security without affecting network acceleration performance, thereby enhancing the overall competitiveness of network devices.

[0146] Based on the embodiments described above, this application also provides a data processing apparatus, see [link to previous document]. Figure 4 The data processing device includes: The first acquisition unit 401 is used to acquire hardware information of the first device, wherein the first device is configured with a first processor; The first generation unit 402 is configured to generate a configuration file for the first device based on the hardware information. The configuration file is used to indicate one or more first modules that the first processor must configure in order to perform the first task. The first processing unit 403 is used to trim the first kernel according to the configuration file to obtain the second kernel; The second generation unit 404 is used to generate a first installation package of a first operating system based on the second kernel. The first operating system is the operating system of the first processor. The first installation package is used to install the first operating system on the first device.

[0147] In one embodiment, the first processing unit 403 generates a configuration file for the first device based on the hardware information, including: The system configuration requirements are determined based on the hardware information and the requirements of the first application, wherein the first task is a task that the first application instructs the first device to perform; The configuration file is generated according to the system configuration requirements.

[0148] In one embodiment, the first processing unit 403 trims the first kernel according to the configuration file to obtain a second kernel, including: The configuration file is used as input to the kernel compilation system when compiling the source code of the first kernel, and the first kernel is trimmed by the kernel configuration tool to obtain the second kernel.

[0149] In one embodiment, the apparatus further includes a first determining unit, which, before the first kernel is trimmed by the kernel configuration tool, is used to determine the dependency relationship between each of the one or more first modules and the system library; The first processing unit 403 trims the first kernel using a kernel configuration tool, including: Based on the dependencies, the first kernel is trimmed using the kernel configuration tool to obtain the second kernel, wherein the second kernel includes libraries that have dependencies on the first module.

[0150] In one embodiment, the apparatus further includes an adjustment unit, which is used to adjust the configuration of the first module in the second kernel according to the configuration file and / or the requirements of the first application after the first kernel is trimmed according to the configuration file to obtain the second kernel. The first module includes one or more of the following: network protocol stack; memory management; scheduler; security management module.

[0151] In one embodiment, the second generation unit 404 generates a first installation package of the first operating system based on the second kernel, including: The image file of the first operating system is generated based on the second kernel; Generate a first installation script, which is used to detect the hardware environment of the first device; The first installation package is obtained based on the image file and the first installation script.

[0152] In one embodiment, the apparatus further includes a second processing unit, which is used to perform a first operation on the first file system to obtain a second file system before generating the first installation package of the first operating system based on the second kernel. The first operation includes one or more of the following: trimming the first file system according to the configuration file; adjusting the configuration parameters of the first file system according to the hardware information. The second processing unit generates a first installation package of the first operating system based on the second kernel, including: The image file of the first operating system is generated based on the second kernel and the second file system; The first installation package is obtained based on the image file.

[0153] In one embodiment, the device further includes a second determining unit and an integration unit, wherein the second determining unit is configured to: determine whether to add a security management module based on the scenario corresponding to the first task; If it is determined that a security management module will be added, after the first kernel is trimmed according to the configuration file to obtain the second kernel, the integration unit is used to integrate the security management module into the first operating system.

[0154] In practical applications, the first acquisition unit 401, the first generation unit 402, the first processing unit 403, the second generation unit 404, the first determination unit, the adjustment unit, the second processing unit, the second determination unit, and the integration unit can be implemented by the processor in the communication device.

[0155] It should be noted that the data processing apparatus provided in the above embodiments is only illustrated by the division of the above program modules. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the apparatus can be divided into different program modules to complete all or part of the processing described above. In addition, the data processing apparatus and data processing method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0156] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, this application also provides an electronic device, see [link to relevant documentation]. Figure 5 The electronic device includes: a first communication interface 1, a first processor 2, a first memory 3, and a bus system 4.

[0157] The first processor 2 is configured to acquire hardware information of a first device, wherein the first device is configured with a first processor; generate a configuration file for the first device based on the hardware information, wherein the configuration file indicates one or more first modules that the first processor must configure to perform a first task; trim a first kernel based on the configuration file to obtain a second kernel; and generate a first installation package for a first operating system based on the second kernel, wherein the first operating system is the operating system of the first processor, and the first installation package is used to install the first operating system on the first device.

[0158] In one embodiment, the first processor 2 generates a configuration file for the first device based on the hardware information, including: The system configuration requirements are determined based on the hardware information and the requirements of the first application, wherein the first task is a task that the first application instructs the first device to perform; The configuration file is generated according to the system configuration requirements.

[0159] In one embodiment, the first processor 2 trims the first kernel according to the configuration file to obtain a second kernel, including: The configuration file is used as input to the kernel compilation system when compiling the source code of the first kernel, and the first kernel is trimmed by the kernel configuration tool to obtain the second kernel.

[0160] In one embodiment, before the first processor 2 trims the first kernel using the kernel configuration tool, the first processor 2 is further configured to determine the dependency relationship between each of the one or more first modules and the system library; The first processor 2 trims down the first kernel using a kernel configuration tool, including: Based on the dependencies, the first kernel is trimmed using the kernel configuration tool to obtain the second kernel, wherein the second kernel includes libraries that have dependencies on the first module.

[0161] In one embodiment, the first processor 2 is further configured to, after trimming the first kernel according to the configuration file to obtain the second kernel, adjust the configuration of the first module in the second kernel according to the configuration file and / or the requirements of the first application, wherein the first module includes one or more of the following: network protocol stack; memory management; scheduler; security management module.

[0162] In one embodiment, the first processor 2 generates a first installation package of a first operating system based on the second kernel, comprising: The image file of the first operating system is generated based on the second kernel; Generate a first installation script, which is used to detect the hardware environment of the first device; The first installation package is obtained based on the image file and the first installation script.

[0163] In one embodiment, the first processor 2 is further configured to perform a first operation on the first file system to obtain a second file system before generating the first installation package of the first operating system based on the second kernel. The first operation includes one or more of the following: trimming the first file system according to the configuration file; adjusting the configuration parameters of the first file system according to the hardware information. The first processor 2 generates a first installation package of the first operating system based on the second kernel, including: The image file of the first operating system is generated based on the second kernel and the second file system; The first installation package is obtained based on the image file.

[0164] In one embodiment, the first processor 2 determines whether to add a security management module based on the scenario corresponding to the first task; If it is determined that a security management module will be added, after the first kernel is trimmed according to the configuration file to obtain the second kernel, the first processor 2 is also used to integrate the security management module into the first operating system.

[0165] It should be noted that the specific processing procedure of the first communication interface 1 can be understood by referring to the above method.

[0166] Of course, in practical applications, the various components in an electronic device are coupled together through bus system 4. It can be understood that bus system 4 is used to achieve communication and connection between these components. In addition to the data bus, bus system 4 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 5 The general will label all buses as Bus System 4.

[0167] The first memory 3 in this embodiment is used to store various types of data to support operation in the electronic device. Examples of such data include any computer program used to operate on the electronic device.

[0168] The methods disclosed in the embodiments of this application can be applied to the first processor 2, or implemented by the first processor 2. The first processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware or by instructions in the form of software in the first processor 2. The first processor 2 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The first processor 2 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the first memory 3. The first processor 2 reads the information in the first memory 3 and completes the steps of the aforementioned method in combination with its hardware.

[0169] In an exemplary embodiment, the electronic device may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned methods.

[0170] It is understood that the first memory 3 in this application embodiment can be a volatile memory pool or a non-volatile memory pool, or both. The non-volatile memory pool 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), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory pool can be a disk storage pool or a magnetic tape storage pool. The volatile memory pool can be a random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), 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), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The storage pools described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of storage pools.

[0171] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a first memory 3 storing a computer program, which can be executed by a first processor 2 to complete the steps described in the aforementioned method.

[0172] In an exemplary embodiment, this application also provides a computer program product, including a computer program that can be executed by a first processor 2 to perform the steps described in the foregoing method.

[0173] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

Claims

1. A data processing method, characterized in that, The data processing method includes: Obtain the hardware information of the first device, which is configured with a first processor; A configuration file for the first device is generated based on the hardware information. The configuration file is used to indicate one or more first modules that the first processor must configure in order to perform the first task. The first kernel is trimmed according to the configuration file to obtain the second kernel; A first installation package for a first operating system is generated based on the second kernel. The first operating system is the operating system of the first processor. The first installation package is used to install the first operating system on the first device.

2. The method according to claim 1, characterized in that, The step of generating the configuration file for the first device based on the hardware information includes: The system configuration requirements are determined based on the hardware information and the requirements of the first application, wherein the first task is a task that the first application instructs the first device to perform; The configuration file is generated according to the system configuration requirements.

3. The method according to claim 1, characterized in that, The step of trimming the first kernel according to the configuration file to obtain the second kernel includes: The configuration file is used as input to the kernel compilation system when compiling the source code of the first kernel, and the first kernel is trimmed by the kernel configuration tool to obtain the second kernel.

4. The method according to claim 3, characterized in that, Before trimming the first kernel according to the configuration file to obtain the second kernel, the method further includes: Determine the dependencies between each of the one or more first modules and the system library; The step of trimming the first kernel using a kernel configuration tool includes: Based on the dependencies, the first kernel is trimmed using the kernel configuration tool to obtain the second kernel, wherein the second kernel includes libraries that have dependencies on the first module.

5. The method according to claim 1, characterized in that, After trimming the first kernel according to the configuration file to obtain the second kernel, the method further includes: According to the configuration file and / or the requirements of the first application, the configuration of the first module in the second kernel is adjusted, wherein the first module includes one or more of the following: network protocol stack; memory management; scheduler; security management module.

6. The method according to claim 1, characterized in that, The process of generating the first installation package of the first operating system based on the second kernel includes: The image file of the first operating system is generated based on the second kernel; Generate a first installation script, which is used to detect the hardware environment of the first device; The first installation package is obtained based on the image file and the first installation script.

7. The method according to claim 1, characterized in that, Before generating the first installation package of the first operating system based on the second kernel, the method further includes: Perform a first operation on the first file system to obtain a second file system, wherein the first operation includes one or more of the following: trimming the first file system according to the configuration file; adjusting the configuration parameters of the first file system according to the hardware information; The process of generating the first installation package of the first operating system based on the second kernel includes: The image file of the first operating system is generated based on the second kernel and the second file system; The first installation package is obtained based on the image file.

8. The method according to claim 1, characterized in that, The method further includes: Based on the scenario corresponding to the first task, determine whether to add a security management module; If the addition of a security management module is determined, after trimming the first kernel according to the configuration file to obtain the second kernel, the method further includes: The security management module is integrated into the first operating system.

9. A data processing apparatus, characterized in that, include: The first acquisition unit is used to acquire hardware information of the first device, wherein the first device is configured with a first processor; The first generation unit is configured to generate a configuration file for the first device based on the hardware information, wherein the configuration file is configured to indicate one or more first modules that the first processor must configure in order to perform the first task; The first processing unit is used to trim the first kernel according to the configuration file to obtain the second kernel; The second generation unit is used to generate a first installation package of a first operating system based on the second kernel. The first operating system is the operating system of the first processor. The first installation package is used to install the first operating system on the first device.

10. An electronic device, characterized in that, include: The processor and the memory used to store computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 8.

11. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.