DPU device, DPU operating system switching method and electronic equipment

By introducing a switching module into the DPU device, the problem that existing DPU devices can only start one operating system is solved, and the DPU device can switch to one of multiple pre-deployed operating systems according to needs, meeting different usage requirements is achieved. The flexibility of the DPU device to meet different usage requirements .

CN119415262APending Publication Date: 2025-02-11SHENZHEN JAGUAR MICROSYSTEMS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411561804.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

Existing DPU devices can only start one pre-deployed operating system, which is difficult to meet the user's need for DPUs to switch successively to run multiple different operating systems in certain application scenarios.

Method used

By introducing a switching module into the DPU device, the target sub-storage module is determined after receiving the system reset signal, and the main processing module is connected to the target sub-storage module, the DPU device can enter one of the multiple pre-deployed operating systems. .

Benefits of technology

The DPU device is switched to one of a plurality of pre-deployed operating systems according to the usage requirements, thereby meeting different usage requirements and improving the flexibility and applicability of the DPU device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415262A_ABST
    Figure CN119415262A_ABST
Patent Text Reader

Abstract

The invention discloses a DPU device, a DPU operating system switching method and electronic equipment, the DPU device comprises a main processing module, a switching module and a storage module, the storage module comprises a plurality of sub-storage modules, and one sub-storage module is used for storing data related to one operating system; the switching module is used for determining a target sub-storage module when receiving a system reset signal of the DPU device, and enabling the main processing module to be connected with the target sub-storage module; and the main processing module is used for enabling the DPU device to enter the target operating system according to the data in the target sub-storage module. According to the application, the switching module is used for determining the target sub-storage module when the system reset signal of the DPU device is received, and the main processing module is connected with the target sub-storage module, so that the DPU device can enter one target operating system in a plurality of pre-deployed operating systems according to the use requirement, and the operation efficiency of the DPU device is improved. Therefore, the DPU device can meet different use requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of DPUs, and in particular to a DPU device, a method for switching a DPU operating system, and an electronic device. Background Art

[0002] In cloud computing centers, DPU (Data Processing Unit) is an emerging hardware component that effectively reduces the burden on the host server's CPU by sharing the data processing tasks on the host server, allowing the CPU to focus more on executing core business, thereby improving the response speed and operating efficiency of the entire system. DPU is widely used in application scenarios such as big data processing, high-performance computing and cloud services, and is gradually becoming an indispensable part of modern cloud computing centers.

[0003] At present, the DPU widely used in the market usually has a complete operating system pre-deployed. This internal integrated operating system design enables the DPU to independently complete data processing tasks without relying on external host resources.

[0004] However, a general DPU only supports starting one pre-deployed operating system, which may not meet the diverse usage needs of users in some application scenarios. For example, some application scenarios may require the DPU to switch to run multiple different operating systems in succession to support different business logic and data processing methods. Therefore, a pre-deployed operating system is often difficult to meet the usage needs of all users. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present application provides a DPU device, a method for DPU switching operating systems and an electronic device. The switching module is used to determine the target sub-storage module when receiving a system reset signal of the DPU device, and connect the main processing module with the target sub-storage module, so that the DPU device can enter a target operating system among multiple pre-deployed operating systems according to usage requirements, thereby enabling the DPU device to meet different usage requirements.

[0006] To solve the above problems, the present invention provides the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a DPU device, including: a main processing module, a switching module, and a storage module, wherein the storage module includes a plurality of sub-storage modules, and one of the sub-storage modules is used to store data related to an operating system;

[0008] The switching module is used to determine the target sub-storage module and connect the main processing module to the target sub-storage module when receiving the system reset signal of the DPU device;

[0009] The main processing module is used to enable the DPU device to enter a target operating system according to the data in the target sub-storage module.

[0010] In some implementations, the DPU device further includes a state conversion module and a state latch module, wherein the state conversion module is connected to the state latch module, and the state latch module is connected to the switching module;

[0011] The state conversion module is used to send the state conversion information to the state latch module;

[0012] The state latch module is used to switch to the target state corresponding to the state transition information according to the received state transition information;

[0013] The switching module is used to determine the target sub-storage module according to the state of the state latch module when receiving the system reset signal of the DPU device.

[0014] In some embodiments, the state transition information includes unlocking information and target state information;

[0015] The state latch module is further configured to enter an unlock state in response to receiving the unlock information, and switch to the target state according to the target state information.

[0016] In some embodiments, the DPU device further includes an exception handling module, and the exception handling module is connected to the main processing module;

