Data processing method and device, electronic equipment and storage medium

By introducing vendor identifiers in Fastboot mode, the types of storage media and partitioning methods for data processing are expanded, solving the problem that existing technologies can only handle specific storage media and improving the flexibility of user operations.

CN121680936APending Publication Date: 2026-03-17PHYTIUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing Fastboot mode can only perform data writing, reading, and erasing on specific types of storage media, and cannot be extended to other types, resulting in low user flexibility.

Method used

By introducing vendor identifiers into processing commands, the command type is determined and the storage medium type and storage space are parsed, expanding the data processing capabilities in Fastboot mode and supporting more storage medium types and partitioning formats.

Benefits of technology

It enables data processing on a wider range of storage media in Fastboot mode, improving user operational flexibility and choice.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121680936A_ABST
    Figure CN121680936A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and apparatus, an electronic device and a storage medium. The method comprises the steps of determining an instruction type corresponding to a processing instruction based on whether the processing instruction comprises a manufacturer identifier; in response to a manufacturer identifier included in the processing instruction, determining an instruction type of the processing instruction as a first type, analyzing the processing instruction, and determining a data processing type, a storage medium type identifier, a storage space identifier and an identifier of to-be-processed data corresponding to the processing instruction; processing the to-be-processed data in a target storage area corresponding to a storage medium type identifier and a storage space identifier based on the data processing type; therefore, the storage medium capable of being processed in the Fastboot mode and the type of the storage medium can be expanded, so that more storage media can process the data based on the instruction of the upper computer in the Fastboot mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Fastboot is a firmware communication protocol used for flashing embedded devices. It allows users to perform lower-level operations on the device (lower-level device) via a computer (host computer), such as flashing a new system image and unlocking the bootloader. The device needs to be connected to the computer and entered Fastboot mode before flashing can be performed.

[0003] In Fastboot mode, you can operate the device by entering the fastboot command at the command prompt. For example, the command "fastboot devices" will display a list of devices connected to the computer, and the command "fastboot flash" will flash a specified file to a specified partition of the device's storage medium. However, currently, data writing, reading, and erasing are only possible on specific types of storage media, and the expansion of storage media is limited. Summary of the Invention

[0004] This disclosure provides a data processing method, apparatus, electronic device, and storage medium to at least solve the above-mentioned technical problems existing in the prior art.

[0005] According to a first aspect of this disclosure, a data processing method is provided, comprising: The instruction type corresponding to the processing instruction is determined based on whether the processing instruction includes a vendor identifier; In response to the inclusion of a manufacturer identifier in the processing instruction, the instruction type of the processing instruction is determined to be the first type. The processing instruction is then parsed to determine the data processing type, storage medium type identifier, storage space identifier, and the identifier of the data to be processed corresponding to the processing instruction. Based on the data processing type, the data to be processed is processed in the target storage area corresponding to the storage medium type identifier and the storage space identifier; The storage medium type identifier includes at least one of the following: Multi Media Card (MMC) identifier, NAND FLASH Memory (NAND FLASH) identifier, Serial Advanced Technology Attachment (SATA) identifier, Non-Volatile Memory Express (NVME) interface specification identifier, and NOR FLASH Memory (NOR FLASH) identifier.

[0006] The method in the above scheme further includes: If the processing instruction does not include a manufacturer identifier, the instruction type of the processing instruction is determined to be the second type. The processing instruction is then parsed to determine the data processing type, the storage space identifier, and the identifier of the data to be processed corresponding to the processing instruction. Based on the data processing type, the data to be processed is processed in the target storage area corresponding to the storage space identifier.

[0007] In the above scheme, parsing the processing instruction to determine the data processing type, vendor identifier, storage medium type identifier, storage space identifier, and the identifier of the data to be processed corresponding to the processing instruction includes: The first command parameter, the second command parameter, and the third command parameter in the processing instruction are determined based on the first preset symbol; The data processing type is determined based on the first command parameter; The storage medium type identifier and storage space identifier are determined based on the second command parameter; The identifier of the data to be processed is determined based on the third command parameter; The storage space identifier includes a storage partition identifier or a storage address identifier.

[0008] In the above scheme, determining the storage medium type identifier and storage space identifier based on the second command parameter includes: The storage medium type identifier and storage space identifier in the second command parameters are determined based on the second preset symbol; If the storage space identifier does not include a third preset symbol, then the target storage area is determined to be a storage medium partition, and the storage space identifier is a storage medium partition identifier. Alternatively, in response to the inclusion of a third preset symbol in the storage space identifier, the target storage area is determined to be a storage address range, and the storage space identifier is a storage address range.

[0009] In the above scheme, processing the data to be processed in the target storage area corresponding to the storage medium type identifier and the storage space identifier based on the data processing type includes: In response to determining that the target storage area is a storage medium partition based on the storage space identifier, the storage medium driver corresponding to the storage medium type identifier is invoked based on the driver invocation interface, and the partition information of the storage medium corresponding to the storage medium type identifier is determined based on the storage medium driver. The target storage area is determined based on the partition information and storage space identifier of the storage medium; The data to be processed is processed in the target storage area based on the data processing type.

[0010] In the above scheme, processing the data to be processed in the target storage area corresponding to the storage medium type identifier and the storage space identifier based on the data processing type includes: In response to determining the target storage region as a storage address range based on the storage space identifier, the address range corresponding to the storage medium is determined based on the storage medium type identifier; Determine whether the storage address range corresponding to the storage space identifier is within the address range corresponding to the storage medium; In response to determining that the storage address range corresponding to the storage space identifier is within the address range corresponding to the storage medium, the data to be processed is processed in the target storage area based on the data processing type.

[0011] In the above scheme, if the data processing type is write processing, the step of processing the data to be processed in the target storage area based on the data processing type includes: A file retrieval request is sent to the host computer via a Universal Serial Bus (USB), and the file to be processed is retrieved based on the first storage space corresponding to the host computer.

[0012] In the above scheme, if the data processing type is read processing, the step of processing the data to be processed in the target storage area based on the data processing type includes: The data to be processed is obtained based on the target storage area and sent to the host computer via a universal serial bus. The data to be processed includes parameter information of the target storage area.

