Data processing method, processor, storage device, interface card, and storage medium
By extracting and outputting data features in storage devices, network congestion and data security issues caused by ransomware detection are solved, detection speed and security are improved, and efficient infection detection is achieved.
Patent Information
- Application Number
- PCT/CN2023/125203
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-22
- Filing Date
- 2023-10-18
- Publication Date
- 2024-08-29
AI Technical Summary
During the detection process, existing ransomware virus detection software needs to read a large amount of data from the storage device to the detection device, causing network congestion between the storage device and the detection device, affecting the detection speed, and data is frequently exposed to the outside, increasing security risks. .
By executing the data processing method in the storage device, data features are directly extracted from the storage device and output to the detection device to avoid large amounts of data transmission. The processor and interface card of the storage device are used to perform on-the-fly calculations, reducing communication delays and computing loads. And extract metadata as data is written to facilitate subsequent infection detection.
It effectively reduces network congestion caused by virus detection, improves detection speed, enhances data security, and provides a flexible data feature extraction mechanism and customized virus detection methods, improving the efficiency and accuracy of infection detection.
Smart Images

Figure CN2023125203_29082024_PF_FP_ABST
Abstract
Description
Data processing method, processor, storage device, interface card and storage medium
[0001] This application claims priority to Chinese patent application number 202310188646.6, filed on February 22, 2023, entitled “Data processing method, processor, storage device, interface card and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a data processing method, a processor, a storage device, an interface card, and a storage medium. Background Art
[0003] Ransomware is a computer virus that threatens data security. It reads and writes data on storage devices in the form of ransomware, thereby tampering with the data and seriously threatening data security. Therefore, timely detection of data infection by ransomware is crucial to ensuring data security.
[0004] Currently, ransomware detection software (also known as anti-ransomware software) is commonly used to perform infection detection (also known as ransomware detection) on data stored in storage devices. During the detection process, the anti-ransomware software runs on a dedicated detection device, which reads data from the storage device through the Network File System (NFS) interface. The anti-ransomware software analyzes the data to determine whether it is infected by a ransomware virus.
[0005] However, current anti-ransomware software requires all data to be read from storage devices to the detection device during infection detection. This large amount of data can cause network congestion between the storage device and the detection device, slowing down infection detection.
[0006] Summary of the Invention
[0007] This application provides a data processing method, processor, storage device, interface card, and storage medium that can reduce network congestion between the storage device and the detection device caused by virus detection. The technical solution is as follows:
[0008] In a first aspect, a data processing method is provided. The method is executed by a processor in a storage device, the storage device is used to provide storage services for a host, and the storage device communicates with a detection device. The method includes:
[0009] Receiving an infection detection request from a detection device, and obtaining data features of target data based on the infection detection request, wherein the infection detection request is used to detect whether the target data is infected by a virus, and the data features are obtained by extracting features from the target data;
[0010] Output the data features of the target data to the detection device, and the data features are used by the detection device to detect whether the data is infected by a virus.
[0011] When performing infection detection on data in a storage device, the present application does not need to read a large amount of data and send it to the detection device. Instead, the storage device directly provides the data characteristics of the data, effectively reducing the communication load caused by data transmission, thereby effectively reducing the network congestion between the storage device and the detection device caused by virus detection, and improving the speed of infection detection on data in the storage device; and, since frequent exposure of data to the outside of the storage device is avoided, the security of the data in the storage device is further improved.
[0012] In one possible implementation, while executing tasks related to the target data storage, the processor further extracts features from the target data to obtain the data features. This process is also known as on-path computation of data features. On-path computation refers to the additional computation of data features without changing the original business operation mode. This prevents data from being repeatedly transferred between different locations, thereby reducing communication latency, improving computing efficiency, and reducing overall energy consumption.
[0013] In one possible implementation, the processor, while executing a task related to the target data storage, further extracts features from the target data to obtain the data features, including:
[0014] The processor is a storage device CPU. During the process of storing target data, the storage device CPU calculates the target data to generate data features. The storage device CPU is connected to the storage interface card. Or,
[0015] The processor is a processing unit of the storage device interface card. The storage device interface card communicates with the host. When the storage device interface card receives target data sent by the host, the processing unit of the storage device interface card calculates the target data to generate data features.
[0016] Among them, the storage device interface card serves as a communication interface in the storage device. Its original function involves processing target data, such as parsing data packets, mapping and converting data storage addresses, etc. On this basis, the storage interface card processor is used to calculate data features along the way, which can efficiently utilize the computing power of the interface card and its network interface position in the transmission link, thereby achieving the effect of reducing communication delays, improving computing efficiency, and reducing overall energy consumption.
[0017] Through the above technical solution, the computing and storage loads brought about by the processes of reading data, calculating data features, and storing data features can be offloaded from the detection device that performs infection detection to the storage device CPU and storage interface card processor in the data transmission link.
[0018] In one possible implementation, before obtaining the data features of the target data, the method further includes:
[0019] Receive data characteristics from the host; send the data characteristics to the storage medium of the storage device for persistent storage.
[0020] In this application, the host can perform the process of extracting data features, thereby offloading the computing and storage loads brought about by the processes of reading data, calculating data features, and storing data features from the detection device performing infection detection to the host.
[0021] In one possible implementation, before receiving the data feature from the host, the process of the host determining the data feature includes: in the process of the host CPU generating the target data, the host CPU calculates the target data to generate the data feature; or
[0022] When the host interface card sends target data to the storage device, the processing unit of the host interface card calculates the target data to generate data features.
[0023] Among them, the host interface card serves as a communication interface on the host side. Its original function involves processing target data, such as encapsulating data packets, mapping and converting data storage addresses, etc. On this basis, the host interface card processor is used to calculate data features along the way, which can efficiently utilize the computing power of the interface card and its network interface position in the transmission link, thereby achieving the effect of reducing communication delay, improving computing efficiency, and reducing overall energy consumption.
[0024] In one possible implementation, the method further includes:
[0025] In response to a write request from a host, before the target data is written into a target storage space of the storage device, feature extraction is performed on the target data to obtain data features, wherein the write request carries the target data, and the target storage space is a persistent storage space provided by the storage device;
[0026] Storing data features as metadata of the data in the target storage space;
[0027] Based on the infection detection request, the data characteristics of the target data are obtained, including:
[0028] Based on the infection detection request, data features are obtained from the metadata.
[0029] In some embodiments, the storage device has extracted and stored the data features of the data in the form of metadata, so that when the infection detection request is received, the stored data features can be directly output to the detection node, effectively improving the efficiency of infection detection.
[0030] In one possible implementation, the storage space of the storage device is divided into a metadata storage space dedicated to storing metadata and a storage space not dedicated to storing metadata, and the data features are stored as metadata of the data in the target storage space, including:
[0031] In a metadata storage space dedicated to storing metadata in a storage device, the data features are stored as metadata of the data in the target storage space.
[0032] Storing metadata and data in different storage spaces can facilitate metadata management.
[0033] In one possible implementation, obtaining data features of target data based on an infection detection request includes:
[0034] Based on the infection detection request, feature extraction is performed on target data stored in the target storage space indicated by the infection detection request to obtain data features.
[0035] The above provides a technical solution for extracting data features in real time. Data features are not calculated when data is written, but are calculated by reading data when an infection detection request is received. This can effectively reduce the load of data transmission and the storage pressure of storage devices, thereby improving the performance of storage devices.
[0036] In one possible implementation, performing feature extraction on the data stored in the target storage space to obtain the data features includes:
[0037] Performing feature extraction on data of at least one unit sampling interval of the target storage space according to a sampling method for the target storage space to obtain at least one interval data feature of the unit sampling interval;
[0038] Based on at least one data feature of the interval, a data feature of the data in the target storage space is generated.
[0039] The above technical solution can improve the representativeness of data features to the overall data by sampling data in partitioned intervals, and improve the accuracy of subsequent infection detection based on data features.
[0040] In one possible implementation, generating a data feature of the data in the target storage space based on at least one data feature of the interval includes:
[0041] The set consisting of the at least one interval data feature is determined as the data feature of the data in the target storage space.
[0042] Through the above method, the data characteristics can be determined with the data sampling interval as the granularity, thereby providing reliable data support for infection detection, thereby improving the speed and accuracy of infection detection.
[0043] In one possible implementation, generating a data feature of the data in the target storage space based on at least one data feature of the interval includes:
[0044] Based on the number of unit sampling intervals corresponding to at least one type of the interval data feature, the distribution feature of the at least one unit sampling interval is determined, and the distribution feature is determined as the data feature of the data in the target storage space. The distribution feature indicates the quantity distribution of the unit sampling intervals of the target storage space for different types.
[0045] Through the above method, the data characteristics of the data can be determined from the perspective of statistical distribution, so that data segments with abnormal data characteristics can be quickly detected, thereby improving the speed and accuracy of infection detection.
[0046] In a possible implementation, the method further includes: in response to a feature policy configuration instruction, obtaining feature policy information for the storage device, where the feature policy information indicates a manner of performing feature extraction on data in the storage device.
[0047] In a possible implementation, the data feature is specifically information entropy of the target data or a summary of the target data, where the information entropy indicates uncertainty of the data, and the summary is a fragment extracted from the data and used to identify the data.
[0048] The above technical solution provides a flexible and configurable data feature extraction mechanism that can extract features in a variety of sampling methods and can flexibly switch between a variety of different feature extraction algorithms for various types of data features. While improving data processing efficiency, it can also improve the effectiveness of data features of different dimensions for infection detection.
[0049] In a possible implementation, before the storage device receives the infection detection request from the detection device for the storage device, the detection device sends the infection detection request for the storage device;
[0050] After the storage device outputs the data features of the data to the detection device, the detection device detects whether the data is infected by a virus based on the data features.
[0051] In one possible implementation, the data feature is information entropy, which indicates uncertainty of the data. The detection device detects whether the data is infected by a virus based on the data feature, including:
[0052] If the information entropy exceeds the target information entropy interval, it is determined that the data is infected by the virus, and the target information entropy interval indicates the range of the information entropy of uninfected data.
[0053] In one possible implementation, the data feature is a digest, which is a fragment extracted from the data and used to identify the data. The detection device detects whether the data is infected by a virus based on the data feature, including:
[0054] If the obtained digest of the data is inconsistent with the verification digest, it is determined that the data is infected by a virus, and the verification digest is the digest of the data stored by the detection device when it is not infected.
[0055] Through the above technical solution, the detection device can perform detection directly based on the data features obtained from the storage device, saving the time consumed by disk reading and data transmission, and effectively improving the speed of infection detection for data in the storage device.
[0056] In one possible implementation, the processor is a storage device CPU, and the storage device CPU communicates with a storage device memory and a storage device interface card.
[0057] In one possible implementation, the processor is a processing unit of a storage device interface card. The storage device interface card is managed by the storage device CPU. The storage device interface card further communicates with the host through a network.
[0058] Through the above technical solution, the computing and storage loads brought about by the processes of reading data, calculating data features, and storing data features can be offloaded from the detection device that performs infection detection to the storage device CPU and storage interface card processor in the data transmission link.
[0059] In a second aspect, a data processing method is provided. The method is executed by a processor in a storage device, and the method includes:
[0060] receiving an infection detection request for target data;
[0061] If the custom metadata of the target data does not meet the target value or is not within the target value range, output a first detection result, the first detection result indicating that the data has been tampered with;
[0062] If the custom metadata of the target data meets the target value or is within the target value range, a second detection result is output, which indicates that the data has not been tampered with; wherein the custom metadata is carried when the target data is written to the storage device.
[0063] The above method is a custom virus detection method provided by a storage system, which supports custom metadata for virus detection in a user-defined storage system (or storage device), as well as detection rules for custom metadata. In the present application, the processor of the storage device responds to an infection detection request and outputs a detection result based on the custom metadata and detection rules of the data. The custom metadata is used to perform virus infection detection in the storage device. Exemplarily, the custom metadata can be a reliability identifier (such as the integrity tag of NFSv4), a key, a specific string, or attribute data of a custom type provided by the front-end protocol. The custom metadata can also be associated with a business system, for example, a reliability identifier carried by data written to the storage device by normal business software or a business identification ID associated with the business software or business system; the custom metadata can also be meaningless characters (such as devil numbers) that do not affect the data function, and the present application is not limited to this.
[0064] Through the above technical solution, it is possible to customize metadata using information such as storage protocols or business identifiers, and adopt customized detection rules to efficiently determine whether data has been ransomed, thereby improving the efficiency and speed of infection detection.
[0065] In a third aspect, an embodiment of the present application provides a processor, comprising: a power supply circuit for providing power to a processing circuit; a processing circuit connected to the power supply circuit for executing the data processing method involved in the aforementioned first aspect or any optional implementation method of the first aspect.
[0066] In a fourth aspect, an embodiment of the present application provides a storage device, comprising an interface card and a processor as described in the first aspect, wherein the processor is the storage device CPU described in the first aspect, the interface card is used to communicate with the host, the storage device is used to provide storage services for the host, and the processor is used to execute the data processing method involved in any optional implementation method in the aforementioned first aspect or second aspect.
[0067] The network card can be a Smart NIC (DPU). The network card can offload data processing functions from the network, storage, and operating system to the hardware for execution, improving the data processing capabilities of the storage device and freeing up CPU computing power. Therefore, the network card takes on the processing work of the storage device, reducing the computing load of the storage device and improving data processing efficiency.
[0068] In a fifth aspect, an embodiment of the present application provides an interface card, comprising an interface and the processor according to the first aspect, wherein:
[0069] An interface for installing the interface card in the storage device and communicating with a central processing unit of the storage device after the interface card is installed in the storage device;
[0070] The processor executes the data processing method involved in any optional implementation of the first aspect or the second aspect after the interface card is installed in the storage device.
[0071] In one possible implementation, the processor in the interface card is a data processing unit DPU.
[0072] In a sixth aspect, embodiments of the present application provide a computer-readable storage medium for storing at least one program code segment, wherein the at least one program code segment is executed by a processor to implement the data processing method involved in any optional implementation of the first or second aspects. The storage medium includes, but is not limited to, volatile memory, such as random access memory, and non-volatile memory, such as flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0073] In a seventh aspect, embodiments of the present application provide a computer program product that, when executed on a computer, causes the computer to implement the data processing method involved in any optional implementation of the first or second aspects. The computer program product may be a software installation package, and when it is necessary to implement the aforementioned data processing method, the computer program product may be downloaded and executed on the computer. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] FIG1 is a schematic diagram of an implementation environment of a data processing method provided in an embodiment of the present application;
[0075] FIG2 is a flow chart of a data processing method provided in an embodiment of the present application;
[0076] FIG3 is a schematic diagram of a storage metadata provided by an embodiment of the present application;
[0077] FIG4 is a schematic diagram of a data processing method provided in an embodiment of the present application;
[0078] FIG5 is a schematic diagram of a verification method based on custom metadata provided by an embodiment of the present application;
[0079] FIG6 is a schematic diagram of another data processing method provided in an embodiment of the present application;
[0080] FIG7 is a schematic diagram of another data processing method provided in an embodiment of the present application;
[0081] FIG8 is a schematic diagram of the hardware structure of a storage device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0082] The embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
[0083] The key terms and key concepts involved in this application are explained below.
[0084] Ransomware is a computer virus that primarily spreads through email, Trojan programs, and webpage malware. Ransomware uses various encryption algorithms to encrypt files, potentially allowing data to be tampered with. The infection detection methods described in the present invention are applicable to ransomware and other virus infection detection methods.
[0085] The Small Computer System Interface (SCSI) is a processor-independent standard for system-level interfacing between computers and intelligent devices (such as hard drives, floppy drives, optical drives, printers, and scanners). SCSI is a comprehensive data transmission protocol whose primary function is to transmit commands, status, and block data between the host and storage devices. The SCSI protocol sits between the operating system and external resources and consists of a series of functional components. All operating system I / O operations on external devices (such as disks, tapes, optical drives, and printers) are implemented using the SCSI protocol. The SCSI protocol can be embedded into the onboard logic of device drivers or host adapters.
[0086] The Internet Small Computer System Interface (iSCSI) is a storage technology based on the Internet and the SCSI-3 protocol. iSCSI combines the existing SCSI interface with Ethernet technology. Using the Transmission Control Protocol / Internet Protocol (TCP / IP), iSCSI servers (targets) and iSCSI clients (initiators) are connected. This allows encapsulated SCSI data packets to be transmitted over the Internet, mapping the iSCSI server to a storage space (hard disk) that is provided to connected and authenticated clients.
[0087] The Network File System (NFS) is a comprehensive file sharing protocol that provides a network abstraction on top of the file system, allowing remote clients to access the server's storage through the network in a manner similar to a local file system.
[0088] Common Internet File System (CIFS) is a transmission protocol that uses a client / server model. A client using this protocol can access files on a remote server and request services from the remote server.
[0089] A logical block address (LBA) is a universal mechanism for describing the location of data blocks on computer storage devices. LBA can refer to the address of a data block or the data block pointed to by an address.
[0090] A logical unit number (LUN) is a logical disk partitioned at the hardware level. When a host on a network connects to a storage device, it recognizes the storage device's LUN. The LUN acts as a "physical hard disk" presented to the host. One or more partitions (blocks) can be created on this physical hard disk.
[0091] Object Storage Service (OBS) is an object-based, massive storage service that provides users with massive, secure, and highly reliable data storage capabilities, including the ability to create, modify, and delete buckets, and upload, download, and delete objects. The basic components of OBS are buckets and objects. Buckets are containers for storing objects in OBS. Each bucket has its own storage category, access permissions, region, and other attributes. Users locate buckets on the internet using their domain name. Objects are the basic unit of data storage in OBS. An object is essentially a collection of file data and its associated attribute information.
[0092] The terms used in this application also include: redundant array of independent disks (RAID); host bus adapter (HBA); user datagram protocol (UDP); non-volatile memory express (NVMe); non-volatile memory over fabrics (NVMe-oF); and software-defined network (SDN).
[0093] This application provides a data processing method that can be executed by a processor in a storage device to effectively improve the speed at which a detection device performs infection detection on data stored in the storage device. The following describes the implementation environment involved in this application.
[0094] Figure 1 is a schematic diagram of an implementation environment of a data processing method provided in an embodiment of the present application. Referring to Figure 1, the implementation environment includes a storage device 101, a host 102 and a detection device 103. The host 102 and the detection device 103 can communicate with the storage device 101 through a network, and the storage device 101 is used to provide storage services for the host 102.
[0095] Among them, the storage device 101 can provide data storage and management services. In some embodiments, the storage device 101 can be implemented based on a storage device cluster, and the storage device cluster includes at least one storage device. The storage device cluster can be a server, a server cluster consisting of multiple physical servers, or a distributed file system, or a cloud server cluster that provides cloud storage and cloud services, cloud databases, cloud computing, cloud functions, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), big data and artificial intelligence platforms, and other basic cloud computing services, which are not limited in this application.
[0096] In the embodiment of the present application, the host 102 is a client and the storage device 101 is a server. The host 102 can use the data storage and management services provided by the storage device 101. In some embodiments, the host 102 can store data to be stored in the storage device 101 and can also read data stored in the storage device 101.
[0097] In some embodiments, the host 102 runs normal business software. When the host 102 is maliciously invaded, it will secretly run ransomware software. Among them, the host 102 running the ransomware and the host 102 running the business software can be the same host (business node) or different hosts (business nodes). The business software is used to communicate with the storage device 101 and read and write data to the storage space of the storage device 101; the ransomware software is used to tamper with the data in the storage device 101, that is, to infect the data in the storage device 101.
[0098] Referring to Figure 1, the business software or ransomware software in the host 102 can write data to the storage device 101 through a data write instruction. The processor of the storage device 101 first writes the data to the storage device memory according to the front-end protocol for communicating with the host 102, and then flushes the data from the storage device memory to the hard disk to persist the data. In addition to the hard disk, other persistent storage media such as SSD can also be used, which is not limited in this application. In some embodiments, the front-end protocol can be a protocol such as SCSI, iSCSI, NFS or CIFS, which is not limited in this application.
[0099] The detection device 103 is used to perform infection detection on data, that is, to detect whether the data is infected by a ransomware virus. The detection device 103 runs anti-ransomware software, which is used to perform infection detection on the data in the storage device 101. Referring to Figure 1, the anti-ransomware software in the detection device 103 can query the data characteristics through the query interface provided by the storage device 101, and then determine whether the data is infected by a ransomware virus based on the acquired data characteristics.
[0100] In some embodiments, the host 102 and the detection device 103 can be in the form of a physical host (computing device), a virtual machine, a container, etc., which is not limited in this application. In some embodiments, the physical host can be a terminal device such as a smart phone, a desktop computer, and a laptop computer, which is not limited in this application.
[0101] In an embodiment of the present application, the processor of the storage device receives an infection detection request from the detection device, and can obtain data features of the target data based on the infection detection request, thereby outputting the data features of the target data to the detection device; the infection detection request is used to detect whether the target data is infected by a virus, and the data features are obtained by extracting features from the target data, and the data features are used by the detection device to detect whether the target data is infected by a virus. Exemplarily, the target data is written to the storage device 101 by the host 102; the infection detection request is sent by the detection device 103, and accordingly, the storage device 101 outputs the acquired data features to the detection device 103. Referring to Figure 1, the way in which the storage device 101 extracts features from data can be configured by an administrator (user), and exemplarily, the feature policy information configured by the user can be used to indicate the way in which features are extracted from data. The amount of target data is greater than the amount of data features of the target data. The target data to be detected is a file, such as a single file or a combination of multiple files.
[0102] When performing infection detection on target data in a storage device, the present application does not need to read a large amount of data and send it to the detection device. Instead, the processor of the storage device directly provides data features, thereby effectively reducing the communication load caused by data transmission, effectively reducing the performance consumption of the storage device, and improving the speed of infection detection on the data in the storage device; and, since frequent exposure of data to the outside of the storage device is avoided, the security of the data in the storage device is further improved.
[0103] In some embodiments, the network may be a wireless network or a wired network. The wireless network or wired network uses standard communication technologies and / or protocols. The network includes, but is not limited to, any combination of a data center network, a storage area network (SAN), a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or a virtual private network. In some implementations, technologies and / or formats including hypertext markup language (HTML), extensible markup language (XML), etc. are used to represent data exchanged over the network. In addition, conventional encryption technologies such as secure sockets layer (SSL), transport layer security (TLS), virtual private network (VPN), and internet protocol security (IPsec) can be used to encrypt all or part of the links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies.
[0104] In an embodiment of the present application, there may be multiple types of processors in the storage device. The data processing method provided by the present application will be further introduced below through multiple embodiments based on the implementation environment provided in FIG. 1 above.
[0105] The present application provides a flow chart of a data processing method, see FIG2 . The method is executed by a processor of a storage device, and the method includes the following steps 201 to 203 .
[0106] 201. A processor of a storage device receives an infection detection request from a detection device, where the infection detection request is used to detect whether target data is infected by a virus.
[0107] The interface card of the storage device receives the detection request and provides the detection request to the processor of the storage device.
[0108] For the functions of the detection device, refer to the introduction of the detection device 103 .
[0109] The infection detection request carries storage space information, which is used to indicate the target storage space where the detected data is located in the storage device. The storage space information can also be collectively referred to as the address of the detected data.
[0110] In some embodiments, the storage device uses different storage methods to store data. Accordingly, the storage space information used to describe the target storage space can be in different formats. For example, if the storage device uses block storage technology to store data, the storage space information may include the LUN where the file is located and the LBA under the LUN where the file is located; if the storage device uses a file system to manage and organize the stored data, the storage space information may include a file identifier (file ID), the range of the data segment to be detected (indicated by an offset), the LUN where the file is located, and the LBA under the LUN where the file is located, etc., thereby describing the target storage space where the data to be detected is located with different granularity; if the storage device uses object storage technology to store data, the storage space information may include object information and the range of the data segment to be detected (indicated by an offset), for example, the object information may include a bucket identifier (bucket ID) and an object name (key), etc. The above storage methods are only exemplary, and this application does not limit the storage methods that can be applied to the storage device. Based on this, the technical solution provided by this application can be effectively applied to storage devices under various storage methods.
[0111] In some embodiments, the infection detection request is sent by anti-ransomware software running on the detection device. The anti-ransomware software can perform infection detection on the data in the storage device to promptly detect data infected by the ransomware. The infection detection request can be sent to the target storage space during the anti-ransomware software's periodic detection process, or it can be triggered by an administrator for the target storage space, which is not limited in this application.
[0112] 202. The processor of the storage device obtains data features of the target data based on the infection detection request. The data features are obtained by performing feature extraction on the target data.
[0113] The following is an introduction to data features. In some embodiments, data is stored in files as basic units, and data features are also file features. Many different types of data can be stored in different types of files, for example, source programs or executable programs, numbers or text, images, music, videos, etc. Among them, a text file is a character sequence organized by lines or pages; a source file is a function sequence, each function includes its declaration and executable statements, etc.; an executable file is a plurality of code segments that can be loaded into memory for execution. In some embodiments, data features are extracted in units of files, for example, the data features of a text file are the information entropy of the character sequence in the file; in other embodiments, data features can be extracted in units of multiple data segments in a file, for example, the data features of an executable file include the information entropy of multiple code segments in the executable file. The principle of feature extraction is described in detail later (steps one and two), and will not be repeated here.
[0114] In the embodiment of the present application, the processor of the storage device further extracts features of the target data to obtain the data features during the process of executing tasks related to the target data storage.
[0115] The on-path calculation of data features includes, for example, the following situations: (1) when the host generates target data, the host CPU that generates the target data calculates the data features of the target data; (2) when the host sends the target data to the storage device, the host interface card (network card or DPU) that sends the target data calculates the data features of the target data; (3) when the interface card of the storage device receives the target data, the storage device interface card (network card or DPU) that receives the target data on the storage device calculates the data features of the target data; (4) when the CPU of the storage device processes the target data (for example, data compression, data decompression, storage space allocation, data verification, etc.), the on-path calculation of the data is performed. Here, "in the process" means, for example, that the target data is currently being processed; or, for example, that the target data is still in the memory accessible to the corresponding processor. For the four examples (1)(2)(3)(4) above, the target data can be located in the host memory, the memory accessible to the host interface card (depending on the situation, it can be the memory on the host interface card, or the host memory that is allowed to be accessed by the host interface card), the storage device memory, and the memory accessible to the storage device interface card (depending on the situation, it can be the memory on the storage device interface card, or the storage device memory that is allowed to be accessed by the storage device interface card).
[0116] That is to say, during the data storage process, before the data is generated and finally stored in the persistent storage medium, it will be processed by multiple processors with computing capabilities. These processes are all for the purpose of ultimate storage. The processors that the data passes through are the paths that the data is transmitted for the purpose of storage. In this application, in addition to performing calculations based on the purpose of data storage, these processors also perform other calculations on the data (for example, calculations of data features) without sending the data to other processors or other processing devices. These calculations are path-by-path calculations.
[0117] In this application, without changing the business interaction mode between the host and the storage device, the calculation task of the data features can be deployed in the processor of the storage device for execution, which is described in detail below.
[0118] In some embodiments, the manner in which the processor of the storage device performs feature extraction includes the following manner A and manner B.
[0119] Method A: The processor of the storage device extracts data features during the process of executing the data writing task.
[0120] In some embodiments, the data storage-related tasks performed by the storage device processor include data writing tasks.
[0121] Exemplarily, the processor of the storage device executes a data writing task for the target data before executing this step 202. In the process of writing the target data into the target storage space, the processor of the storage device extracts features of the target data and stores the data features of the target data in the form of metadata (of course, non-metadata storage can also be selected). Therefore, when the processor of the storage device receives an infection detection request, it can obtain data features from the stored metadata based on the infection detection request and output them directly to the detection device, thereby effectively improving the efficiency of infection detection. The principle of extracting data features by the storage device processor in the process of executing the data writing task is introduced in detail below through the following steps 1 and 2.
[0122] Step 1: In response to a write request from a host, the processor of the storage device extracts features of the target data to obtain data features before the target data is written into the target storage space of the storage device.
[0123] The write request carries the target data, and the target storage space is the persistent storage space provided by the storage device. This storage space is the local storage space of the storage device (provided by the local hard disk or local SSD of the storage device), or the remote storage space managed by the storage device. The processor of the storage device responds to the write request and divides the target storage space into storage spaces corresponding to the data to be written (target data). After the target data is written, the computing device can determine the storage space information of the target data based on the relevant information of the target storage space, for example, any one of the LUN and its LBA, file ID or object information. In some embodiments, the write request comes from the host 102 and is generated by the business software.
[0124] In some embodiments, the processor is a central processing unit (CPU) of a storage device (hereinafter referred to as the storage device CPU). The storage device CPU communicates with the storage device memory and the storage device interface card via a bus. During the storage device CPU's storage of target data, the storage device CPU performs calculations on the target data and generates data features. In this example, the storage device CPU performs a data write task, including a caching phase and a disk flushing phase.
[0125] It should be noted that traditional computers have only one processor, namely the central processing unit (CPU). With the development of computer technology, some storage devices have multiple processors. In addition to the original CPU (main processor), they also include multiple auxiliary processors. These auxiliary processors are distributed in components such as network cards, HBA cards, GPU cards, and RAID cards. The main processor and auxiliary processors are both processors in the device. In order to distinguish between the main processor and the auxiliary processor, unless otherwise specified, the "CPU" in each embodiment of this application refers specifically to the main processor (or main CPU), for example Company or A CPU manufactured by a company. The main CPU is typically installed directly on the storage device's motherboard, for example, by plugging it into the motherboard's CPU slot. The main CPU is responsible for the primary functions of the device (host, storage device) and manages other boards.
[0126] In the caching phase, the storage device CPU first writes the target data to the storage device memory. For example, the storage device interface card receives the target data, stores it in the interface card's input / output (IO) registers, and sends instructions to the storage device CPU. Upon receiving the instructions, the storage device CPU reads the target data from the IO registers into the CPU registers, and then writes the data from the CPU registers to the storage device memory. In the flushing phase, the storage device CPU flushes the target data from the storage device memory into the persistent storage space, that is, writing it to the target storage space on the storage device.
[0127] In some embodiments, the storage device CPU extracts features from the target data before writing the target data into the target storage space. Writing the target data into the target storage space refers to persisting the target data in the target storage space, as described above with reference to the cache and flush stages.
[0128] One possible scenario is that the storage device CPU synchronously calculates the data features of the target data during the disk flushing phase. For example, assuming the target storage space is a target data block on a hard drive, the storage device CPU simultaneously calculates the data features of the target data while flushing the target data from the storage device's memory into the target data block. In some embodiments, the storage device CPU divides the data writing task into multiple time periods for execution. Exemplarily, the storage device CPU utilizes multiple threads for background scheduling, asynchronously executing the disk flushing operation and the data feature calculation operations. The storage device CPU rotates between time periods based on different threads, with different threads performing the disk flushing operation and the data feature calculation operations, respectively. For example, the first thread performs the disk flushing operation, while the second thread performs the feature calculation operation for the data in memory. For example, the time period refers to a CPU time slice. One implementation of the above process is: the disk flushing operation for data segment 1 in the data is performed during CPU time slice 1, the data feature calculation operation for data segment 1 is performed during CPU time slice 2, which follows CPU time slice 1, and the disk flushing operation for data segment 2 is performed during time slice 3, which follows CPU time slice 2, and so on.
[0129] Another possible scenario is that the storage device CPU calculates the data characteristics of the target data after the disk flushing phase is complete. For example, if the target storage space is a target data block on the hard disk, the storage device CPU calculates the data characteristics of the target data after the target data has been written from the storage device memory to the target data block.
[0130] Another possible scenario is that the storage device CPU calculates data features of the target data along the way while transferring the target data from the register to the storage device memory during the cache phase.
[0131] In other embodiments, the processor is a processing unit of a storage device interface card (referred to as a storage interface card processor), which is managed by the storage device CPU and further communicates with the host through a network. In this example, when the storage device interface card receives target data sent by the host, the storage interface card processor can calculate the target data to generate data features. The processing unit of the interface card can be The processor chips produced by the company are either application-specific integrated circuit (ASIC) processors, field-programmable gate array (FPGA) processors, or a combination thereof.
[0132] Exemplarily, the storage interface card processor can complete the extraction of data features in the above-mentioned cache stage. In the cache stage, the storage device interface card receives the target data from the host, and the storage interface card processor can extract features of the target data, and then in the process of transferring the target data to the storage device memory (storage device main memory), the data features are also transferred to the cache in the storage device memory. For example, the storage device interface card can apply to the storage device CPU for the right to use the bus through direct memory access (DMA), thereby writing the target data to the storage device memory without the need for CPU scheduling. In this process, the storage interface card processor can calculate data features along the way. It should be noted that the cache stage of the storage interface card processor, in addition to referring to the stage where the target data is cached in the storage device memory, can also refer to the stage where the target data is cached in the cache built into the storage interface card.
[0133] The above technical solution introduces the principle of calculating data features along the way when the storage device CPU and storage interface card processor perform data storage related tasks. Among them, the storage device interface card serves as a communication interface in the storage device. Its original function involves processing target data, such as parsing data packets (such as TCP packets, UDP packets), mapping and converting data storage addresses, decompressing data, encrypting data, rewriting the header of data packets, connection tracking, statistics on received data, calculation of erasure codes for data, NVMe-oF acceleration, NVMe / TCP acceleration, IO virtualization (VirtIO) acceleration, hierarchical QoS for different data, SDN acceleration, etc. On this basis, using the storage interface card processor to calculate data features along the way can efficiently utilize the computing power of the interface card and its network interface position in the transmission link, thereby achieving the effect of reducing communication delay, improving computing efficiency, and reducing overall energy consumption.
[0134] Through the above technical solution, the computing and storage loads brought about by the processes of reading data, calculating data features, and storing data features can be unloaded from the detection device that performs infection detection to the storage device CPU and storage interface card processor in the data transmission link. In some embodiments, the interface card is an intelligent network card (the data processing unit DPU can also be regarded as a kind of intelligent network card). The interface card can also be replaced with a communication module or network device integrated with a DPU, which is not limited in this application. The network card can offload the data processing functions in the network, storage, and operating system to the hardware for execution, thereby improving the data processing capabilities of the storage device and releasing the CPU computing power. Therefore, the network card assumes the processing work of the storage device, which can reduce the computing load of the storage device and improve the data processing efficiency.
[0135] Step 2: The processor of the storage device stores the data features as metadata of the data in the target storage space.
[0136] In some embodiments, the processor of the storage device may store the data features as metadata of the data in a variety of ways. Two optional storage methods are described below.
[0137] Storage method 1. Metadata is stored centrally.
[0138] In some embodiments, the storage space of a storage device is divided into a metadata storage space dedicated to storing metadata and a storage space not dedicated to storing metadata. The processor of the storage device can store the data characteristics as metadata for the data in the target storage space in the metadata storage space. Storing metadata and data in different storage spaces facilitates metadata management.
[0139] In some embodiments, the storage device uses object storage technology to store data, the data is stored in a data server, and the metadata of the data is stored in a metadata server. The target storage space is the storage space in the object server. For example, object 1 (object1) in bucket A (bucket A), the metadata storage space can be the metadata storage space corresponding to bucket A in the metadata server.
[0140] Storage method 2: Metadata is stored together with data.
[0141] In some embodiments, the storage device stores the data features in the target storage space as metadata for the data. In this example, the data features are part of the metadata, and the storage device stores the data and metadata in a continuous data segment. Storage Method 2 maintains the associated storage of metadata and data, thus preventing the metadata from being unavailable due to a metadata server failure when metadata is centrally stored. This reduces the impact of failures on metadata access and improves storage reliability.
[0142] To facilitate understanding, the present application provides a schematic diagram of storing metadata, referring to Figure 3. In Figure 3, taking the data feature as information entropy as an example, the metadata of data 1 includes information entropy 1, and the metadata of data 2 includes information entropy 2; part (a) in Figure 3 is storage method 1, data 1 and data 2 are stored in the target storage space, and information entropy 1 and information entropy 2 as metadata are stored in the metadata storage space; part (b) in Figure 3 is storage method 2, data 1 and information entropy 1 are stored in a continuous storage space in the target storage space, and data 2 and information entropy 2 are stored in the next continuous storage space in the target storage space.
[0143] Method B: When the processor of the storage device receives an infection detection request, it extracts data features in real time.
[0144] In some embodiments, after receiving an infection detection request, the processor of the storage device performs feature extraction on the data stored in the target storage space indicated by the infection detection request based on the infection detection request to obtain the data feature, and then outputs the data feature calculated in real time to the detection device.
[0145] In some embodiments, the storage device provides a query interface to the detection device for querying data characteristics. The anti-ransomware software can use the query interface to send an infection detection request to the storage device, including storage space information such as the LUN and file ID, thereby instructing the storage device to obtain the data characteristics of the target data and output them to the detection device.
[0146] In some embodiments, the query interface defines the format of the infection detection request and the format of the response message to the request. Exemplarily, the infection detection request includes storage space information (including LUN / file ID and data segment range). In other embodiments, the infection detection request also carries an identifier indicating whether feature extraction is to be performed and the sampling method used when extracting features from the data (such as the sampling ratio). Accordingly, the response message includes the data features corresponding to the data (which can be at least one of the set and distribution features composed of the following interval data features).
[0147] The above provides a technical solution for extracting data features in real time. Data features are not calculated when data is written. Instead, the stored data is read to calculate data features when an infection detection request is received. This can effectively reduce the load of data transmission, and can also effectively reduce the storage pressure of storage devices and improve the performance of storage devices.
[0148] To facilitate understanding of the execution flow of the above-mentioned method B, the present application provides a schematic diagram of a data processing method, see Figure 4, wherein the storage device receives an infection detection request sent by the anti-ransomware software through a query interface, and the infection detection request carries information such as the LUN or file ID of the corresponding data; the data feature processing module in the storage device reads data from the target storage space according to the information carried by the infection detection request, calculates the data features, and returns the calculated data features to the query interface, wherein the data feature processing module can be included in a data processing module, which is a logical representation that indicates the functional module in the storage device responsible for processing data, such as the CPU.
[0149] The above-mentioned methods A and B mainly introduce various execution subjects and various execution times of the behavior of calculating data features. The following introduces the specific process of feature extraction by the processor of the storage device. The methods provided in the following steps 1 and 2 are applicable to any of the above-mentioned execution subjects at any execution time.
[0150] In an embodiment of the present application, the processor of the storage device extracts features of the data stored in the target storage space, and the process of obtaining data features can be implemented through the following steps one and two.
[0151] Step 1: According to the sampling method for the target storage space, feature extraction is performed on the data of at least one unit sampling interval of the target storage space to obtain at least one interval data feature of the unit sampling interval.
[0152] In the embodiments of the present application, the data feature may be the information entropy of the data, which is used to indicate the uncertainty of the data. When data is tampered with due to a virus infection, the uncertainty increases significantly. Therefore, whether the data is infected can be determined by whether there is a significant change in the information entropy. Accordingly, the interval data feature of the unit sampling interval is the information entropy of the data segment corresponding to the unit sampling interval.
[0153] In other embodiments, the data feature may also be a digest of the data. In some embodiments, a data digest may be generated using a variety of digest generation algorithms, thereby uniquely identifying a segment of data using the digest. When data is tampered with due to virus infection, its digest will also change. Therefore, whether the digest changes can be used to determine whether the data is infected. Exemplarily, the digest generation algorithm may be Message-Digest Algorithm 5 (MD5) or Secure Hash Algorithm 1 (SHA1), although this application does not limit this.
[0154] The sampling method indicates a method for extracting data from the target storage space for calculating data features. In some embodiments, the sampling method indicates a sampling ratio: 1 KB of data is extracted for every 10 kilobytes (KB) for calculating data features. In this example, the unit sampling interval can be determined according to the data segment size defined by the sampling ratio. For example, if 1 KB of data is extracted for every 10 kilobytes (KB), the unit sampling interval is a 10 KB data segment.
[0155] In some embodiments, the sampling method indicates the sampling frequency and the amount of sampled data: 100 points are extracted for every 1MB of data, and 1KB of data is extracted at each sampling point for calculating data features. In some embodiments, the sampling method also indicates the location at which the data segment is sampled. For example, for a 10KB data segment, the sampling method may indicate that the first 1KB of data of the data segment is extracted for calculating data features. In this example, the unit sampling interval can be determined based on the size of the data in the target storage space and the sampling method. The size of the data in the target storage space can be determined based on the offset.
[0156] Table 1 is a data feature table provided by this application. Taking the data with a file ID or logical unit number LUN of "1234" as an example, the storage location 1MB away from the initial address of the file "1234" is used as the starting address for calculating the offset. According to the sampling method of sampling 1KB every 10KB, the data segment with an offset of 1MB is subjected to feature extraction. The obtained information entropy is shown in Table 1 below.
[0157] Table 1
[0158] As shown in Table 1, with 0KB as the starting point for sampling, the information entropy calculated for sampling 1KB of data within the unit sampling interval from 0KB to 10KB is 3.2; the information entropy calculated for sampling 1KB of data within the unit sampling interval from 10KB to 20KB is 3.1. The following is similarly explained and will not be further elaborated here. "..." in Table 1 indicates omission. The information entropy in Table 1 is also the interval data characteristics corresponding to the unit sampling interval.
[0159] The above technical solution can improve the representativeness of data features to the overall data by sampling data in partitioned intervals, and improve the accuracy of subsequent infection detection based on data features.
[0160] In other embodiments, the sampling method also indicates a method for performing statistical analysis on the data features. For example, if 100 points are extracted from every 1MB of data for data feature calculation, 100 data feature points will be obtained. The statistical analysis method can include classifying the data of each data feature point and performing quantitative statistics on each classification.
[0161] In some embodiments, the feature extraction algorithm can also be indicated by a sampling method. The sampling method can be stored in the form of feature strategy information. Exemplarily, the feature strategy information includes multiple fields. Among them, the first field is used to record the sampling ratio; the second field is used to record the sampling frequency and the amount of sampled data; the third field is used to record the sampling starting position, for example, the third field value is 1, indicating that the extraction starts from the 1KB, and the third field value is 0, indicating that the extraction starts from the last 1KB; the fourth field is used to record the feature extraction algorithm, for example, the fourth field value is 1 to indicate the information entropy algorithm, the value is 2 to indicate MD5, and the value is 0 to indicate SHA1.
[0162] In some embodiments, a storage device can provide a user with a feature policy information configuration service in the form of an application programming interface. In response to a feature policy configuration instruction for the storage device, the storage device obtains feature policy information specific to the storage device. This feature policy information indicates a sampling method for extracting features from data stored in the storage device. Exemplarily, more or fewer fields corresponding to the feature policy information can be configured via user input.
[0163] The above technical solution provides a flexible and configurable data feature extraction mechanism that can extract data in a variety of sampling methods and flexibly switch between a variety of feature extraction algorithms for various types of data features. While improving data processing efficiency, it can also improve the effectiveness of data features of different dimensions for infection detection.
[0164] Step 2: Generate data features of the data in the target storage space based on at least one interval data feature.
[0165] In some embodiments, the set consisting of the at least one interval data feature can be directly determined as the data feature of the data in the target storage space. As shown in Table 1, Table 1 is a tabular form of the set consisting of at least one interval data feature. The "information entropy" of the multiple unit sampling intervals corresponding to the data "1234" in Table 1 is also the multiple interval data features of the data. In this example, the data feature of the data in the target storage space is also the information entropy of multiple data segments.
[0166] Through the above method, the data characteristics can be determined with the data sampling interval as the granularity, thereby providing reliable data support for infection detection, thereby improving the speed and accuracy of infection detection.
[0167] In other embodiments, a distribution characteristic of at least one unit sampling interval can be determined based on the number of unit sampling intervals corresponding to at least one type of the interval data feature, and the distribution characteristic can be determined as a data characteristic of the data within the target storage space. The distribution characteristic indicates the distribution of the number of unit sampling intervals of the target storage space for different types of the interval data feature. For example, if the interval data feature is information entropy, each information entropy can be considered a type. Referring to Table 1, the interval data feature types corresponding to file ID "1234" include "3.1" and "3.2." Accordingly, the number of unit sampling intervals corresponding to each information entropy can reflect the statistical distribution characteristics of the data feature of the data within the target storage space.
[0168] Table 2 is a data distribution feature table provided by this application. For the file with file ID or LUN "1234", the storage location 1MB away from the initial address of the file "1234" is used as the starting address for calculating the offset. According to the sampling method of sampling 1KB every 10KB, the data segment with an offset of 1MB is subjected to feature extraction. The obtained information entropy includes three values of "3.1", "3.2" and "3.3". The data distribution characteristics of the file "1234" are shown in Table 2 below.
[0169] Table 2
[0170] As shown in Table 2, the number of unit sampling intervals with an information entropy of 3.1 is 10; the number of unit sampling intervals with an information entropy of 3.2 is 50; and the number of unit sampling intervals with an information entropy of 3.3 is 38. "..." in Table 2 indicates omission. The information entropy in Table 2 is also the interval data feature corresponding to the unit sampling interval.
[0171] Through the above method, the data characteristics of the data can be determined from the perspective of statistical distribution, so that data segments with abnormal data characteristics can be quickly detected, thereby improving the speed and accuracy of infection detection.
[0172] In some embodiments, the data feature of the data may be at least one of the set and distribution features of the above-mentioned interval data features, which is not limited in this application.
[0173] 203. The processor of the storage device outputs data features of the target data to the detection device. The data features are used by the detection device to detect whether the data is infected by a virus.
[0174] The storage device communicates with the detection device via an interface card. Therefore, if the storage device's processor is the storage device's CPU, the CPU outputs the target data's data characteristics to the detection device via the interface card. If the storage device's processor is a processor in the storage device's interface card, the target data's data characteristics are output directly to the detection device via the interface card, without passing through the CPU.
[0175] The introduction of the detection equipment can be referred to the introduction of the detection equipment 103 and will not be repeated here.
[0176] In some embodiments, the storage device provides a query interface for querying data features. Anti-ransomware software running on the detection device can use the query interface to send an infection detection request to the storage device, including storage space information such as LUNs and file IDs. After obtaining the data features, the storage device sends a response message to the infection detection request containing the corresponding data features (which may be at least one of the set and distribution features of the aforementioned interval data features).
[0177] When performing infection detection on target data in a storage device, the present application does not need to read a large amount of data and send it to the detection device. Instead, the processor of the storage device directly provides data features, thereby effectively reducing the communication load caused by data transmission, effectively reducing the network congestion between the storage device and the detection device caused by virus detection, and improving the speed of infection detection for data in the storage device; and, since frequent exposure of data to the outside of the storage device is avoided, the security of the data in the storage device is further improved.
[0178] Furthermore, multiple methods are provided for extracting data features at different times, enabling flexible use in different storage scenarios. Storage devices also provide a customizable and scalable data offload mechanism, allowing users to configure feature extraction strategies for data, greatly improving the method's usability across different types of storage devices.
[0179] The present application also provides another data processing method, which is a custom virus detection method provided by a storage system. The method supports user-defined custom metadata for virus detection in the storage system (or storage device), as well as detection rules for the custom metadata. In the present application, the storage device processor responds to an infection detection request and outputs a detection result based on the custom metadata and detection rules of the data. In one possible implementation, the storage device receives a write request from a host, which carries target data and custom metadata. The custom metadata is used to perform virus infection detection in the storage device. Exemplarily, the custom metadata can be a reliability identifier (such as the integrity tag of NFSv4), a key, a specific string, or attribute data of a custom type provided by the front-end protocol. The custom metadata can also be associated with a business system, for example, a reliability identifier carried by data written to the storage device by normal business software, or a business identification ID associated with the business software or business system. The custom metadata can also be meaningless characters (such as magic numbers) that do not affect the data's functionality, but the present application is not limited to this. The custom metadata can serve as a security identifier when data is normally written, and is used to determine whether the data is infected during subsequent infection detection.
[0180] In some embodiments, upon receiving an infection detection request from any device for data in the storage device, the processor of the storage device performs ransomware detection based on the custom metadata of the data. The device sending the infection detection request can be a host or a detection device, which is not limited in this application.
[0181] In some embodiments, data infection can cause changes in custom metadata. Therefore, whether the data is infected can be determined by detecting whether the custom metadata has changed. For example, if the custom metadata does not meet the target value or is not within the target value range, a first detection result is output, which indicates that the data has been tampered with, that is, the data is suspected of being infected by a ransomware virus; if the custom metadata meets the target value or is within the target value range, a second detection result is output, which indicates that the data has not been tampered with, that is, the data has not been infected by a ransomware virus. Based on this, the storage device can efficiently provide reliable infection detection results to the outside world based on customized detection rules without exposing the data, thereby improving data security. Moreover, if the storage device obtains the first detection result, it can directly output the conclusion of being infected by a ransomware virus; or output the possibility of being infected; or, it can further perform more accurate infection detection on the data based on data features and ransomware detection algorithms, thereby outputting a ransomware detection result that can be used as a reference. The above detection rules based on the target value range and target data are only one possible implementation method. The detection rules can be different depending on the type of custom metadata, and the present application is not limited to this.
[0182] Through the above technical solution, it is possible to customize metadata using information such as storage protocols or business identifiers, and adopt customized detection rules to efficiently determine whether data has been ransomed, thereby improving the efficiency and speed of infection detection.
[0183] Figure 5 is a schematic diagram of a verification principle based on custom metadata provided by the present application. Referring to Figure 5, the business system carries custom metadata when writing data, and the storage device persists the custom metadata in the hard disk. When the storage device receives an infection detection request for the data, it can read the persisted custom metadata and perform ransomware detection according to the detection rules. If the custom metadata in the current data has been tampered with, the conclusion of ransomware infection can be directly output; or the possibility of infection can be output; or, a ransomware detection algorithm can be used to further detect whether the data is infected by the virus.
[0184] In some embodiments, the detection device and storage device described above can be considered a data processing system that collaboratively implements data infection detection. The following describes the interaction between the detection device and the storage device based on the contents of Figures 1 to 5 above. This application provides a schematic diagram of a data processing method, see Figure 6 . The data processing method includes the following steps 601 to 604 , where the functions of the detection device refer to detection device 103 .
[0185] 601. A detection device sends an infection detection request to a storage device, where the infection detection request is used to detect whether target data in the storage device is infected by a virus.
[0186] The infection detection request in this step refers to the description of the infection detection request in step 201 and is not described in detail. In some embodiments, the detection device sends the infection detection request to the query interface.
[0187] 602. The storage device receives an infection detection request and obtains data features of target data based on the infection detection request. The data features are obtained by performing feature extraction on the target data.
[0188] This step refers to step 201 and step 202 and is not described in detail here.
[0189] 603. The storage device outputs the data features of the target data to the detection device.
[0190] This step refers to step 203 and is not described in detail here.
[0191] 604. The detection device detects whether the target data is infected by a virus based on the data feature.
[0192] In some embodiments, the data characteristic is information entropy, which indicates the uncertainty of the data. The implementation process of this step 604 includes: if the information entropy exceeds a target information entropy range, the data is determined to be infected by a virus, and the target information entropy range indicates the range of information entropy of uninfected data. The target information entropy range can be set by an administrator or periodically updated based on the sampling results of the information entropy of normal data, which is not limited by this application.
[0193] In some embodiments, the data feature is a digest, which is a fragment extracted from the data and used to identify the data. The implementation process of step 604 includes: if the obtained digest of the data is inconsistent with the verification digest, determining that the data is infected by a virus, where the verification digest is the digest of the data stored by the detection device when the data was not infected. In some embodiments, the verification digest is the digest of the data stored when the data was last detected for infection and determined to be uninfected.
[0194] The technical solution provided by this application eliminates the need to read large amounts of data and send them to a detection device requesting infection detection. Instead, the storage device directly outputs the determined data features, effectively reducing the communication load associated with data transmission and, consequently, the network congestion between the storage device and the detection device caused by virus detection. The detection device can perform detection directly based on the acquired data features, saving the time associated with disk reading and data transmission and increasing the speed of infection detection for data in the storage device. Furthermore, by avoiding frequent data exposure outside the storage device, the security of the data in the storage device is further enhanced.
[0195] The embodiments corresponding to Figures 2 and 6 use the processor in the storage device as the execution subject to introduce the data processing method provided by the present application. In other embodiments, the process of extracting data features can be executed by the host in the present application, thereby unloading the computing and storage loads brought about by the processes of reading data, calculating data features and storing data features from the detection device that performs infection detection to the host. Among them, the host interface card serves as a communication interface on the host side, and its original function involves the processing of target data, such as the encapsulation of data packets, the mapping and conversion of data storage addresses, etc. On this basis, the host interface card processor is used to calculate data features along the way, which can efficiently utilize the computing power of the interface card and its network interface position in the transmission link, thereby achieving the effect of reducing communication delay, improving computing efficiency, and reducing overall energy consumption.
[0196] In some embodiments, the process of the host determining the data features includes two situations. One possible situation is: the host CPU calculates the data features, referring to the above-mentioned case (1) of on-path calculation of data features. Specifically, the host CPU performs on-path calculation on the target data in the process of generating target data to generate data features. Another possible situation is: the processing unit of the host interface card (referred to as the host interface card processor) calculates the data features, referring to the above-mentioned case (2) of on-path calculation of data features. In the process of sending target data to the storage device, the host interface card processor performs on-path calculation on the target data to generate data features.
[0197] Based on this, the storage device receives the data feature from the host, and sends the data feature to the storage medium of the storage device for persistent storage in the same manner as above, for example, storing the data feature as metadata of the data in the target storage space.
[0198] In some embodiments, data features can also be calculated along the way by a network device between the host and the storage device. A network device refers to a hardware device used to interconnect devices such as servers, personal computers, and terminals to form a communication network. Exemplarily, the network device can be a switch, router, firewall, bridge, hub, gateway, network card, or wireless access point (WAP), etc., which is not limited in this application.
[0199] In some related technologies, the anti-ransomware software that performs infection detection obtains data from the storage device to perform ransomware detection based on the obtained data. The calculation operations in this process are undertaken by the processor of the detection device running the anti-ransomware, and the calculation and storage of data features also rely on the running memory of the anti-ransomware. Therefore, the speed of ransomware detection is limited to the performance of the detection device, which makes the speed of infection detection not high. In the data processing method provided by the present application, the process of calculating data features can be executed in parallel by the storage device CPU, the interface card of the storage device, the host CPU, the host interface card and other network devices, thereby effectively unloading the calculation and storage load from the detection device that performs infection detection to the storage device and the entire data transmission link, reducing the network congestion between the storage device and the detection device caused by virus detection, and improving the speed of infection detection for data in the storage device.
[0200] The following summarizes the principles of the data processing method implemented by the processor of the storage device, the host, and other execution entities described above. Figure 7 is a schematic diagram of a data processing method provided by an embodiment of the present application. The basic architectural principles of Figure 7 can be referred to the description of Figure 1. Referring to Figure 7, the solid black arrows indicate data transmission, and the dashed black arrows indicate connection relationships, that is, the host interface card and the storage interface card are connected, and the detection device is connected to the storage interface card.
[0201] In FIG. 7 , the feature policy information can be configured by the user through an application program interface provided by the storage device. Please refer to the configuration process of the feature policy information described above, which will not be described in detail here.
[0202] In Figure 7, the link indicated by A1 corresponds to the process described in method A, in which the storage device CPU calculates data features along the way during the disk flushing phase: when writing data, the data is sampled according to the LUN and its LBA or the offset of the file / object; according to the sampling method (refer to step 1); then, based on the sampled data, the information entropy of the data is calculated, and the information entropy is determined as the metadata of the data (the metadata also includes the offset and the data length); thereby, the information entropy is persisted to the hard disk as part of the metadata.
[0203] In Figure 7, the link indicated by A2 corresponds to the process of asynchronously calculating data features in the storage device by background scheduling as described in Method A. The principle is similar to that of A1. Optionally, the background asynchronous calculation of data information entropy can be based on a user-defined feature sampling strategy.
[0204] In FIG7 , the link indicated by B corresponds to the process of extracting data features in real time as described in Method B: upon receiving an online infection detection request, information entropy is calculated in real time or data features are calculated based on user-defined feature strategy information.
[0205] In Figure 7, the link indicated by C1 corresponds to the case where the host interface card calculates data features along the way. In this case, the data feature calculation is offloaded to the host-side network transmission. The host interface card can be a DPU or a network device containing a DPU module. The principle is similar to A1. The storage device provides a metadata write interface for the interface card.
[0206] In Figure 7, the link indicated by C2 corresponds to the case where the storage interface card calculates data features along the way. In this case, data feature calculation is offloaded to the network transmission on the storage side. The interface card includes the DPU. The principle is similar to A1. The storage device provides the DPU with a metadata write interface. The interface card can calculate information entropy in real time or calculate data features based on user-defined feature policy information.
[0207] When performing infection detection on data in a storage device, the present application does not need to read a large amount of data and send it to the node requesting infection detection. Instead, the storage device directly provides the data features of the data, effectively reducing the communication load caused by data transmission, thereby effectively reducing the network congestion between the storage device and the detection device caused by virus detection, and improving the speed of infection detection on data in the storage device. In addition, multiple methods are provided, and multiple types of processors are used to extract data features at different times, so that different storage scenarios can be flexibly applied. The storage device also provides a custom, extensible data unloading mechanism, and the user can configure the policy information for feature extraction of the data, greatly improving the availability of the method in different types of storage devices.
[0208] Furthermore, the execution entity of the data feature extraction process can be extended from the processor of the storage device and the processor of the storage interface card to the host processor and host interface card in the data transmission link. Whether on the service side or the client side of the storage device, the data processing method provided by this application can be used, so that the entire process can realize in-path computing along the data transmission link. The computing and storage loads of the storage device can be offloaded to other hardware as needed, greatly improving the speed of infection detection.
[0209] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, storage, display, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the files and metadata involved in this application were obtained with full authorization.
[0210] The hardware structure of the device involved in this application is introduced below.
[0211] An embodiment of the present application provides an interface card, including an interface and the processor described above, wherein:
[0212] The interface is used to install the interface card in the storage device and, after the interface card is installed in the storage device, communicate with the storage device's central processing unit. The processor executes the aforementioned data processing method after the interface card is installed in the storage device. The interface card is, for example, a network interface card (NIC) with computing capabilities (also known as a Smart NIC), and the data processing unit (DPU) is a type of Smart NIC.
[0213] The present application also provides a processor, which includes: a power supply circuit for providing power to a processing circuit; and a processing circuit connected to the power supply circuit for executing the data processing method provided by the processor in the aforementioned embodiment. This processor can be a CPU or a processor in an interface card. In addition to referring to a type of interface card, DPU can also specifically refer to the processor chip in the interface card. Therefore, in one possible embodiment, the processor in the interface card is a data processing unit (DPU).
[0214] An embodiment of the present application provides a storage device. Schematically, referring to FIG8 , FIG8 is a schematic diagram of the hardware structure of a storage device provided by an embodiment of the present application. As shown in FIG8 , the storage device 800 includes a memory 801, a processor 802, an interface card 803, and a bus 804. Among them, the memory 801, the processor 802, and the interface card 803 are connected to each other through the bus 804. Among them, the bus 804 is a PCI bus or a PCIe bus, the processor 802 and the memory 801 communicate through the memory bus (e.g., an address bus), the number of the processor 802 is one or more, and the interface card 803 is capable of communicating with the host.
[0215] The memory 801 can be a read-only memory (ROM) or other types of static computing devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic computing devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic computing device, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer, but is not limited to this. The processor 802 implements the data processing method in the following embodiments by reading the program code stored in the memory 801, or the processor 802 implements the data processing method in the embodiment of the present application through the internally stored program code. When the processor 802 implements the data processing method according to the embodiment of the present application by reading the program code stored in the memory 801, the program code for implementing the data processing method according to the embodiment of the present application can be stored in the memory 801. The memory 801 can also store metadata, etc., which is not limited in the embodiment of the present application.
[0216] Processor 802 is a central processing unit (CPU), an ASIC, or an integrated circuit used to control program execution in the present application. Processor 802 can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. There can be one or more processors 802. Interface card 803 uses a transceiver module, such as a transceiver, to enable communication between computing device 800 and other devices or communication networks. For example, data can be obtained through interface card 803.
[0217] The memory 801 and the processor 802 may be provided separately or integrated together.
[0218] The bus 804 may include a path for transmitting information between various components of the computing device 800 (eg, the memory 801 , the processor 802 , and the interface card 803 ).
[0219] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items having substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is the quantity and execution order limited. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the various described examples, a first file can be referred to as a second file, and similarly, a second file can be referred to as a first file. Both the first file and the second file can be files, and in some cases, can be separate and different files.
[0220] In this application, the term "at least one" means one or more, and the term "plurality" means two or more. For example, a plurality of files refers to two or more files.
[0221] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
[0222] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of program structure information. The program structure information includes one or more program instructions. When the program instructions are loaded and executed on a device, all or part of the processes or functions described in the embodiments of the present application are generated.
[0223] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0224] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing method, It is characterized in that The method is executed by a processor in a storage device, the storage device is used to provide storage services for a host, the storage device communicates with a detection device, and the method includes: Receiving an infection detection request from a detection device, and acquiring data features of target data based on the infection detection request, wherein the infection detection request is used to detect whether the target data is infected by a virus, and the data features are obtained by extracting features from the target data; The data features of the target data are output to the detection device, where the data features are used by the detection device to detect whether the data is infected by a virus.
2. The method according to claim 1, It is characterized in that The processor further performs feature extraction on the target data to obtain the data feature during the process of executing the task related to the target data storage.
3. The method according to claim 2, It is characterized in that The processor further extracts features of the target data to obtain the data features during the execution of the task related to the target data storage, including: The processor is a storage device CPU, and in the process of the storage device CPU storing the target data, the storage device CPU calculates the target data to generate the data feature, and the storage device CPU is connected to a storage interface card; or The processor is the processing unit of the storage device interface card, and the storage device interface card further communicates with the host through a network. During the process of the storage device interface card receiving the target data sent by the host, the processing unit of the storage device interface card calculates the target data to generate the data feature.
4. The method according to claim 1, It is characterized in that Before obtaining the data features of the target data, it further includes: receiving the data characteristic from the host; The data features are sent to the storage medium of the storage device for persistent storage.
5. The method according to claim 4, It is characterized in that Before receiving the data feature from the host, the process of the host determining the data feature includes: In the process of the host CPU generating the target data, the host CPU calculates the target data to generate the data feature; or, In the process of the interface card of the host sending the target data to the storage device, the processing unit of the host interface card calculates the target data to generate the data feature.
6. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: In response to a write request from the host, before the target data is written into a target storage space of the storage device, extracting features of the target data to obtain the data features, wherein the write request carries the target data, and the target storage space is a persistent storage space provided by the storage device; Storing the data features as metadata of the data in the target storage space; The acquiring data features of the target data based on the infection detection request specifically includes: Based on the infection detection request, the data feature is obtained from the metadata.
7. The method according to claim 6, It is characterized in that The storage space of the storage device is divided into a metadata storage space dedicated to storing metadata and a storage space not dedicated to storing metadata, and the step of storing the data feature as metadata of the data in the target storage space includes: In a metadata storage space in the storage device that is dedicated to storing metadata, the data feature is stored as metadata of the data in the target storage space.
8. The method according to any one of claims 1 to 3, It is characterized in that Based on the infection detection request, data features of the target data are obtained, including: Based on the infection detection request, feature extraction is performed on the target data stored in the target storage space indicated by the infection detection request to obtain the data feature.
9. The method according to any one of claims 1 to 8, It is characterized in that The method further comprises: In response to the feature policy configuration instruction, feature policy information for the storage device is obtained, where the feature policy information indicates a method for extracting features from data in the storage device.
10. The method according to any one of claims 1 to 9, It is characterized in that The data feature is specifically the information entropy of the target data or the summary of the target data, the information entropy is used to indicate the uncertainty of the target data, and the summary is a fragment extracted from the data and used to identify the data.
11. A processor, include: A power circuit, used to provide power to the processing circuit; The processing circuit is connected to the power supply circuit and is used to execute the method according to any one of claims 1-10.
12. A storage device, comprising an interface card and the processor according to claim 1, wherein the processor is the storage device CPU, the interface card is used to communicate with a host, the storage device is used to provide storage services for the host, and the processor is used to execute the method according to any one of claims 1-10.
13. An interface card comprising an interface and the processor according to claim 1, in: The interface is used to install the interface card in the storage device and to communicate with the central processor of the storage device after the interface card is installed in the storage device; The processor, after the interface card is installed in the storage device, executes the method according to any one of claims 1 to 10.
14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium is used to store program codes, and the program codes are used to execute the data processing method according to any one of claims 1 to 10.
15. A computer program product, It is characterized in that When the computer program product is executed on a computer, the computer is caused to execute the data processing method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Data processing method, processor, storage device, interface card and storage medium
CN118536108A
Message processing method and device, computer equipment and storage medium
CN114896086A
Data processing method and system and storage medium
CN115048227A
Storage apparatus and method for controlling storage apparatus
US20150058658A1
Cited By
Computing power resource network storage method and device of intelligent computing center cloud platform
CN120475039A