[0017] The exception handling module is used to send first operating system switching information corresponding to the exception report information to the state conversion module when receiving the exception report information sent by the main processing module, and the first operating system switching information is used to control the DPU device to enter the target operating system corresponding to the exception report information;

[0018] The state conversion module is further configured to send state conversion information corresponding to the first operating system switching information to the state latch module when receiving the first operating system switching information.

[0019] In some embodiments, the exception processing module is further configured to determine whether the DPU device meets a preset switching condition according to the exception report information when receiving the exception report information sent by the main processing module;

[0020] The exception handling module is further configured to send first operating system switching information corresponding to the exception report information to the state conversion module when the DPU device meets a preset switching condition.

[0021] In some embodiments, the DPU device further includes a user selection module, the user selection module is used to receive a user selection instruction, and send second operating system switching information to the state conversion module according to the selection instruction, the second operating system switching information is used to control the DPU device to enter a target operating system corresponding to the selection instruction;

[0022] The state conversion module is further configured to send state conversion information corresponding to the second operating system switching information to the state latch module when receiving the second operating system switching information.

[0023] In some embodiments, the sub-storage module includes a first storage module and a second storage module, the first storage module is used to store firmware code, and the second storage module is used to store operating system execution code;

[0024] The main processing module includes a processor and a memory, the processor is used to load and execute the firmware code in the first storage module of the target sub-storage module, load and execute the operating system execution code in the second storage module of the target sub-storage module when executing the firmware code, and when executing the operating system execution code to enable the DPU device to enter the target operating system, only data read and write operations are performed on the memory.

[0025] In some implementations, after the DPU device enters the target operating system, the main processing module is further configured to store the operation data in a free storage space of a second storage module of the target sub-storage module.

[0026] In a second aspect, an embodiment of the present application provides a method for switching an operating system of a DPU, which is applied to the DPU device as described in the first aspect, and the method includes:

[0027] When receiving the system reset signal of the DPU device, the switching module determines the target sub-storage module and connects the main processing module with the target sub-storage module;

[0028] The main processing module enables the DPU device to enter a target operating system according to the data in the target sub-storage module.

[0029] In a third aspect, an embodiment of the present application provides an electronic device, comprising the DPU device as described in the first aspect.

[0030] The present application provides a DPU device, a method for switching DPU operating systems, and an electronic device. The present application uses a switching module to determine a target sub-storage module when receiving a system reset signal of the DPU device, and connects a main processing module to the target sub-storage module, so that the DPU device can enter a target operating system among multiple pre-deployed operating systems according to usage requirements, thereby enabling the DPU device to meet different usage requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a structural diagram of the first implementation mode of the DPU device provided in the embodiment of the present application.

[0032] Figure 2 It is a structural diagram of the second implementation mode of the DPU device provided in the embodiment of the present application.

[0033] Figure 3 It is a structural diagram of the third implementation mode of the DPU device provided in the embodiment of the present application.

[0034] Figure 4 It is a structural diagram of the fourth implementation mode of the DPU device provided in the embodiment of the present application.

[0035] Figure 5 It is a flowchart of the method for switching operating systems of a DPU provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0037] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0038] The present application provides a DPU device, a method for switching DPU operating systems, and an electronic device. A switching module is used to determine a target sub-storage module when a system reset signal of the DPU device is received, and connect a main processing module to the target sub-storage module, so that the DPU device can enter a target operating system among multiple pre-deployed operating systems according to usage requirements, thereby enabling the DPU device to meet different usage requirements.

[0039] The DPU device provided in the present application will be described in detail below with reference to the accompanying drawings.

[0040] See also Figure 1 , Figure 1 Schematic diagram of the structure of the first implementation of the DPU device provided in the embodiment of the present application. Figure 1 As shown, the DPU device 1 includes a main processing module 10 , a switching module 20 and a storage module 30 .

[0041] In some implementations, the storage module 30 includes a plurality of sub-storage modules 310, and one sub-storage module 310 is used to store data related to one operating system. One sub-storage module 310 corresponds to one operating system.

[0042] Optionally, the operating system is a Windows system, a Linux system or other operating systems. In this way, multiple operating systems can be pre-deployed in the DPU device.

[0043] In some implementations, each sub-storage module corresponds to a different operating system. In this way, the DPU device can have multiple operating system switching options, thereby making it easier for the DPU device to meet different usage requirements.