[0013] According to a second aspect of this disclosure, a data processing apparatus is provided, comprising: The receiving unit is used to receive and process instructions based on the universal serial bus. The instruction type determination unit is used to determine the instruction type corresponding to the processing instruction based on whether the processing instruction includes a vendor identifier. The parsing unit is configured to, in response to the fact that the processing instruction includes a manufacturer identifier, determine that the instruction type of the processing instruction is a first type, parse the processing instruction, and determine the data processing type, storage medium type identifier, storage space identifier, and identifier of the data to be processed corresponding to the processing instruction; The processing unit is configured to process the data to be processed in the target storage area corresponding to the storage medium type identifier and the storage space identifier based on the data processing type; The storage medium type identifier includes a multimedia card identifier, a non-flash memory identifier, a Serial Advanced Technology Attached Feature identifier, a non-volatile memory host controller interface specification identifier, and a non-flash memory identifier.

[0014] According to a third aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods of this disclosure.

[0015] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this disclosure.

[0016] The data processing method disclosed herein determines the instruction type corresponding to the processing instruction based on whether the processing instruction includes a manufacturer identifier. In response to the inclusion of a vendor identifier in the processing instruction, the instruction type of the processing instruction is determined to be a first type. The processing instruction is parsed to determine the data processing type, storage medium type identifier, storage space identifier, and the identifier of the data to be processed corresponding to the processing instruction. Based on the data processing type, the data to be processed is processed in the target storage area corresponding to the storage medium type identifier and the storage space identifier. The storage medium type identifier includes at least one of the following: multimedia card identifier, NAND flash memory identifier, Serial Advanced Technology Attached (SATA) identifier, Non-volatile Memory Host Controller Interface Specification (NVI) identifier, and NOR flash memory identifier. Thus, by extending the processing instruction to include a vendor identifier, if the vendor identifier is detected, the storage medium type and storage space in the processing instruction are further determined, thereby determining the target storage area. The data to be processed is then processed in the target storage area according to the method indicated by the data processing type. This expands the range of storage media and storage medium types that can be processed in Fastboot mode, enabling more storage media to process data based on instructions from the host computer in Fastboot mode.

[0017] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0018] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.

[0019] Figure 1 This diagram illustrates the process of flashing and writing storage media via Fastboot in related technologies. Figure 2 A schematic diagram of a first optional flow of the data processing method provided in this embodiment of the present disclosure is shown; Figure 3 A schematic diagram of a second optional flow of the data processing method provided in an embodiment of this disclosure is shown; Figure 4 A schematic diagram of a third optional flow of the data processing method provided in this embodiment of the present disclosure is shown; Figure 5 A schematic diagram of a fourth optional flow of the data processing method provided in this disclosure embodiment is shown; Figure 6 A schematic diagram of a fifth optional process for the data processing method provided in an embodiment of this disclosure is shown; Figure 7 A schematic diagram of a first optional architecture for the data processing method provided in this disclosure embodiment is shown; Figure 8 A schematic diagram of a second optional architecture for the data processing method provided in an embodiment of this disclosure is shown; Figure 9 A schematic diagram of a third optional architecture for the data processing method provided in this disclosure is shown. Figure 10 A schematic diagram of an optional structure of the data processing apparatus provided in an embodiment of this disclosure is shown; Figure 11 A schematic diagram of the composition structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0020] To make the objectives, features, and advantages of this disclosure more apparent and understandable, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0021] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0022] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this disclosure described herein can be implemented in an order other than that illustrated or described herein.

[0023] Unless otherwise defined, all technical and scientific terms used in this disclosure have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used in this disclosure is for the purpose of describing embodiments of this disclosure only and is not intended to be limiting of this disclosure.

[0024] It should be understood that in the various embodiments of this disclosure, the sequence number of each implementation process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this disclosure.

[0025] It should be noted that in the embodiments of this disclosure, the letters in the parameters of the command, such as "flash" or "fastboot flash" in the write command, are usually lowercase; when used as the name of the storage medium, they are usually uppercase, such as "NORFLASH" or "NAND FLASH"; when used as the mode, the first letter is capitalized, such as Fastboot mode.

[0026] Fastboot is a flashing protocol for embedded devices, allowing users to perform lower-level operations on the device via a computer, such as flashing new system images and unlocking the bootloader. To use Fastboot, the device (lower-level device) needs to be connected to the computer (upper-level device) and enter Fastboot mode. The "fast" in Fastboot mode does not represent speed, but rather simplicity, convenience, and ease of implementation. The method for entering Fastboot mode varies depending on the device, but typically involves pressing and holding the power button and volume down button (or other designated key combinations) simultaneously while the device is powered off. When you see the word "Fastboot" displayed on the screen, the device has successfully entered Fastboot mode.

[0027] In Fastboot mode, you can operate the device by entering fastboot commands at the command prompt. For example, the command "fastboot devices" can be used to view a list of connected devices, and the command "fastboot flash" can be used to flash a specified file to a specified partition of the device's storage media.

[0028] Figure 1 This diagram illustrates the process of flashing and writing storage media via Fastboot in related technologies.

[0029] like Figure 1 As shown, the host computer uses Fastboot mode to flash the storage medium in the slave computer.

[0030] The host computer can be a Windows or Linux host, requiring support for a USB host interface and the installation of a Fastboot client and Android driver. The lower-level device can be operated by entering the corresponding commands in the Fastboot client. The lower-level device can be an embedded device, such as a mobile phone, embedded terminal, or embedded development board, requiring support for a USB device interface and MMC storage media (MMC can be eMMC or an SD card). The lower-level software is uboot, which loads the USB device driver and enters Fastboot mode to wait for requests from the host computer.

[0031] During the flashing process, the user enters the command "flash systemsystem.img" in the Fastboot client command line on the host computer. This command contains three parameters: "flash" is parameter 1, representing the operation type (or data processing type) as flash; "system" is parameter 2, representing the partition name of the storage medium; and "system.img" is parameter 3, representing the filename of the data to be written. The host computer sends the command to the slave computer via the USB bus. After receiving the command through the USB driver, the slave computer calls the Fastboot driver to parse the command and obtain parameter 2, which is the name of the partition to be operated on. The slave computer then calls the MMC and NAND drivers to obtain the partition information of the MMC and NAND FLASH storage media. Finally, the slave computer calls the MMC and NAND drivers to write the file data to the corresponding partitions of the MMC and NAND FLASH storage media.

