Processing method and device for storage unit, electronic equipment and storage medium
By automatically identifying the type of storage unit and determining the data transmission protocol, the problem of R&D and testing difficulties and user operation convenience brought by UFS chip packaging technology is solved, and efficient sharing and performance maintenance of storage units are achieved.
Patent Information
- Application Number
- CN202510111873.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-06-13
AI Technical Summary
The packaging technology of existing UFS chips has increased the difficulty of R&D and testing, difficulty in importing asynchronous verification, high after-sales maintenance costs, and limited the plug-in, replacing and expansion operations of end users, reducing the convenience of use.
The type of storage unit inserted into the electronic device is automatically identified through the hardware detection method or the software detection method, the corresponding data transmission protocol is determined, and the transmission line is controlled to be turned on through the switching element, so that the storage unit and the electronic device can interact with the data.
The sharing of different types of storage units is realized, which simplifies user operations, reduces maintenance costs, and does not affect the performance of storage units.
Smart Images

Figure CN120144376A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer storage technologies, and in particular, to a processing method, apparatus, electronic device, and storage medium for storage units. Background Art
[0002] UFS (Universal Flash Storage) chips adopt BGA (Ball Grid Array) packaging technology and are directly soldered onto the motherboard. This method not only increases the difficulty in the R & D and testing stages, is not conducive to the introduction of asynchronous verification, but also raises the after-sales maintenance cost. At the same time, it restricts the plugging, replacement, and expansion operations of end users and reduces the usability.
[0003] In the existing method, the UFS is modularized into the M.2 form and shares the M.2 slot with the M.2 PCIe SSD (Solid State Drive). However, when connecting two UFS channels and two PCIe (peripheral component interconnect express) channels of the CPU (Central Processing Unit) to the same M.2 slot simultaneously, the performance of the SSD is halved. Summary of the Invention
[0004] The present disclosure provides a processing method, apparatus, electronic device, and storage medium for storage units to at least solve the above technical problems existing in the prior art.
[0005] According to a first aspect of the present disclosure, there is provided a processing method for storage units, the method comprising:
[0006] Determining the type of the storage unit inserted into the electronic device by a first detection method or a second detection method, wherein the first detection method is a hardware detection method and the second detection method is a software detection method;
[0007] Determining a data transmission protocol corresponding to the type of the storage unit;
[0008] Controlling, by a switching element, a transmission line corresponding to the data transmission protocol to be turned on, so that the storage unit performs data interaction with the electronic device through the transmission line.
[0009] In an implementable embodiment, determining the type of the storage unit inserted into the electronic device by the first detection method includes:
[0010] Determine the type of the storage unit based on the pin information of the storage unit inserted into the electronic device or the internal device identification register.
[0011] In an implementable manner, determining the type of the storage unit inserted into the electronic device through a second detection method includes:
[0012] Send a device identification command to the storage unit inserted into the electronic device;
[0013] Obtain the response information of the storage unit to the device identification command;
[0014] Determine the type of the storage unit according to the response information.
[0015] In an implementable manner, determining the data transfer protocol corresponding to the type of the storage unit includes: determining the data transfer protocol corresponding to the type of the storage unit based on a preset relationship comparison table.
[0016] In an implementable manner, determining the data transfer protocol corresponding to the type of the storage unit includes: determining the data transfer protocol corresponding to the type of the storage unit through a hardware logic module.
[0017] In an implementable manner, the types of the storage unit include solid state drives and universal flash storage; correspondingly,
[0018] Determining the data transfer protocol corresponding to the type of the storage unit includes:
[0019] If the type of the storage unit is a solid state drive, determine that the data transfer protocol is the Peripheral Component Interconnect Express (PCIE) protocol;
[0020] If the type of the storage unit is universal flash storage, determine that the data transfer protocol is the Universal Flash Storage protocol.
[0021] In an implementable manner, controlling the conduction of the transmission line corresponding to the data transfer protocol through a switching element includes:
[0022] Control the conduction of the transmission line corresponding to the data transfer protocol through a transistor or a multiplexer.
[0023] According to the second aspect of the present disclosure, there is provided a processing device for a storage unit, and the device includes:
[0024] A detection module, configured to determine the type of the storage unit inserted into the electronic device through a first detection method or a second detection method, where the first detection method is a hardware detection method and the second detection method is a software detection method;
[0025] A protocol determination module, configured to determine a data transmission protocol corresponding to the type of the storage unit;
[0026] A line conduction module, configured to control the conduction of a transmission line corresponding to the data transmission protocol through a switching element, so that the storage unit performs data interaction with the electronic device through the transmission line.
[0027] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0028] At least one processor; and
[0029] A memory communicatively connected to the at least one processor; wherein,
[0030] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method described in the present disclosure.
[0031] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to cause a computer to execute the method described in the present disclosure.
[0032] The processing method, device, electronic device and storage medium for a storage unit according to the present disclosure automatically identify the type of the storage unit inserted into the electronic device. Then, it determines the transmission protocol corresponding to the type and controls the conduction of the transmission line corresponding to the transmission protocol, so that the storage unit performs data interaction with the electronic device through the transmission line. The sharing of different types of storage units can be realized through one socket, and the performance of the storage unit will not be affected.
[0033] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] By referring to the accompanying drawings and reading the following detailed description, the above and other purposes, features and advantages of the exemplary embodiments of the present disclosure will become easily understood. In the drawings, several embodiments of the present disclosure are shown in an exemplary rather than restrictive manner, wherein:
[0035] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0036] Figure 1 Shows a schematic implementation flowchart of a processing method for a storage unit according to an embodiment of the present disclosure;
[0037] Figure 2Shows a schematic diagram of an application scenario of an embodiment of the present disclosure;
[0038] Figure 3 Shows a schematic diagram of the composition structure of a processing device for a storage unit according to an embodiment of the present disclosure;
[0039] Figure 4 Shows a schematic diagram of the composition structure of an electronic device according to an embodiment of the present disclosure. Detailed implementation manners
[0040] To make the objectives, features, and advantages of the present disclosure more obvious and understandable, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present disclosure.
[0041] According to the first aspect of the embodiments of the present disclosure, a processing method for a storage unit is provided, as Figure 1 shown, the method includes the following steps:
[0042] Step 101, determine the type of the storage unit inserted into the electronic device through the first detection method or the second detection method, where the first detection method is a hardware detection method and the second detection method is a software detection method.
[0043] The electronic device can be any device that can receive and process data and support the insertion of a storage unit. For example, a laptop computer, an in-vehicle intelligent system, etc. When a storage unit is inserted into the electronic device, its type is first determined through a hardware detection method or a software detection method. Specifically, the hardware detection method analyzes the physical characteristics or electrical characteristics of the storage unit through the hardware circuit of the electronic device to determine its type. The software detection method is to identify the type of the storage unit by running a pre-set software program. These software programs can analyze and determine the type of the storage unit by reading the metadata of the storage unit or sending specific commands to the storage unit to obtain its response. The types of storage units can include SSD, UFS, etc.
[0044] Step 102, determine the data transmission protocol corresponding to the type of the storage unit.
[0045] Each type of storage unit corresponds to a specific data transmission protocol to meet its data transmission requirements. For example, SSD usually uses the PCIe protocol for data transmission, and UFS uses the UFS protocol. Therefore, once the type of the storage unit is determined, the corresponding data transmission protocol is immediately determined.
[0046] Step 103, control the conduction of the transmission line corresponding to the data transmission protocol through a switching element, so that the storage unit performs data interaction with the electronic device through the transmission line.
[0047] Inside the electronic device, data is transmitted between the storage unit and other components of the electronic device through a specific transmission line. The transmission line is designed according to the data transmission protocol adopted. The switching element can be an electronic device with switching characteristics such as a transistor or a multiplexer. When the system detects the type of the storage unit and determines the corresponding data transmission protocol, a control signal is sent to the switching element. The control signal changes the state of the switching element, making it conduct or cut off the transmission line corresponding to the determined data transmission protocol.
[0048] The processing method for the storage unit in this embodiment automatically identifies the type of the storage unit inserted into the electronic device. Then, it determines the transmission protocol corresponding to this type and controls the conduction of the transmission line corresponding to this transmission protocol, enabling the storage unit to perform data interaction with the electronic device through this transmission line. Different types of storage units can be shared through one socket without affecting the performance of the storage unit.
[0049] In an embodiment of the present disclosure, the type of the storage unit inserted into the electronic device is determined through a first detection method, which can be specifically implemented by the following technical means: based on the pin information of the storage unit inserted into the electronic device or the internal device identification register, determine the type of the storage unit.
[0050] The storage unit usually has a specific pin layout or identification. For example, there are differences in the arrangement and quantity of power pins and data pins. Based on these differences, a detection circuit is designed to detect the connection of the pins of the storage unit, thereby determining its type. For example, an SSD usually has more pins for high-speed data transmission, such as pins related to the PCIE interface. By detecting whether these specific pins are connected, the type of the storage unit can be determined.
[0051] In addition to the pin identification method, the type of the storage unit can also be determined by using the device identification register inside the storage unit. The storage unit usually has a device identification register inside, which is used to store information such as the manufacturer name, device model, and storage capacity. The motherboard of the electronic device can communicate with the storage unit through a specific bus (such as the SPI bus or I2C bus, etc.) and read the information in the device identification register. According to this information, the type of the storage unit can be determined. For example, if the information in the device identification register represents the specific model code of a certain SSD manufacturer, it can be determined that the storage unit is of the SSD type. If the information in the device identification register conforms to the coding rule of the UFS device, it is determined that the storage unit is of the UFS type.
[0052] In this embodiment, by identifying the pin layout and connection of the storage unit, as well as reading the device identification register information inside the storage unit, the type of the storage unit is accurately and efficiently determined.
[0053] In one embodiment of the present disclosure, the type of the storage unit inserted into the electronic device is determined by a second detection method, including: sending a device identification command to the storage unit inserted into the electronic device; obtaining the response information of the storage unit to the device identification command; and determining the type of the storage unit according to the response information.
[0054] Specifically, a dedicated storage unit detection program can be embedded in the BIOS. The detection program sends a device identification command to the storage unit and determines its type according to the response of the storage unit. For example, the BIOS sends a general device identification command, and different types of storage units such as SSDs and UFSs will return different response information according to their respective communication protocols. The BIOS determines the type of the storage unit by analyzing this response information.
[0055] In another embodiment, after the operating system is started, the operating system's device driver can interact with the storage unit and obtain detailed information about the storage unit. Taking the Linux system as an example, the storage driver module in the kernel can query relevant attributes of the storage unit, such as obtaining type information by accessing a specific file system or device interface of the storage unit. If the operating system finds specific identifiers or attributes related to an SSD in the file system, it determines that the storage unit is of the SSD type. Similarly, if identifiers related to UFS are found, it can be determined that the storage unit is of the UFS type.
[0056] In one embodiment of the present disclosure, a data transfer protocol corresponding to the type of the storage unit can be determined based on a preset relationship look-up table.
[0057] Specifically, in the control chip (such as the south bridge chip or a dedicated storage controller chip) of the electronic device motherboard, a preset relationship look-up table is established in advance. The preset relationship look-up table is a data structure used to associate storage unit types with their corresponding data transfer protocols. After the type of the storage unit is detected, the appropriate data transfer protocol can be quickly determined by looking up the preset relationship look-up table.
[0058] For example, a preset relationship look-up table is established, which records the following information: "SSD - PCIe, HDD - SATA, UFS - UFS". When the system detects that the storage unit is an SSD, the corresponding PCIe protocol is found through this table.
[0059] In the BIOS or the driver of the operating system, establish a query function for looking up a preset relationship comparison table. When the system detects the type of the storage unit, call this query function to look up the corresponding protocol.
[0060] For example, in the storage initialization code of the BIOS, when the system detects that the storage unit is an SSD, it will call a function to query the preset relationship comparison table. This function will return the PCIe protocol corresponding to the SSD.
[0061] The method of this embodiment is simple and efficient. By using a lookup table instead of a cumbersome algorithm, the running speed of the program is improved, and the complexity of the code is simplified.
[0062] In an embodiment of the present disclosure, a data transmission protocol corresponding to the type of the storage unit can be determined by a hardware logic module. The hardware logic module can be a logic circuit composed of logic gates or a programmable logic device, which will be described separately below:
[0063] The hardware logic circuit is composed of logic gates (such as AND gates, OR gates, NOT gates, etc.). It can output a corresponding data transmission protocol signal through logical operations according to the input signal of the storage unit type.
[0064] For example, assume a hardware logic circuit with two inputs. One represents the type of the storage unit (high level represents SSD, low level represents UFS), and the other is an enable signal (used to control the opening and closing of the circuit). When the input of the storage unit type is high level, after a series of logical operations by the logic gates, the circuit outputs a signal representing the PCIe protocol. When the input of the storage unit type is low level, the circuit will output a signal representing the UFS protocol.
[0065] A programmable logic device (such as an FPGA) is a chip whose logic function can be changed. By writing code, the programmable logic device can determine the data transmission protocol according to the type of the storage unit.
[0066] For example, in an FPGA (Field Programmable Gate Array), write a program to implement the function of a lookup table or logical judgment. When the signal of the storage unit type is input to the FPGA, the FPGA will perform logical operations according to the internally written program and output the corresponding protocol signal. For example, if the input signal represents that the storage unit is an SSD, the FPGA will output a signal representing the PCIe protocol; if the input signal represents that the storage unit is a UFS, the FPGA will output a signal representing the UFS protocol. This embodiment uses hardware logic execution, which has a higher processing speed and parallel processing ability.
[0067] In one embodiment of the present disclosure, the transmission line corresponding to the data transmission protocol is controlled to be turned on by a switching element, so that the storage unit can perform data interaction with the electronic device through the transmission line. Specifically, it can be achieved by software, such as the driver of the BIOS or the operating system, sending a control instruction to control the state of the corresponding transistor or the selection of the multiplexer:
[0068] If the switching element is a transistor (such as a MOSFET transistor), the on - off state between the source and the drain can be changed by controlling its gate voltage, thereby controlling the on - off of a specific data transmission line.
[0069] For example, when the storage unit is an SSD and it is recognized and the PCIe protocol is determined to be used, a high - level voltage is applied to the gate of the MOSFET transistor connected to the PCIe line. This changes the transistor from the cut - off state to the on - state, thus allowing data to be transmitted between the SSD and other components through the PCIe line.
[0070] If the switching element is a multiplexer, the multiplexer can select one of multiple input signals for output. It has multiple input ports inside, each port is connected to a line corresponding to a different protocol, and the output port is connected to other components. By selecting an appropriate input port, the multiplexer can transmit data from the selected storage unit to other components.
[0071] Assume that when an SSD is recognized, the multiplexer conducts the input port connected to the PCIe line inside with the output port. In this way, the SSD can transmit data to other components through the PCIe line.
[0072] Figure 2 Fig. shows a schematic diagram of an application scenario of an embodiment of the present disclosure, such as Figure 2 shown. First, determine the type of the inserted storage unit. If it is UFS, the transmission line corresponding to the UFS protocol is turned on through the switching element, thereby realizing interaction with the CPU. If it is an SSD, the transmission line corresponding to the PCIE protocol is turned on, thereby realizing interaction with the CPU.
[0073] According to the second aspect of the embodiments of the present disclosure, there is provided a processing device for a storage unit, as Figure 3 shown. The device includes:
[0074] A detection module 301, configured to determine the type of the storage unit inserted into the electronic device by a first detection method or a second detection method, where the first detection method is a hardware detection method and the second detection method is a software detection method;
[0075] A protocol determination module 302, configured to determine the data transmission protocol corresponding to the type of the storage unit;
[0076] The line conduction module 303 is configured to control the conduction of the transmission line corresponding to the data transmission protocol through a switching element, so that the storage unit performs data interaction with the electronic device through the transmission line.
[0077] In an embodiment of the present disclosure, the detection module 301 is further configured to determine the type of the storage unit based on the pin information of the storage unit inserted into the electronic device or the device identification register inside.
[0078] In an embodiment of the present disclosure, the detection module 301 is further configured to send a device identification command to the storage unit inserted into the electronic device; obtain the response information of the storage unit to the device identification command; and determine the type of the storage unit according to the response information.
[0079] In an embodiment of the present disclosure, the protocol determination module 302 is further configured to determine the data transmission protocol corresponding to the type of the storage unit based on a preset relationship comparison table.
[0080] In an embodiment of the present disclosure, the protocol determination module 302 is further configured to determine the data transmission protocol corresponding to the type of the storage unit through a hardware logic module.
[0081] In an embodiment of the present disclosure, the protocol determination module 302 is further configured to, if the type of the storage unit is a solid state drive, determine that the data transmission protocol is the PCIe protocol; if the type of the storage unit is a universal flash storage, determine that the data transmission protocol is the universal flash storage protocol based on a preset relationship comparison table.
[0082] In an embodiment of the present disclosure, the line conduction module 303 is further configured to control the conduction of the transmission line corresponding to the data transmission protocol through a transistor or a multiplexer.
[0083] According to the embodiments of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
[0084] Figure 4 A schematic block diagram of an exemplary electronic device 800 that can be used to implement the embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0085] As shown Figure 4 in FIG. 800, the device 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0086] A plurality of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0087] The computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 executes the various methods and processes described above, such as the processing method for the storage unit. For example, in some embodiments, the processing method for the storage unit can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the processing method for the storage unit described above can be executed. Alternatively, in other embodiments, the computing unit 801 can be configured to execute the processing method for the storage unit in any other appropriate manner (e.g., by means of firmware).
[0088] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0089] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0090] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0091] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0092] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0093] A computer system can include a client and a server. The client and the server are generally far apart from each other and typically interact through a communication network. The client - server relationship is created by computer programs running on the respective computers and having a client - server relationship with each other. The server can be a cloud server, or a server of a distributed system, or a server incorporating a blockchain.
[0094] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitation is imposed herein.
[0095] In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of this disclosure, "a plurality" means two or more unless otherwise specifically defined.
[0096] As described above, it is only the specific implementation manner of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present disclosure can easily think of changes or substitutions, which should all be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claimed rights.
Claims
1. A processing method for a storage unit, characterized in that: The method comprises: Determining the type of the storage unit inserted into the electronic device by a first detection method or a second detection method, wherein the first detection method is a hardware detection method and the second detection method is a software detection method; Determining a data transmission protocol corresponding to the type of the storage unit; The transmission line corresponding to the data transmission protocol is controlled to be turned on through a switch element, so that the storage unit can exchange data with the electronic device through the transmission line.
2. The method according to claim 1, characterized in that: Determining the type of a storage unit inserted into an electronic device by a first detection method includes: The type of the storage unit inserted into the electronic device is determined based on pin information or an internal device identification register of the storage unit.
3. The method according to claim 1, characterized in that Determining the type of a storage unit inserted into the electronic device by a second detection method includes: Sending a device identification command to a storage unit inserted into the electronic device; Acquire response information of the storage unit to the device identification command; The type of the storage unit is determined according to the response information.
4. The method according to claim 1, characterized in that: The determining of a data transmission protocol corresponding to the type of the storage unit includes: Based on the preset relationship comparison table, a data transmission protocol corresponding to the type of the storage unit is determined.
5. The method according to claim 1, characterized in that The determining of a data transmission protocol corresponding to the type of the storage unit includes: A data transmission protocol corresponding to the type of the storage unit is determined through a hardware logic module.
6. The method according to claim 1, characterized in that The types of the storage units include solid state drives and general flash memory storage; accordingly, Determining a data transmission protocol corresponding to the type of the storage unit includes: If the type of the storage unit is a solid state drive, determining that the data transmission protocol is a high-speed serial computer expansion bus standard PCIe protocol; If the type of the storage unit is universal flash memory storage, the data transmission protocol is determined to be a universal flash memory storage protocol.
7. The method according to claim 1, characterized in that The controlling the transmission line corresponding to the data transmission protocol to be turned on by a switch element includes: The transmission line corresponding to the data transmission protocol is controlled to be turned on through a transistor or a multiplexer.
8. A processing device for a storage unit, characterized in that: The device comprises: A detection module, used to determine the type of the storage unit inserted into the electronic device by a first detection method or a second detection method, wherein the first detection method is a hardware detection method and the second detection method is a software detection method; A protocol determination module, used to determine a data transmission protocol corresponding to the type of the storage unit; The line conduction module is used to control the conduction of the transmission line corresponding to the data transmission protocol through a switch element, so that the storage unit can exchange data with the electronic device through the transmission line.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-7.
Citation Information
Cited By
Using method and device of storage unit and storage medium
CN115639957A