[0044] In some embodiments, at least two sub-storage modules correspond to the same operating system. In this way, the DPU device can be deployed with at least one backup operating system, so that when an abnormality occurs in the current operating system, the DPU device can be quickly switched to the backup operating system, thereby allowing the DPU device to operate normally.

[0045] In some embodiments, the switching module 20 is used to determine the target sub-storage module and connect the main processing module 10 to the target sub-storage module when receiving a system reset signal (ie, a Reset signal) from the DPU device 1 .

[0046] Optionally, the switching module is electrically connected to a system reset pin of the DPU device. When the DPU device is restarted, the system reset pin (ie, the Reset pin) of the DPU device is energized, thereby generating a system reset signal, and the switching module receives the system reset signal.

[0047] Optionally, the target sub-storage module is one of the multiple sub-storage modules. The switching module connects the main processing module to only one sub-storage module at any time.

[0048] In some embodiments, the main processing module 10 is used to enable the DPU device 1 to enter the target operating system according to the data in the target sub-storage module.

[0049] In some embodiments, the sub-storage module 310 includes a first storage module 311 and a second storage module 312 , wherein the first storage module 311 is used to store firmware codes, and the second storage module 312 is used to store operating system execution codes.

[0050] Exemplarily, when the DPU device 1 is an ARM64 architecture, the first storage module 311 stores corresponding firmware codes, and the second storage module 312 stores operating system execution codes. For example, the firmware code is ATF (ARM Trusted Firmware) firmware code or UEFI (Unified Extensible Firmware Interface) firmware code, and the operating system execution code is Linux system execution code or Windows system execution code.

[0051] Optionally, the first storage module may be a hard disk or a flash memory (also known as Flash memory), the hard disk may be a SATA hard disk or an NVMe hard disk, etc., and the flash memory may be a NOR Flash or a NAND Flash, etc.

[0052] Optionally, the second storage module may be a hard disk or a flash memory, the hard disk may be a SATA hard disk or an NVMe hard disk, etc., and the flash memory may be a NOR Flash or a NAND Flash, etc.

[0053] In some implementations, the first storage module is connected to the second storage module. The first storage module and the second storage module of a sub-storage module are simultaneously connected to the switching module through a port.

[0054] In some embodiments, the main processing module includes a processor and a memory, and the processor is used to load and execute the firmware code in the first storage module of the target sub-storage module, and load and execute the operating system execution code in the second storage module of the target sub-storage module when executing the firmware code, so that the DPU device enters the target operating system.

[0055] Optionally, when the second storage module is a hard disk (e.g., a SATA hard disk), the processor searches for an EFI partition of the second storage module when executing the firmware code. The EFI partition is a partition for booting the operating system and is used to store boot files. The processor loads the operating system image file from the second storage module according to the Grub boot file in the EFI partition, and executes the operating system image file to enter the target operating system.

[0056] In some implementations, the processor is further configured to only perform data read and write operations on the memory when executing the operating system execution code to enable the DPU device to enter the target operating system.

[0057] In some embodiments, because flash memory can only withstand a limited number of write and erase operations, when the second storage module is a flash memory (such as NAND Flash), the target operating system is run in a Ramdisk manner. When the target operating system is run in a Ramdisk manner, the processor uses a storage area in the memory as a physical disk. In this way, the main processing module no longer writes data to the second storage module after the operating system is started, but only reads and writes data to the memory, thereby extending the service life of the second storage module.

[0058] In some embodiments, after the DPU device enters the target operating system, the main processing module is further used to store the operation data in the free storage space of the second storage module of the target sub-storage module. Since all the operation data are stored in the memory when the target operating system is run in a Ramdisk manner, the operation data cannot be continuously stored after the DPU device is powered off. In this way, when the target operating system is run in a Ramdisk manner, the operation data can be stored after the DPU device is powered off.

[0059] In some implementations, the processor is further configured to partition the free storage space of the second storage module so as to use the second storage module as a data disk of the operating system.

[0060] Optionally, the processor is further configured to partition the free storage space of the second storage module using file systems such as YAFFS (Yet Another Flash File System), YAFFS2, UBIFS (Unsorted Block Image File System), JFFS (Journaling Flash File System) and JFFS2.

[0061] See also Figure 2 , Figure 2 It is a structural diagram of the second implementation mode of the DPU device provided in the embodiment of the present application. Figure 2The arrows in the figure indicate the direction of information flow. Figure 2 As shown, in some embodiments, the DPU device 1 further includes a state conversion module 40 and a state latch module 50 , the state conversion module 40 is connected to the state latch module 50 , and the state latch module 50 is connected to the switching module 20 .