[0032] Currently, Fastboot only supports flashing multimedia storage cards (MMC and NAND FLASH) and only supports flashing through storage media partitions. This means that for other types of storage media besides MMC and NAND FLASH, or for unpartitioned MMC and NAND FLASH, data cannot be written, read, or erased using Fastboot. In existing Fastboot solutions, when the host computer flashes an image of the device, it does so by partitioning the storage media of the slave device. This solution requires two prerequisites: first, the slave device's storage media must be partitioned; second, the partition information of the slave device's storage media must be obtained. If the slave device's storage media is not partitioned or partition information cannot be obtained—that is, if the prerequisites are not met—the image flashing operation cannot be performed. Therefore, the current solution for flashing the slave device using Fastboot has limited image flashing methods and application scenarios, offering limited user flexibility.

[0033] In view of the deficiencies existing in the related technologies, this disclosure provides a data processing method to at least solve some or all of the above-mentioned technical problems.

[0034] Figure 2 A schematic diagram of a first alternative flow of the data processing method provided in this disclosure embodiment is shown, and the steps will be described accordingly.

[0035] Step S201: Determine the instruction type corresponding to the processing instruction based on whether the processing instruction includes a manufacturer identifier.

[0036] In some embodiments, the lower-level machine receives a processing instruction sent by the upper-level machine and determines whether the processing instruction includes a manufacturer identifier. If the processing instruction includes a manufacturer identifier, the instruction type corresponding to the processing instruction is determined to be a first type, and the lower-level machine needs to subsequently parse the storage medium type and storage space in the processing instruction to determine the target storage area. Alternatively, if the processing instruction does not include a manufacturer identifier, the instruction type corresponding to the processing instruction is determined to be a second type, and the lower-level machine needs to subsequently parse the partition of the storage medium in the processing instruction to determine that partition as the target storage area.

[0037] Specifically, if the processing instruction is of type one, it may correspond to more storage media types, and the corresponding storage space may be at least one partition of the storage media, or a segment of address space within the storage media. For example, if the processing instruction is of type one, its corresponding storage media may be at least one of the following: Multimedia Card (MMC), NAND Flash, Serial Advanced Technology Attachment (SATA), Non-Volatile Memory Host Controller (NVME) interface specification identifier, and NOR Flash; correspondingly, the storage space may be at least one partition of the aforementioned storage media after partitioning, or it may be a segment of address space corresponding to the aforementioned storage media without partitioning. If the processing instruction is of type two, its corresponding storage media may include MMC or NAND Flash, and the corresponding storage space may be at least one partition of the MMC or NAND Flash after partitioning.

[0038] The manufacturer identifier can be a predefined string that includes at least one of letters, numbers, and special characters.

[0039] Step S202: In response to the fact that the processing instruction includes a manufacturer identifier, the instruction type of the processing instruction is determined to be the first type. The processing instruction is parsed to determine the data processing type, storage medium type identifier, storage space identifier, and identifier of the data to be processed corresponding to the processing instruction.

[0040] In some embodiments, if the processing instruction includes a manufacturer identifier, the processing instruction is determined to be of the first type. The lower-level machine parses the processing instruction and determines the data processing type, storage medium type identifier, storage space identifier, and identifier of the data to be processed from the processing instruction.

[0041] In some embodiments, the processing instruction includes a first command parameter, a second command parameter, and a third command parameter; the first command parameter includes a data processing type; the second command parameter includes a vendor identifier, a storage medium type identifier, and a storage space identifier; and the third command parameter includes an identifier of the data to be processed.

[0042] In some embodiments, the data processing type may include one of read, write, and erase; different storage medium type identifiers correspond to different storage medium types, which may include MMC, NAND FLASH, SATA, NVME interface specification identifiers, and NOR FLASH; the storage space identifier may include the partition identifier of the storage medium, or any address range of the storage medium; the identifier of the data to be processed may include the identifier of the data to be processed, and optionally, the identifier of the data to be processed may include at least one of the storage location identifier and the name identifier of the data to be processed. Specifically, the storage location identifier of the data to be processed may include: if the data processing type is write or erase, the storage location identifier of the data to be processed is the location where the data to be processed is stored; if the data processing type is to obtain storage space information, the storage location identifier of the data to be processed includes at least one of the partition identifier, address identifier, and address range of the storage space information to be obtained.

[0043] In some embodiments, different strings can be used to represent different storage medium type identifiers, storage space identifiers, identifiers of data to be processed, and data processing type identifiers, so that the lower-level machine can determine the corresponding storage medium type, storage space, data to be processed, and data processing type based on the strings.

[0044] For example, the processing command could be "flash oem_sata_system system.img". Here, "flash" is the first command parameter, representing the data processing type; flash corresponds to flashing / writing. Optionally, if the first command parameter is erase, the data processing type is erase; if the first command parameter is getvae, the data processing type is retrieve storage space information. "oem_sata_system" is the second command parameter, where oem is the manufacturer identifier (a fixed string), sata is the storage media type identifier (here, sata stands for Serial Advanced Technology Accessory); system is the partition name of the sata storage media; and "system.img" is the third command parameter, representing the filename of the data to be written.

[0045] Step S203: Process the data to be processed in the target storage area corresponding to the storage medium type identifier and the storage space identifier based on the data processing type.

[0046] In some embodiments, the lower-level machine processes the data to be processed in the target storage area based on the processing method corresponding to the data processing type.

[0047] In specific implementation, if the data processing type is writing, i.e. flash command, the lower-level machine obtains the data to be processed from the upper-level machine based on the identifier of the data to be processed, and writes the data to be processed into the target storage area of ​​the lower-level machine; optionally, after the writing is completed, the lower-level machine can return the writing result to the upper-level machine.

[0048] Alternatively, in specific implementation, if the data processing type is reading (i.e., the `getvar` command), the lower-level machine determines the data to be read based on the identifier of the data to be processed, retrieves the data to be read from the target storage area, and transmits the data to be read to the upper-level machine. The data to be read may include information about the target storage area, or data stored in the target storage area.

[0049] Alternatively, in a specific implementation, if the data processing type is erasure, i.e., the erase command, the lower-level machine determines the data to be erased based on the identifier of the data to be processed, and erases the data to be erased in the target storage area; optionally, the lower-level machine can return the execution result to the upper-level machine after the erasure is completed.

[0050] Thus, the data processing method provided by this disclosure extends the processing instructions by means of the manufacturer's identifier, so that it can take into account the existing fastboot commands and extend to more storage media types and storage media partitioning forms, so that more storage media can process data based on the instructions of the host computer in Fastboot mode.

[0051] Figure 3 A second alternative flowchart of the data processing method provided in this disclosure embodiment is shown, and will be described according to each step.

[0052] Step S301: Determine the instruction type corresponding to the processing instruction based on whether the processing instruction includes a manufacturer identifier.

[0053] The specific steps of step S301 are the same as those of step S201, and will not be repeated here.

[0054] Step S302: In response to the fact that the processing instruction does not include a manufacturer identifier, the instruction type of the processing instruction is determined to be the second type. The processing instruction is parsed to determine the data processing type, the storage space identifier, and the identifier of the data to be processed corresponding to the processing instruction.

[0055] In some embodiments, if the processing instruction does not include a manufacturer identifier, the processing instruction includes a data processing type, a storage space identifier, and an identifier of the data to be processed; wherein, the storage space identifier includes a partition identifier of the storage medium; that is, the lower-level machine parses the processing instruction to determine the location and specific information of the data to be processed, the method of processing the data to be processed, and the partition of the storage medium.

[0056] In some embodiments, different strings can be used to represent different storage space identifiers, identifiers of data to be processed, and data processing type identifiers, so that the lower-level machine can determine the corresponding storage space partition, data to be processed, and data processing type based on the strings.

[0057] Step S303: Process the data to be processed in the target storage area corresponding to the storage space identifier based on the data processing type.

[0058] In some embodiments, the lower-level machine processes the data to be processed in a target storage area based on the processing method corresponding to the data processing type. The target processing area is a partition of the storage medium.

[0059] In specific implementation, if the data processing type is writing, i.e. flash command, the lower-level machine obtains the data to be processed from the upper-level machine based on the identifier of the data to be processed, and writes the data to be processed into the target storage area of ​​the lower-level machine; optionally, after the writing is completed, the lower-level machine can return the writing result to the upper-level machine.

[0060] Alternatively, in specific implementation, if the data processing type is reading (i.e., the `getvar` command), the lower-level machine determines the data to be read based on the identifier of the data to be processed, retrieves the data to be read from the target storage area, and transmits the data to be read to the upper-level machine. The data to be read may include information about the target storage area, or data stored in the target storage area.

[0061] Alternatively, in a specific implementation, if the data processing type is erasure, i.e., the erase command, the lower-level machine determines the data to be erased based on the identifier of the data to be processed, and erases the data to be erased in the target storage area; optionally, the lower-level machine can return the execution result to the upper-level machine after the erasure is completed.

[0062] Thus, the data processing method provided by this disclosure extends the processing instructions by using the manufacturer's identifier, allowing it to be extended to more storage media types and storage media partition formats while also taking into account the existing Fastboot solution, enabling the lower-level machine to process data in the existing storage media partitions based on the processing instructions.

[0063] Figure 4 A third alternative flowchart of the data processing method provided in this disclosure embodiment is shown, and will be described according to each step.

[0064] Step S401: Determine the instruction type corresponding to the processing instruction based on whether the processing instruction includes a manufacturer identifier.

[0065] The specific steps of step S401 are the same as those of step S201, and will not be repeated here.

[0066] Step S402: In response to the fact that the processing instruction includes a manufacturer identifier, the first command parameter, the second command parameter, and the third command parameter in the processing instruction are determined based on the first preset symbol.

[0067] In some embodiments, the processing instruction includes a first command parameter, a second command parameter, and a third command parameter; wherein the first command parameter includes a data processing type; the second command parameter includes a vendor identifier, a storage medium type identifier, and a storage space identifier; and the third command parameter includes an identifier of the data to be processed. Optionally, a first preset symbol is provided between the first command parameter, the second command parameter, and the third command parameter in the processing instruction to isolate or separate them.

[0068] In some embodiments, the lower-level machine obtains a first command parameter, a second command parameter, and a third command parameter from the processing instruction by detecting a first preset symbol in the processing instruction; and parses the first command parameter, the second command parameter, and the third command parameter based on the meaning represented by the string in each command parameter, determines the data processing type based on the first command parameter, determines the location and information of the data to be processed based on the third command parameter, determines the storage medium type identifier and the storage space identifier based on the second command parameter, and then determines the target storage area based on the storage medium type identifier and the storage space identifier.

[0069] In specific implementation, the second command parameter includes a manufacturer identifier, a storage medium type identifier, and a storage space identifier; a second preset symbol is set between the manufacturer identifier, the storage medium type identifier, and the storage space identifier to isolate or separate them.

[0070] Furthermore, the lower-level machine detects the second preset symbol in the second command parameter, parses the storage medium type identifier and storage space identifier from the second command parameter, and then determines the target storage space based on the storage medium type identifier and storage space identifier.

[0071] Specifically, the lower-level machine can determine the storage medium for processing the data to be processed based on the storage medium type identifier, and determine the partition or address based on the storage space identifier; the partition or storage medium is determined to be the target storage area, including the address range.

[0072] Step S403: Process the data to be processed in the target storage area corresponding to the storage medium type identifier and the storage space identifier based on the data processing type.

[0073] In some embodiments, the lower-level machine processes the data to be processed in the target storage area based on the processing method corresponding to the data processing type.

[0074] In specific implementation, if the data processing type is writing, i.e. flash command, the lower-level machine obtains the data to be processed from the upper-level machine based on the identifier of the data to be processed, and writes the data to be processed into the target storage area of ​​the lower-level machine; optionally, after the writing is completed, the lower-level machine can return the writing result to the upper-level machine.

[0075] Alternatively, in specific implementation, if the data processing type is reading (i.e., the `getvar` command), the lower-level machine determines the data to be read based on the identifier of the data to be processed, retrieves the data to be read from the target storage area, and transmits the data to be read to the upper-level machine. The data to be read may include information about the target storage area, or data stored in the target storage area.

[0076] Alternatively, in a specific implementation, if the data processing type is erasure, i.e., the erase command, the lower-level machine determines the data to be erased based on the identifier of the data to be processed, and erases the data to be erased in the target storage area; optionally, the lower-level machine can return the execution result to the upper-level machine after the erasure is completed.

[0077] Thus, the data processing method provided by this disclosure extends the processing instructions by means of the manufacturer's identifier, so that it can take into account the existing fastboot commands and extend to more storage media types and storage media partitioning forms, so that more storage media can process data based on the instructions of the host computer in Fastboot mode.