[0062] In some implementations, the state transition module is configured to send state transition information to the state latch module.

[0063] In some implementations, the state latch module is used to switch to a target state corresponding to the state transition information according to the received state transition information.

[0064] Optionally, the state latch module is a module with a latching function, such as a latch.

[0065] In some implementations, one state of the state latch module corresponds to one sub-storage module, and further corresponds to one operating system. The corresponding relationship between the state of the state latch module and the sub-storage module is preset.

[0066] In some implementations, the state transition information includes unlock information and target state information.

[0067] In some embodiments, the state latch module is further configured to enter an unlock state in response to receiving unlock information, and switch to a target state according to the target state information.

[0068] Optionally, the unlocking information is an unlocking sequence, and the unlocking sequence is preset.

[0069] Optionally, the unlocking information is encrypted according to a preset encryption transmission protocol, and the state latch module is further used to decrypt and verify the unlocking information according to the preset encryption transmission protocol. When the decrypted unlocking information passes the verification, the state latch module enters the unlocking state, and then switches to the target state according to the target state information. In this way, the security of the unlocking state latch module can be improved to prevent the DPU device from being hacked.

[0070] Optionally, the ways of unlocking the status latch module include password unlocking, zero-knowledge proof and certificate unlocking.

[0071] In some implementations, the switching module is configured to determine a target sub-storage module according to a state of the state latch module when receiving a system reset signal from the DPU device.

[0072] like Figure 2As shown, in some embodiments, the main processing module 10 is connected to the state latch module 50. The state latch module 50 is also used to send a switching completion message to the main processing module 10 after switching to the target state. The main processing module 10 is also used to automatically restart the DPU device 1 in response to receiving the switching completion message, so that the switching module 20 receives a system reset signal.

[0073] As described above, one state of the state latch module corresponds to one operating system. In some embodiments, the switching module is used to select a corresponding sub-storage module from multiple sub-storage modules as a target sub-storage module according to the target state of the state latch module and the correspondence between the state of the state latch module and the sub-storage module.

[0074] In some embodiments, the main processing module is connected to the storage module, and the switching module connects the main processing module to the target sub-storage module by controlling the connection circuit between the main processing module and the target sub-storage module in the storage module.

[0075] like Figure 2 As shown, in some embodiments, the state conversion module 40 is connected to the state latch module 50, the state latch module 50 is connected to the switching module 20, and the main processing module 10 is connected to the state latch module 50. When the switching module 20 is switched to a state connected to the target sub-storage module, the main processing module 10 is connected to the target sub-storage module through the state latch module 50 and the switching module 20.

[0076] In some implementations, the first storage module 311 is connected to the second storage module 312 .

[0077] Optionally, the first storage module 311 and the second storage module 312 of one sub-storage module 310 are simultaneously connected to the switching module 20 through one port.

[0078] In some embodiments, the main processing module is connected to the switching module, and when the switching module is switched to a state of being connected to the target sub-storage module, the main processing module is connected to the target sub-storage module through the switching module.

[0079] See also Figure 3 , Figure 3 It is a structural diagram of the third implementation mode of the DPU device provided in the embodiment of the present application. Figure 3 The arrows in the figure indicate the direction of information flow. Figure 3 As shown, in some embodiments, the DPU device further includes an exception processing module 60 , which is connected to the main processing module 10 .

[0080] In some embodiments, the main processing module 10 is further used to detect whether there is an abnormality in the DPU device 1 when running the operating system. When there is an abnormality in the DPU device 1, the main processing module 10 is further used to send an abnormality report information to the abnormality processing module 60.

[0081] Optionally, the abnormal situation includes damage to the sub-storage module, damage to the firmware image file, or damage to the operating system.

[0082] In some embodiments, the exception handling module 60 is used to send the first operating system switching information corresponding to the exception report information to the state conversion module 40 when receiving the exception report information sent by the main processing module 10. The first operating system switching information is used to control the DPU device to enter the target operating system corresponding to the exception report information. In this way, when an exception occurs during the startup or operation of the current operating system, the DPU device can be quickly switched to an alternative operating system, so that the DPU device can operate normally.

[0083] In some implementations, the exception handling module is further configured to determine whether the DPU device satisfies a preset switching condition based on the exception report information when receiving the exception report information sent by the main processing module.

[0084] Exemplarily, the preset switching condition includes: when the sub-storage module currently connected to the main processing module is damaged, the DPU device enters the alternative operating system. When the exception handling module determines that the sub-storage module currently connected to the main processing module is damaged according to the exception report information, it is determined that the DPU device meets the preset switching condition.