[0078] Figure 5 A fourth optional flowchart of the data processing method provided in this disclosure embodiment is shown, and will be described according to each step.

[0079] Step S501: Determine the instruction type corresponding to the processing instruction based on whether the processing instruction includes a manufacturer identifier.

[0080] The specific steps of step S501 are the same as those of step S201, and will not be repeated here.

[0081] Step S502: In response to the fact that the processing instruction includes a manufacturer identifier, the instruction type of the processing instruction is determined to be the first type. The processing instruction is parsed to determine the data processing type, storage medium type identifier, storage space identifier, and identifier of the data to be processed corresponding to the processing instruction.

[0082] The specific steps of step S502 are the same as those of step S202 or step S402, and will not be repeated here.

[0083] Step S503: Determine the attributes of the target storage region based on the storage space identifier.

[0084] In some embodiments, the lower-level machine can determine the attributes of the target storage area based on the storage space identifier, and adopt different processing logic based on the attributes of the target storage area during the processing of the data to be processed.

[0085] In some embodiments, the attributes of the target storage region may include partitions and addresses; if the attribute of the target storage region is a partition, then step S504 is executed; if the attribute of the target storage region is an address, then step S505 is executed.

[0086] Step S504: Invoke the storage medium driver based on the driver call interface, and determine the target storage area based on the storage medium driver.

[0087] In some embodiments, the lower-level machine can determine whether the target storage area is a storage medium partition or a storage address range based on whether the storage space identifier includes a preset string. If the storage space does not include the preset character, then the target storage area is a storage medium partition; the preset character can be an address-related character, that is, a character included in the address but not in the partition, such as "0x".

[0088] In some embodiments, in response to determining that the target storage area is a storage medium partition based on the storage space identifier, the storage medium driver corresponding to the storage medium type identifier is invoked based on the driver invocation interface; based on the storage medium driver, the partition information of the storage medium corresponding to the storage medium type identifier is determined; the target storage area is determined based on the partition information of the storage medium and the storage space identifier; and the data to be processed is processed in the target storage area based on the data processing type.

[0089] Step S505: Determine the address range based on the storage medium type identifier, and determine the target storage area based on the address range.

[0090] In some embodiments, the lower-level machine can determine whether the target storage area is a storage medium partition or a storage address range based on whether the storage space identifier includes a preset string. If the storage space includes the preset character, then the target storage area is a storage address range; the preset character can be an address-related character, that is, a character included in the address but not included in the partition, such as "0x".

[0091] In some embodiments, in response to determining that the target storage area is a storage address range based on the storage space identifier, the address range corresponding to the storage medium is determined based on the storage medium type identifier; it is determined whether the storage address range corresponding to the storage space identifier is within the address range corresponding to the storage medium; in response to determining that the storage address range corresponding to the storage space identifier is within the address range corresponding to the storage medium, the data to be processed is processed in the target storage area based on the data processing type.

[0092] Alternatively, in response to determining that the storage address range corresponding to the storage space identifier is not within the address range corresponding to the storage medium, an error message is returned to the host computer so that the host computer can reconfirm and reissue the storage space identifier.

[0093] Step S506: Process the data to be processed in the target storage area corresponding to the storage medium type identifier and the storage space identifier based on the data processing type.

[0094] In some embodiments, the lower-level machine processes the data to be processed in the target storage area based on the processing method corresponding to the data processing type.

[0095] In specific implementation, if the data processing type is writing, i.e. flash command, the lower-level machine obtains the data to be processed from the upper-level machine based on the identifier of the data to be processed, and writes the data to be processed into the target storage area of ​​the lower-level machine, such as the target storage address range; optionally, after the writing is completed, the lower-level machine can return the writing result to the upper-level machine.

[0096] Specifically, the lower-level machine can send a file retrieval request to the upper-level machine via a universal serial bus, and retrieve the file to be processed based on the first storage space corresponding to the upper-level machine.

[0097] Alternatively, in specific implementation, if the data processing type is reading, i.e., the getvar command, then the lower-level machine determines the data to be read based on the identifier of the data to be processed, obtains the data to be read from the target storage area (such as the target storage address range), and transmits the data to be read to the upper-level machine. The data to be read may include information about the target storage area, or data stored in the target storage area.

[0098] Specifically, the lower-level machine can obtain the data to be processed based on the target storage area and send the data to be processed to the upper-level machine through a universal serial bus; wherein, the data to be processed includes parameter information of the target storage area.

[0099] Alternatively, in a specific implementation, if the data processing type is erasure, i.e., the erase command, the lower-level machine determines the data to be erased based on the identifier of the data to be processed, and erases the data to be erased in the target storage area (such as the target storage address range); optionally, the lower-level machine can return the execution result to the upper-level machine after the erasure is completed.

[0100] Thus, the data processing method provided by this disclosure extends the processing instructions by means of the manufacturer's identifier, so that it can take into account the existing fastboot commands and extend to more storage media types and storage media partitioning forms, so that more storage media can process data based on the instructions of the host computer in Fastboot mode.

[0101] Figure 6 A fifth alternative flowchart of the data processing method provided in this disclosure embodiment is shown, and will be described according to each step.

[0102] In step S601, the host computer determines the processing instruction based on the received command parameters.

[0103] In some embodiments, the format of the processing instruction may include "first command parameter, second command parameter, and third command parameter". The first command parameter, the second command parameter, and the third command parameter are separated by a first preset symbol. The first preset symbol can be any symbol that the program or hardware can understand, such as a space, etc. It can be set according to actual needs, and this disclosure does not make any specific limitations.

[0104] In some embodiments, the host computer can provide an input window to receive command parameters input by the user via peripherals (such as a mouse or keyboard) or touch commands. Optionally, the input window may include multiple input areas, each corresponding to a different command parameter. Prompt information corresponding to the command parameter is set near the area. For example, above, below, to the left, to the right, or within the input area corresponding to the first command parameter, prompt information related to "first command parameter or data processing type" is set; above, below, to the left, to the right, or within the input area corresponding to the second command parameter, prompt information related to "second command parameter or storage medium" is set; above, below, to the left, to the right, or within the input area corresponding to the third command parameter, prompt information related to "third command parameter or data to be processed" is set.

[0105] In some embodiments, after receiving command parameters based on multiple input areas, the host computer generates a processing instruction according to the format of the processing instruction and the received command parameters, and transmits it to the slave computer.

[0106] In some embodiments, the host computer can determine the format of the processing instruction based on whether the second command parameter includes a manufacturer identifier.

[0107] In specific implementation, if the second command parameter includes a manufacturer identifier, the format of the processing instruction is the first format, namely "first command parameter, second command parameter, third command parameter". The second command parameter is "manufacturer identifier_storage medium type identifier_storage space identifier". The manufacturer identifier, storage medium type identifier and storage space identifier are separated by a second preset symbol. The first preset symbol can be any symbol that the program or hardware can understand, such as "_". It can be set according to actual needs, and this disclosure does not make specific limitations.

[0108] Alternatively, in specific implementation, if the second command parameter does not include the manufacturer identifier, the processing instruction format is the second format, namely "first command parameter, second command parameter, third command parameter", where the second command parameter is the storage space identifier.

[0109] For example, the first format processing command could be "flash oem_sata_system system.img". Here, "flash" is the first command parameter, representing the data processing type; flash corresponds to flashing / writing. "oem_sata_system" is the second command parameter, where oem is the manufacturer identifier (a fixed string), sata is the storage media type identifier (here, sata stands for Serial Advanced Technology Accessory); system is the partition name of the sata storage media; and "system.img" is the third command parameter, representing the filename of the data to be written.

[0110] For example, the first format processing command could be "flash oem_device_addr system.img". Here, "flash" is the first command parameter, representing the data processing type; flash corresponds to flashing. "oem_device_addr" is the second command parameter, where 'oem' is the manufacturer identifier (a fixed string), and 'device' is the storage media type identifier, such as "sata" for SATA media and "nvme" for NVMe media. "addr" represents the physical address of the storage media, typically 0x..., such as "0x0" representing address 0 of the media, and must begin with "0x" to distinguish between address-based and partition-based burning. It ends with the number corresponding to the physical address, and must be a hexadecimal number. Regarding the conventional representation of storage media addresses, for example, a 1GB storage media would have an address range of 0x0 to 0x40000000. "system.img" is the third command parameter, representing the filename of the data to be written.

[0111] For example, the second format processing command can be "flash system system.img", where "flash" is the first command parameter, which represents the data processing type, and flash corresponds to flashing; "system" is the second command parameter, which represents the storage space identifier, that is, the partition name of the storage medium; and "system.img" is the third command parameter, which represents the file name of the data to be written.

[0112] In some embodiments, after the host computer determines the processing instruction, it sends the processing instruction to the slave computer via a universal serial bus.

[0113] In step S602, the lower-level machine determines the instruction type corresponding to the processing instruction based on whether the processing instruction includes a manufacturer identifier.

[0114] In some embodiments, if the instruction does not include a manufacturer identifier, the processing instruction is determined to be of the second type, and step S603 is executed; if the instruction includes a manufacturer identifier, the processing instruction is determined to be of the first type, and step S604 is executed.

[0115] Step S603: Process the data to be processed in the target storage area corresponding to the storage space identifier based on the data processing type.

[0116] The specific steps of step S603 are the same as those of steps S302 to S303, and will not be repeated here.

[0117] After completing step S603, proceed to step S605.

[0118] Step S604: Parse the processing instruction to determine the data processing type, storage medium type identifier, storage space identifier, and the identifier of the data to be processed corresponding to the processing instruction.

[0119] In some embodiments, the specific steps of step S604 are the same as those of steps S202, S402 to S403, and will not be repeated here.

[0120] Step S605: Process the data to be processed in the target storage area based on the data processing type.

[0121] The specific steps of step S605 are the same as those of steps S203, S403 or S506, and will not be repeated here.

[0122] Step S606: Feed back the data processing results to the host computer.

[0123] In some embodiments, after the lower-level machine processes the data to be processed in the target storage area based on the data processing type, it feeds back the data processing result to the upper-level machine.

[0124] Thus, the data processing method provided by this disclosure extends the processing instructions by means of the manufacturer's identifier, so that it can take into account the existing fastboot commands and extend to more storage media types and storage media partitioning forms, so that more storage media can process data based on the instructions of the host computer in Fastboot mode.

[0125] Figure 7 A schematic diagram of a first alternative architecture for the data processing method provided in an embodiment of this disclosure is shown.

[0126] like Figure 7 As shown, this embodiment includes a host computer and a slave computer.

[0127] The host computer generates processing instructions based on the user's input commands. The user's input commands may include fastboot raw commands, manufacturer identifiers (OEM commands), and data processing types, storage space identifiers, and identifiers of the data to be processed in related technologies.

[0128] The host computer transmits processing instructions to the slave computer via a universal serial bus.

[0129] The lower-level machine obtains processing instructions through the Universal Serial Bus (USB) driver, calls the Fasboot driver to parse the processing instructions, and responds by obtaining the manufacturer identifier from the processing instructions. Then, it enters the "OEM command character processing" module to obtain the storage medium type string. The storage medium type string includes the string corresponding to the storage medium type identifier and the string corresponding to the storage space identifier.

[0130] The lower-level machine determines the storage medium based on the string corresponding to the storage medium type identifier, and then calls the corresponding storage medium driver through the storage medium driver call interface. For example, if the storage medium is determined to be SATA based on the storage medium type identifier string, the SATA driver is called; if the storage medium is determined to be NAND FLASH based on the storage medium type identifier string, the NAND driver is called.

[0131] The lower-level machine calls the storage medium driver to obtain the partition information of the storage medium, and writes the data to the corresponding storage medium partition through the storage medium driver.

[0132] Thus, when multiple storage media are available, the data processing method described in this embodiment supports writing to various storage media, including MMC, NAND FLASH, SATA, NVME, and Nor FLASH.

[0133] Figure 8 A schematic diagram of a second alternative architecture for the data processing method provided in an embodiment of this disclosure is shown. Figure 8 The diagram shows the overall process of flashing various storage media based on Fastboot.

[0134] In some embodiments, such as Figure 8 As shown, the user enters the fastboot command in the lower-level machine's uboot command line to enable the lower-level machine to enter Fastboot mode and wait to receive commands from the upper-level machine.

[0135] In some embodiments, the user inputs a fastboot processing command on the host computer's Fastboot client. The host computer's Fastboot client then enters the command sending module and sends the processing command to the slave device via USB. The processing command can be "flash oem_sata_system system.img".