[0085] In some implementations, the exception handling module is further configured to send first operating system switching information corresponding to the exception report information to the state transition module when the DPU device meets a preset switching condition.

[0086] Exemplarily, when the exception handling module determines that the sub-storage module currently connected to the main processing module is damaged based on the exception report information, a sub-storage module corresponding to the current abnormal situation is selected from multiple sub-storage modules as the target sub-storage module according to preset switching conditions, and then the first operating system switching information corresponding to the exception report information is sent to the state transition module.

[0087] In some implementations, the state conversion module is further configured to send state conversion information corresponding to the first operating system switching information to the state latching module when receiving the first operating system switching information.

[0088] In some embodiments, after the state latch module switches to the target state according to the state conversion information corresponding to the first operating system switching information, the state latch module is further used to send a switching completion message to the main processing module. The main processing module is also used to automatically restart the DPU device in response to receiving the switching completion message, so that the switching module receives a system reset signal. In this way, the DPU device can quickly switch to the alternative operating system.

[0089] See also Figure 4 , Figure 4 It is a structural diagram of the fourth implementation mode of the DPU device provided in the embodiment of the present application. Figure 4 The arrows in the figure indicate the direction of information flow. Figure 4 As shown, in some embodiments, the DPU device 1 further includes a user selection module 70. The user selection module 70 is used to receive a selection instruction from a user, and send second operating system switching information to the state conversion module 40 according to the selection instruction.

[0090] Optionally, the second operating system switching information is used to control the DPU device to enter a target operating system corresponding to the selection instruction.

[0091] In some implementations, the state conversion module is further configured to send state conversion information corresponding to the second operating system switching information to the state latch module when receiving the second operating system switching information.

[0092] In some embodiments, after the state latch module switches to the target state according to the state conversion information corresponding to the second operating system switching information, the state latch module is further used to send a switching completion message to the main processing module. The main processing module is also used to automatically restart the DPU device in response to receiving the switching completion message, so that the switching module receives a system reset signal. In this way, the DPU device can be quickly switched to the target operating system.

[0093] In some embodiments, the DPU device includes both the exception handling module and the user selection module as described above.

[0094] In summary, the DPU device provided in the embodiment of the present application has the following advantages:

[0095] 1. The switching module is used to determine the target sub-storage module when receiving the system reset signal of the DPU device, and connect the main processing module with the target sub-storage module, so that the DPU device can enter a target operating system among multiple pre-deployed operating systems according to usage requirements, thereby enabling the DPU device to meet different usage requirements.

[0096] 2. By having different operating systems corresponding to each sub-storage module, the DPU device can have multiple operating system switching options, thereby making it easier for the DPU device to meet different usage requirements.

[0097] 3. By having at least two sub-storage modules corresponding to the same operating system, the DPU device can be deployed with at least one backup operating system. When an abnormality occurs in the current operating system, the DPU device can be quickly switched to the backup operating system, thereby enabling the DPU device to operate normally.

[0098] 4. The processor is also used to only read and write data to the memory when executing the operating system execution code to enable the DPU device to enter the target operating system. This enables the main processing module to no longer write data to the second storage module after the operating system is started, but only read and write data to the memory, thereby extending the service life of the second storage module.

[0099] 5. The main processing module is also used to store the operation data in the free storage space of the second storage module of the target sub-storage module, so that the operation data can be stored after the DPU device is powered off when the target operating system is run in a Ramdisk manner.

[0100] 6. The main processing module is also used to automatically restart the DPU device in response to receiving the switching completion information, so that the switching module receives the system reset signal, and the DPU device can quickly switch to the target operating system.

[0101] The present application also provides an electronic device, including a processor and a DPU device as described above. The electronic device may be a server, a server cluster, etc. The DPU device may be a DPU chip, or may be a smart network card. The DPU device is used to dispatch messages to the processor or the DPU device itself for processing, and the processor is used to process the messages dispatched by the DPU device.

[0102] The present application also provides a method for switching an operating system of a DPU, and the method for switching an operating system of a DPU is applied to the DPU device as described above.

[0103] See also Figure 5 , Figure 5 1 is a flow chart of a method for switching operating systems of a DPU provided in an embodiment of the present application. Figure 5 As shown, the method for switching the operating system of the DPU includes: step S100 to step S200.

[0104] Step S100: When receiving the system reset signal of the DPU device, the switching module determines the target sub-storage module and connects the main processing module to the target sub-storage module.

[0105] Step S200: The main processing module causes the DPU device to enter the target operating system according to the data in the target sub-storage module.

[0106] The contents of step S100 to step S200 refer to the above description about the DPU device.

[0107] In some implementations, the embodiments of the present application further provide a computer program product, including a computer program, which implements the above-mentioned method of switching operating systems of the DPU when executed by a processor.

[0108] In summary, the present application provides a DPU device, a method for switching operating systems of the DPU, and an electronic device. The DPU device includes a main processing module, a switching module, and a storage module. The storage module includes multiple sub-storage modules, and one sub-storage module is used to store data related to an operating system; the switching module is used to determine the target sub-storage module when receiving a system reset signal of the DPU device, and connect the main processing module with the target sub-storage module; the main processing module is used to make the DPU device enter the target operating system according to the data in the target sub-storage module. The present application uses a switching module to determine the target sub-storage module when receiving a system reset signal of the DPU device, and connect the main processing module with the target sub-storage module, so that the DPU device can enter a target operating system among multiple pre-deployed operating systems according to usage requirements, thereby enabling the DPU device to meet different usage requirements.

[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A DPU device, characterized in that: include: A main processing module, a switching module and a storage module, wherein the storage module includes a plurality of sub-storage modules, and one of the sub-storage modules is used to store data related to an operating system; The switching module is used to determine the target sub-storage module and connect the main processing module to the target sub-storage module when receiving the system reset signal of the DPU device; The main processing module is used to enable the DPU device to enter a target operating system according to the data in the target sub-storage module.

2. The DPU device according to claim 1, characterized in that: The DPU device further includes a state conversion module and a state latch module, wherein the state conversion module is connected to the state latch module, and the state latch module is connected to the switching module; The state conversion module is used to send the state conversion information to the state latch module; The state latch module is used to switch to the target state corresponding to the state transition information according to the received state transition information; The switching module is used to determine the target sub-storage module according to the state of the state latch module when receiving the system reset signal of the DPU device.

3. The DPU device according to claim 2, characterized in that: The state transition information includes unlocking information and target state information; The state latch module is further configured to enter an unlock state in response to receiving the unlock information, and switch to the target state according to the target state information.

4. The DPU device according to claim 2, characterized in that: The DPU device further includes an exception processing module, and the exception processing module is connected to the main processing module; The exception handling module is used to send first operating system switching information corresponding to the exception report information to the state conversion module when receiving the exception report information sent by the main processing module, and the first operating system switching information is used to control the DPU device to enter the target operating system corresponding to the exception report information; The state conversion module is further configured to send state conversion information corresponding to the first operating system switching information to the state latch module when receiving the first operating system switching information.

5. The DPU device according to claim 4, characterized in that: The exception processing module is also used to determine whether the DPU device meets the preset switching condition according to the exception report information when receiving the exception report information sent by the main processing module; The exception handling module is further configured to send first operating system switching information corresponding to the exception report information to the state conversion module when the DPU device meets a preset switching condition.

6. The DPU device according to claim 2, characterized in that: The DPU device further includes a user selection module, the user selection module is used to receive a user's selection instruction, and send second operating system switching information to the state conversion module according to the selection instruction, the second operating system switching information is used to control the DPU device to enter a target operating system corresponding to the selection instruction; The state conversion module is further configured to send state conversion information corresponding to the second operating system switching information to the state latch module when receiving the second operating system switching information.

7. The DPU device according to claim 1, characterized in that: The sub-storage module includes a first storage module and a second storage module, the first storage module is used to store firmware code, and the second storage module is used to store operating system execution code; The main processing module includes a processor and a memory, the processor is used to load and execute the firmware code in the first storage module of the target sub-storage module, load and execute the operating system execution code in the second storage module of the target sub-storage module when executing the firmware code, and when executing the operating system execution code to enable the DPU device to enter the target operating system, only data read and write operations are performed on the memory.

8. The DPU device according to claim 7, characterized in that: After the DPU device enters the target operating system, the main processing module is further used to store the operation data in the free storage space of the second storage module of the target sub-storage module.

9. A method for switching an operating system of a DPU, characterized in that: Applied to the DPU device according to claims 1 to 8, the method comprises: When receiving the system reset signal of the DPU device, the switching module determines the target sub-storage module and connects the main processing module with the target sub-storage module; The main processing module enables the DPU device to enter a target operating system according to the data in the target sub-storage module.

10. An electronic device, characterized in that: Comprising a DPU device as described in any one of claims 1 to 8.