[0136] The lower-level receiving module calls the USB driver to receive and process instructions.

[0137] The lower-level machine calls the Fastboot driver, parses and processes the instructions, and enters the corresponding operation process based on the data processing type included in the instructions. For example, if the data processing type in the instructions is "flash", then the flashing process is entered. The lower-level machine then enters the OEM processing module.

[0138] The lower-level machine segments the processing instructions based on the OEM processing module. Based on the segmentation, it obtains a first command parameter, a second command parameter, and a third command parameter. Using the second command parameter, it determines the type of storage medium to be operated on and calls the storage medium driver interface according to the storage medium type. Obtain information about the storage medium, such as partition information, through the storage medium driver interface; write the data to be processed to the corresponding partition of the storage medium through the storage medium driver interface.

[0139] Figure 9 A schematic diagram of a third alternative architecture for the data processing method provided in an embodiment of this disclosure is shown. Figure 9 The diagram shows the overall process of downloading and burning data based on Fastboot address.

[0140] In some embodiments, such as Figure 9 As shown, the architecture includes a host computer and a slave computer. The slave computer adds an address parsing process and a driver interface for address-based programming. The address parsing process, taking the command "flash oem_sata_0x0system.img" for programming SATA media by address as an example, checks if the first two bytes of the string "0x0" are "0x". If so, the address-based programming process is executed; otherwise, the partition-based programming process is executed. The address-based programming driver interface determines the media type corresponding to the "device" character. In the example, if it's SATA media, it scans the local SATA storage media to obtain its capacity. It compares the capacity data with the obtained address parameters. If the address is not greater than the capacity (the address cannot exceed the default address range for the capacity), meaning the parameters are valid, the driver corresponding to the storage media will be directly called for image programming.

[0141] In some embodiments, the user inputs command parameters. The command parameters contain the type and address information of the storage medium to be burned (the user knows the basic information of the storage medium in advance, such as type, capacity, address, etc.).

[0142] The Fastboot client on the host computer determines the processing instructions based on the command parameters, loads the processing instructions into the host computer's memory, sends them to the USB module in the host computer, and then sends the processing instructions to the slave computer through the USB module.

[0143] The lower-level device receives and processes instructions via USB and parses them to obtain address parameters.

[0144] In some embodiments, the lower-level device scans the corresponding local storage medium based on the storage medium type in the processing instruction to obtain the storage medium's capacity information. The received address information is compared with the local storage medium's capacity information. If there is no address conflict (a conflict here includes the address information being within the range of the storage medium's capacity information), the lower-level device sends a file retrieval request to the USB module. A file retrieval request is then returned to the upper-level device, notifying it that the address being operated on exists and that mirror data can be transferred.

[0145] After receiving a file retrieval request, the host computer retrieves the image file data from its local disk via the Fastboot client. The Fastboot client loads the image data into the host computer's memory. The image data in memory is then sent to the USB module, which forwards it to the slave computer's memory, completing the download process. The slave computer then burns the image data from its memory to the corresponding address on the storage medium.

[0146] Thus, the data processing method provided in this disclosure adds SATA and NVMe flashing interfaces. For NOR FLASH using a Quad Serial Peripheral Interface (QSPI), there is also a corresponding QSPI NOR FLASH flashing interface. Data flashing can be completed simply by connecting the corresponding storage medium and inputting the corresponding command on the Fastboot host computer. Furthermore, it can expand to include storage media such as USB flash drives and NOR FLASH using a Local Bus Controller (LBC) interface, providing a certain degree of expandability. Users can choose different storage media according to their needs, offering high flexibility. Address-based burning commands and interfaces have been added. Only the corresponding command needs to be input on the host computer; there is no need to partition the storage medium of the lower-level device beforehand, nor is it necessary to obtain partition information to complete the image download and burning, improving the convenience of Fastboot's download and burning function.

[0147] Figure 10 A schematic diagram of an optional structure of the data processing apparatus provided in an embodiment of this disclosure is shown, and the details will be described in terms of each part.

[0148] In some embodiments, the data processing apparatus includes a receiving unit, an instruction type determination unit, a parsing unit, and a processing unit.

[0149] The receiving unit is used to receive processing instructions based on a universal serial bus; The instruction type determination unit is used to determine the instruction type corresponding to the processing instruction based on whether the processing instruction includes a manufacturer identifier. The parsing unit is configured to, in response to the fact that the processing instruction includes a manufacturer identifier, determine that the instruction type of the processing instruction is a first type, parse the processing instruction, and determine the data processing type, storage medium type identifier, storage space identifier, and identifier of the data to be processed corresponding to the processing instruction; The processing unit is used to process the data to be processed in the target storage area corresponding to the storage medium type identifier and the storage space identifier based on the data processing type. The storage medium type identifier includes a multimedia card identifier, a non-flash memory identifier, a Serial Advanced Technology Attached Feature identifier, a non-volatile memory host controller interface specification identifier, and a non-flash memory identifier.

[0150] The parsing unit is further configured to, in response to the absence of a manufacturer identifier in the processing instruction, determine that the instruction type of the processing instruction is the second type, parse the processing instruction, and determine the data processing type, storage space identifier, and identifier of the data to be processed corresponding to the processing instruction; The processing unit is further configured to process the data to be processed in the target storage area corresponding to the storage space identifier based on the data processing type.

[0151] The parsing unit is specifically used to determine the first command parameter, the second command parameter, and the third command parameter in the processing instruction based on the first preset symbol. The data processing type is determined based on the first command parameter; The storage medium type identifier and storage space identifier are determined based on the second command parameter; The identifier of the data to be processed is determined based on the third command parameter; The storage space identifier includes a storage partition identifier or a storage address identifier.

[0152] The parsing unit is specifically used to determine the storage medium type identifier and storage space identifier in the second command parameter based on the second preset symbol. If the storage space identifier does not include a third preset symbol, then the target storage area is determined to be a storage medium partition, and the storage space identifier is a storage medium partition identifier. Alternatively, in response to the inclusion of a third preset symbol in the storage space identifier, the target storage area is determined to be a storage address range, and the storage space identifier is a storage address range.

[0153] The processing unit is specifically configured to, in response to determining that the target storage area is a storage medium partition based on the storage space identifier, invoke the storage medium driver corresponding to the storage medium type identifier based on the driver call interface, and determine the partition information of the storage medium corresponding to the storage medium type identifier based on the storage medium driver; The target storage area is determined based on the partition information and storage space identifier of the storage medium; The data to be processed is processed in the target storage area based on the data processing type.

[0154] The processing unit is specifically configured to, in response to determining the target storage area as a storage address range based on the storage space identifier, determine the address range corresponding to the storage medium based on the storage medium type identifier; Determine whether the storage address range corresponding to the storage space identifier is within the address range corresponding to the storage medium; In response to determining that the storage address range corresponding to the storage space identifier is within the address range corresponding to the storage medium, the data to be processed is processed in the target storage area based on the data processing type.

[0155] The processing unit is specifically used to send a file retrieval request to the host computer via a universal serial bus, and to retrieve the file to be processed based on the first storage space corresponding to the host computer.

[0156] The processing unit is specifically used to obtain the data to be processed based on the target storage area and send the data to be processed to the host computer through a universal serial bus. The data to be processed includes parameter information of the target storage area.

[0157] According to embodiments of this disclosure, this disclosure also provides an electronic device and a readable storage medium.

[0158] Figure 11 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0159] like Figure 11 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on 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. The RAM 803 may also store various programs and data required for the operation of the electronic device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0160] Multiple components in electronic device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows electronic device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0161] The computing unit 801 can be a variety of 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 special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as data processing methods. For example, in some embodiments, the data processing method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform data processing methods by any other suitable means (e.g., by means of firmware).

[0162] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0163] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0164] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction 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 be, 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 machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0165] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).

[0166] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0167] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0168] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0169] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.

[0170] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A data processing method, characterized by, The method comprises: determining the instruction type of the processing instruction based on whether the vendor identifier is included in the processing instruction; in response to the vendor identifier being included in the processing instruction, determining that the instruction type of the processing instruction is a first type, parsing the processing instruction, and determining the data processing type, the storage medium type identifier, the storage space identifier, and the identifier of the to-be-processed data corresponding to the processing instruction; processing the to-be-processed data in the target storage area corresponding to the storage medium type identifier and the storage space identifier based on the data processing type. The storage medium type identifier comprises at least one of a multimedia card identifier, a not-and flash memory identifier, a serial advanced technology attachment identifier, a non-volatile memory express host controller interface specification identifier, and an or-and flash memory identifier.

2. The method of claim 1, wherein, The method further comprises: in response to the vendor identifier not being included in the processing instruction, determining that the instruction type of the processing instruction is a second type, parsing the processing instruction, and determining the data processing type, the storage space identifier, and the identifier of the to-be-processed data corresponding to the processing instruction; processing the to-be-processed data in the target storage area corresponding to the storage space identifier based on the data processing type.

3. The method of claim 1, wherein, The parsing of the processing instruction, the determination of the data processing type, the storage medium type identifier, the storage space identifier, and the identifier of the to-be-processed data corresponding to the processing instruction comprises: determining the first command parameter, the second command parameter, and the third command parameter in the processing instruction based on a first preset symbol; determining the data processing type based on the first command parameter; determining the storage medium type identifier and the storage space identifier based on the second command parameter; determining the identifier of the to-be-processed data based on the third command parameter; The storage space identifier comprises a storage partition identifier or a storage address identifier.

4. The method of claim 3, wherein, The determination of the storage medium type identifier and the storage space identifier based on the second command parameter comprises: determining the storage medium type identifier and the storage space identifier in the second command parameter based on a second preset symbol; in response to the third preset symbol not being included in the storage space identifier, determining that the target storage area is a storage medium partition, and the storage space identifier is a storage medium partition identifier; alternatively, in response to the third preset symbol being included in the storage space identifier, determining that the target storage area is a storage address range, and the storage space identifier is a storage address range.

5. The method of claim 1, wherein, The processing of the to-be-processed data in the target storage area corresponding to the storage medium type identifier and the storage space identifier based on the data processing type comprises: in response to the target storage area being determined to be a storage medium partition based on the storage space identifier, calling the storage medium driver corresponding to the storage medium type identifier based on a driver calling interface, determining the partition information of the storage medium corresponding to the storage medium type identifier based on the storage medium driver; determining the target storage area based on the partition information of the storage medium and the storage space identifier; processing the to-be-processed data in the target storage area based on the data processing type.

6. The method of claim 1, wherein, The processing of the to-be-processed data in the target storage area corresponding to the storage medium type identifier and the storage space identifier based on the data processing type comprises: In response to determining that the target storage area is a storage address range based on the storage space identifier, determining an address range corresponding to the storage medium based on the storage medium type identifier; determining whether the storage address range corresponding to the storage space identifier is within the address range corresponding to the storage medium; In response to determining that the storage address range corresponding to the storage space identifier is within the address range corresponding to the storage medium, processing the to-be-processed data in the target storage area based on the data processing type.

7. The method according to claim 5 or 6, characterized in that, If the data processing type is write processing, the processing of the to-be-processed data in the target storage area based on the data processing type includes: sending a file acquisition request to the host computer through the universal serial bus, and acquiring the to-be-processed file based on the first storage space corresponding to the host computer.

8. The method according to claim 5 or 6, characterized in that, If the data processing type is read processing, the processing of the to-be-processed data in the target storage area based on the data processing type includes: acquiring the to-be-processed data based on the target storage area, and sending the to-be-processed data to the host computer through the universal serial bus; wherein the to-be-processed data includes parameter information of the target storage area.

9. A data processing apparatus, characterized by, The device includes: a receiving unit configured to receive a processing instruction based on a universal serial bus; an instruction type determination unit configured to determine an instruction type corresponding to the processing instruction based on whether the processing instruction includes a vendor identifier; an analysis unit configured to, in response to the processing instruction including the vendor identifier, determine that the instruction type of the processing instruction is a first type, analyze the processing instruction, and determine a data processing type, a storage medium type identifier, a storage space identifier, and an identifier of to-be-processed data corresponding to the processing instruction; a processing unit configured to process the to-be-processed data in a target storage area corresponding to the storage medium type identifier and the storage space identifier based on the data processing type. wherein the storage medium type identifier includes a multimedia card identifier, a NAND flash memory identifier, a serial advanced technology attachment identifier, a non-volatile memory express host controller interface specification identifier, and an or non-flash memory identifier.

10. An electronic device, comprising: comprise: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable 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 of any one of claims 1-8.

11. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-8. The computer instructions are used to enable the computer to perform the method of any one of claims 1-8.