Heterogeneous computing encrypted file processing method, program product and heterogeneous computing system

By inserting a transparent file system into the operating system and calling FPGA in the write-back process for encryption operations, the problem of resource occupation and low performance caused by frequent hardware interaction in heterogeneous computing is solved, and efficient encrypted file write-back is achieved, which reduces system energy consumption and FPGA aging speed, and improves system performance and response speed.

CN120408686AActive Publication Date: 2025-08-01INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202510897189.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-08-01
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

In encrypted heterogeneous computing systems, frequent encryption operations and disk write requests increase system energy consumption and computing resource consumption, resulting in reduced response speed and poor performance, accelerated FPGA aging speed and increased maintenance costs.

Method used

By inserting a transparent file system into the operating system, cache data when a write back operation is received and FPGA is called for encryption operations when the write back process is triggered, the cache allocation and write back of the encrypted data is realized, reducing the frequency of hardware interaction.

Benefits of technology

It improves the system's response speed and overall performance, reduces system energy consumption and computing resource consumption, delays the aging speed of FPGAs, reduces maintenance costs, and improves resource utilization and data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408686A_ABST
    Figure CN120408686A_ABST
Patent Text Reader

Abstract

The invention discloses an encrypted file processing method for heterogeneous computing, a program product and a heterogeneous computing system, and belongs to the technical field of computers. The heterogeneous computing encrypted file processing method comprises the steps of caching to-be-processed data to a memory cache region in a transparent file system under the condition that write operation is received; when it is detected that an operating system triggers a write-back process, calling a field programmable gate array to perform encryption operation on the to-be-processed data in the memory cache region; and writing the encrypted data to be processed into disk storage equipment. According to the encrypted file processing method for heterogeneous computing, efficient write-back operation on the encrypted file is achieved, the problems that resources are occupied inefficiently, system performance is poor, data processing efficiency is low and the like due to frequent hardware interaction during heterogeneous computing encryption operation are solved, and the response speed and the overall performance of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, and particularly relates to a method for processing encrypted files in heterogeneous computing, a program product, and a heterogeneous computing system. Background Art

[0002] In the traditional heterogeneous computing storage system, when data needs to be written to the disk, the data is usually directly sent to the disk for writing. However, in an encrypted heterogeneous computing system, the data is encrypted before being written to the disk. In the methods in the related technologies, the data is encrypted immediately after each data update and directly written to the disk, which will generate frequent encryption operations and disk write requests, increasing the system energy consumption and the consumption of computing resources, and reducing the system response speed and overall performance. Summary of the Invention

[0003] This application aims to at least solve one of the technical problems existing in the related technologies. For this purpose, this application provides a method for processing encrypted files in heterogeneous computing, a program product, and a heterogeneous computing system, which realizes efficient write-back operations for encrypted files, solves the problems such as inefficient occupation of resources, poor system performance, and low data processing efficiency caused by frequent hardware interactions during heterogeneous computing encryption operations, reduces the system energy consumption and the consumption of computing resources, slows down the aging speed of the FPGA (Field Programmable Gate Array), reduces the system maintenance cost, and improves the system response speed and overall performance.

[0004] In a first aspect, this application provides a method for processing encrypted files in heterogeneous computing, which is applied to an operating system, and the operating system includes a transparent file system; the method includes: When a write operation is received, caching the data to be processed in the memory buffer of the transparent file system; When it is detected that the operating system triggers a write-back process, calling a field programmable gate array to perform an encryption operation on the data to be processed in the memory buffer; Writing the encrypted data to be processed into a disk storage device; the disk storage device is connected to the server host where the operating system is located.

[0005] According to the encrypted file processing method for heterogeneous computing provided by the embodiments of the present application, by inserting a transparent file system into the operating system, when a write-back operation is received, the data to be processed is cached in the memory buffer of the transparent file system. Then, when the write-back process is triggered, the FPGA is called in the transparent file system to encrypt the data to be processed, and the encrypted data is written to disk. The cache allocation and write-back functions of the encrypted data are implemented in the transparent file system, realizing an efficient write-back operation for encrypted files, solving problems such as inefficient occupation of resources, poor system performance, and low data processing efficiency caused by frequent hardware interactions during heterogeneous computing encryption operations, reducing system energy consumption and consumption of computing resources, slowing down the aging speed of the FPGA, reducing the system maintenance cost, and improving the system response speed and overall performance.

[0006] The encrypted file processing method for heterogeneous computing according to an embodiment of the present application, the field programmable gate array includes multiple computing units; the step of calling the field programmable gate array to perform an encryption operation on the data to be processed in the memory buffer includes: Sending the data to be processed to the device memory corresponding to the field programmable gate array; Based on the encryption parameters corresponding to each of the computing units, calling each of the computing units to perform an encryption operation on the data to be processed.

[0007] The encrypted file processing method for heterogeneous computing according to an embodiment of the present application, before the step of, based on the encryption parameters corresponding to each of the computing units, calling each of the computing units to perform an encryption operation on the data to be processed, the method further includes: Obtaining multiple work items in the work queue corresponding to the operating system; Dividing the data to be processed into multiple data blocks, and allocating the data blocks to each of the work items; each of the data blocks includes at least part of the data to be processed; Allocating a first target computing unit among the multiple computing units to a target work item among the multiple work items.

[0008] The encrypted file processing method for heterogeneous computing according to an embodiment of the present application, before the step of, based on the encryption parameters corresponding to each of the computing units, calling each of the computing units to perform an encryption operation on the data to be processed, the method further includes: Dividing the data to be processed into multiple data blocks; each of the data blocks includes at least part of the data to be processed; When it is detected that a target data block among the multiple data blocks includes a newly written data page, copying the target data block to the buffer array in the device memory corresponding to the field programmable gate array to perform an encryption operation on the target data block.

[0009] For the heterogeneous computing encrypted file processing method according to an embodiment of the present application, when it is detected that the operating system triggers a write-back process, it includes: When it is detected that the operating system meets at least one of multiple trigger conditions, it is determined that the operating system triggers a write-back process; the multiple trigger conditions include: the to-be-processed data has not been written to the disk storage device within a target duration threshold, the remaining memory capacity corresponding to the operating system is less than a target capacity threshold, and a data synchronization command is received.

[0010] For the heterogeneous computing encrypted file processing method according to an embodiment of the present application, caching the to-be-processed data into the memory buffer area of the transparent file system includes: Allocate a target buffer area for each data page in the to-be-processed data from the memory buffer area; Cache each data page into the target buffer area corresponding to the data page, and insert each target buffer area into the cache tree corresponding to the operating system.

[0011] For the heterogeneous computing encrypted file processing method according to an embodiment of the present application, the operating system includes a virtual file system, and the virtual file system is connected to the transparent file system; when a write operation is received, caching the to-be-processed data into the memory buffer area of the transparent file system includes: When the write operation is received, send the write operation to the virtual file system; When it is detected that the write operation corresponds to a target flag parameter, send the write operation from the virtual file system to the transparent file system; In response to the write operation, cache the to-be-processed data into the memory buffer area of the transparent file system.

[0012] For the heterogeneous computing encrypted file processing method according to an embodiment of the present application, writing the encrypted to-be-processed data to the disk storage device includes: Call a target write function to write the encrypted to-be-processed data to the disk storage device; the target write function corresponds to a target flag parameter.

[0013] For the heterogeneous computing encrypted file processing method according to an embodiment of the present application, the field programmable gate array includes multiple computing units, and each computing unit is used to perform encryption operations on at least part of the to-be-processed data; writing the encrypted to-be-processed data to the disk storage device includes: Based on the linked list arrangement order of the multiple computing units, write at least part of the to-be-processed data encrypted by each computing unit to the disk storage device respectively.

[0014] For the encrypted file processing method of heterogeneous computing according to an embodiment of the present application, after writing at least part of the data to be processed encrypted by each of the computing units to the disk storage device respectively based on the linked list arrangement order of the multiple computing units, the method further includes: Releasing a second target computing unit among the multiple computing units; the second target computing unit is the computing unit corresponding to at least part of the data to be processed that has been written to the disk storage device; Inserting the second target computing unit into a target position in the linked list corresponding to the multiple computing units.

[0015] In a second aspect, the present application provides a computer program product applied to an operating system, where the operating system includes a transparent file system; it includes: A first processing module, configured to cache data to be processed in a memory buffer area of the transparent file system when a write operation is received; A second processing module, configured to call a field programmable gate array to perform an encryption operation on the data to be processed in the memory buffer area when it is detected that the operating system triggers a write-back process; A third processing module, configured to write the encrypted data to be processed to a disk storage device; the disk storage device is connected to the server host where the operating system is located.

[0016] According to the computer program product provided by the embodiments of the present application, by inserting a transparent file system into the operating system, when a write-back operation is received, the data to be processed is cached in the memory buffer area of the transparent file system, and then when the write-back process is triggered, the FPGA is called in the transparent file system to encrypt the data to be processed, and the encrypted data is written to the disk. The functions of caching allocation and write-back of encrypted data are realized in the transparent file system, and an efficient write-back operation for encrypted files is achieved, solving problems such as inefficient occupation of resources, poor system performance, and low data processing efficiency caused by frequent hardware interactions during heterogeneous computing encryption operations, reducing system energy consumption and consumption of computing resources, slowing down the aging speed of the FPGA, reducing the system maintenance cost, and improving the system response speed and overall performance.

[0017] In a third aspect, the present application provides a heterogeneous computing system, including: An operating system, which is deployed on a server host, and a driver program corresponding to a field programmable gate array is deployed on the operating system; A disk storage device, which is connected to the server host; An acceleration board, which is connected to the server host, and the driver program corresponding to the field programmable gate array is used to call the acceleration board.

[0018] According to the heterogeneous computing system provided by the embodiments of the present application, by inserting a transparent file system into the operating system, when a write-back operation is received, the data to be processed is cached in the memory buffer of the transparent file system, and then when the write-back process is triggered, the FPGA is called in the transparent file system to encrypt the data to be processed, and the encrypted data is written to disk. The cache allocation and write-back functions of encrypted data are implemented in the transparent file system, realizing an efficient write-back operation for encrypted files, solving problems such as inefficient occupation of resources, poor system performance, and low data processing efficiency caused by frequent hardware interactions during heterogeneous computing encryption operations, reducing system energy consumption and consumption of computing resources, slowing down the aging speed of the FPGA, reducing the maintenance cost of the system, and improving the response speed and overall performance of the system.

[0019] The heterogeneous computing system according to an embodiment of the present application, the operating system includes: An application layer, which is used to receive write operations input by users; A kernel layer, the kernel layer is connected to the application layer, and the kernel layer is configured with a transparent file system.

[0020] In a fourth aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the encrypted file processing method for heterogeneous computing as described in the first aspect above.

[0021] In a fifth aspect, the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the encrypted file processing method for heterogeneous computing as described in the first aspect above.

[0022] One or more of the above technical solutions in the embodiments of the present application have at least one of the following technical effects: By inserting a transparent file system into the operating system, when a write-back operation is received, the data to be processed is cached in the memory buffer of the transparent file system, and then when the write-back process is triggered, the FPGA is called in the transparent file system to encrypt the data to be processed, and the encrypted data is written to disk. The cache allocation and write-back functions of encrypted data are implemented in the transparent file system, realizing an efficient write-back operation for encrypted files, solving problems such as inefficient occupation of resources, poor system performance, and low data processing efficiency caused by frequent hardware interactions during heterogeneous computing encryption operations, reducing system energy consumption and consumption of computing resources, slowing down the aging speed of the FPGA, reducing the maintenance cost of the system, and improving the response speed and overall performance of the system.

[0023] Furthermore, by creating multiple computing units corresponding to the FPGA to process corresponding work items according to each computing unit, multiple computing units can process independent work items simultaneously, improving the parallel processing ability of the FPGA, enhancing the overall throughput and resource utilization rate, and improving work efficiency.

[0024] Even further, by performing chunk processing on the data to be processed and copying the target data chunk to the temporary buffer array when detecting that there is a dirty data page in the target data chunk, chunk calculation can be performed on the encrypted data, balancing performance and consistency in the random write scenario. By reducing the number of encryption times, optimizing I / O, and simplifying management, the overall system efficiency is improved.

[0025] Still further, after the write operation enters the virtual file system through a system call and it is detected that the write operation has the O_DIRECT flag, the write operation can execute the DIRECT IO (direct I / O) non-caching process, and the write process can then enter the transparent file system, thereby caching and writing back the data based on the transparent file system, implementing the caching write function of the heterogeneous computing system, and finally achieving operations such as enhancing the transparency, efficient encryption, and caching write-back of data files in the encrypted heterogeneous computing framework.

[0026] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the description of the embodiments in conjunction with the following drawings, where: Figure 1 is one of the flow diagrams of the encrypted file processing method for heterogeneous computing provided by the embodiment of the present application; Figure 2 is another flow diagram of the encrypted file processing method for heterogeneous computing provided by the embodiment of the present application; Figure 3 is yet another flow diagram of the encrypted file processing method for heterogeneous computing provided by the embodiment of the present application; Figure 4 is the structural diagram of the heterogeneous computing system provided by the embodiment of the present application; Figure 5 is the fourth flow diagram of the encrypted file processing method for heterogeneous computing provided by the embodiment of the present application; Figure 6 is the structural diagram of the encrypted file processing device for heterogeneous computing provided by the embodiment of the present application; Figure 7 is the structural diagram of the electronic device provided by the embodiment of the present application. Detailed implementation manners

[0028] The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.

[0029] The terms "first", "second", etc. in the description and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the description and claims means at least one of the connected objects, and the character " / " generally means an "or" relationship between the associated objects before and after.

[0030] The heterogeneous computing encrypted file processing method, computer program product, electronic device, and readable storage medium provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings, through specific embodiments and their application scenarios.

[0031] Among them, the heterogeneous computing encrypted file processing method can be applied to a terminal, and can be specifically executed by hardware or software in the terminal.

[0032] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablet computers having a touch-sensitive surface (for example, a touch screen display and / or a touchpad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer having a touch-sensitive surface (for example, a touch screen display and / or a touchpad).

[0033] In the following embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse, and a joystick.

[0034] The heterogeneous computing-based encrypted file processing method provided by an embodiment of the present application. The execution subject of the heterogeneous computing-based encrypted file processing method can be an electronic device or a functional module or functional entity in the electronic device that can implement the heterogeneous computing-based encrypted file processing method. The electronic devices mentioned in the embodiments of the present application include, but are not limited to, mobile phones, tablet computers, computers, cameras, wearable devices, etc. Hereinafter, taking the electronic device as the execution subject as an example, the heterogeneous computing-based encrypted file processing method provided by the embodiments of the present application will be described.

[0035] As Figure 1 shown, the heterogeneous computing-based encrypted file processing method includes: step 110, step 120, and step 130.

[0036] It should be noted that the heterogeneous computing-based encrypted file processing method can be applied to an operating system. The operating system can be deployed on a server host. The operating system can be a Linux operating system, where Linux is the recursive abbreviation of Linux Is Not UniX, generally referring to GNU / Linux, which is a set of free-to-use and freely distributable Unix-like operating systems, and is a multi-user, multi-tasking, multi-threaded, and multi-CPU operating system that follows POSIX (Portable Operating System Interface).

[0037] The operating system can include a transparent file system.

[0038] The transparent file system is internally designed with functions of caching data and encrypted write-back.

[0039] As Figure 4 shown, the operating system can include an application layer and a kernel layer. The heterogeneous computing-based encrypted file processing method provided by the embodiments of the present application can be applied to the kernel layer.

[0040] As Figure 3 shown, the device layer can include a disk and an acceleration board corresponding to a field programmable gate array. The device layer can be connected to the server host through a PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) bus.

[0041] Step 110: When a write operation is received, cache the data to be processed in the memory buffer of the transparent file system; In this step, the write operation is an operation to modify or add data to a data carrier such as a storage device (such as memory or hard disk) or a database in a computer system.

[0042] The data to be processed is the original data content (such as text or binary stream, etc.) to be written to the disk, and it is data that has not been cached yet.

[0043] A memory cache is a temporary storage area in a computer's memory that is used to quickly store data.

[0044] For example, after the user performs a write operation at the application layer, the write operation process will enter the transparent file system, and cache space will be allocated for the entire file to be encrypted (data to be processed), that is, the data to be processed can be cached in the memory cache area in the transparent file system.

[0045] Step 120: When it is detected that the operating system triggers the write-back process, the field programmable gate array is called to perform encryption operation on the data to be processed in the memory cache area; In this step, when the operating system triggers a write-back operation, the write-back operation can be started in the transparent file system, that is, hardware encryption operation can be performed and the encrypted data can be written back to the disk storage device.

[0046] Among them, the field programmable gate array can be called to perform encryption operations on the data to be processed.

[0047] A driver corresponding to the field programmable gate array may be deployed in the operating system and may be used to call a board device corresponding to the field programmable gate array to perform encryption operations on the data to be processed.

[0048] A field-programmable gate array (FPGA) is a chip with customizable hardware logic that can be programmed to implement specific algorithms (such as encryption and compression).

[0049] Field Programmable Gate Array supports hardware pipeline acceleration of encryption algorithms with less latency.

[0050] Step 130: Write the encrypted data to be processed into a disk storage device.

[0051] In this step, the disk storage device is connected to the server host where the operating system is located.

[0052] like Figure 4 As shown, the operating system can be installed on the server host, and the disk storage device can be connected to the server host.

[0053] The disk storage device can be connected to the server host via a PCIe bus.

[0054] After the data is encrypted by hardware acceleration modules such as FPGA, the FPGA can output ciphertext and verification information, etc., and then the ciphertext and verification information can be passed to the disk storage device through the storage stack.

[0055] Writing the encrypted data to be processed to a disk storage device enables P2P (peer-to-peer) data transmission between the FPGA and the disk.

[0056] In the R & D process, the inventor found that in the related art, in the traditional FPGA-based heterogeneous computing solution, the DIRECT IO non-cached write mode is adopted. The process is that after the application program initiates a write operation, the FPGA is required to encrypt the data, and then the data is returned to the operating system to continue the non-cached write process until it is written to the storage device. In the method of the related art, each data encryption triggers an FPGA operation. Frequent hardware interactions will cause inefficient occupation of hardware resources (such as PCIe bandwidth and FPGA computing power), poor system performance, and low data processing efficiency. Each write operation (even if it is writing a very small piece of data) requires the execution of FPGA hardware encryption and data disk writing operations. In scenarios such as high-frequency writing or random writing of small files, the performance drops sharply, and the FPGA will age rapidly due to continuous load, increasing the system maintenance cost.

[0057] In the present application, as Figure 3 shown, by inserting a transparent file system into the virtual file system and the underlying file system, transparent encryption operations can be achieved. When the user initiates a write operation at the application layer, without performing other additional operations, the FPGA driver program can be called for encryption calculation; Implement cache allocation and write-back functions in the transparent file system. When the operating system triggers the write-back process, perform FPGA encryption calculation and disk writing operations on the ciphertext data.

[0058] The transparent file system can intercept all write operations (encryption operations) and can be used for caching data and encrypted write-back.

[0059] According to the encrypted file processing method for heterogeneous computing provided by the embodiments of the present application, by inserting a transparent file system into the operating system, when a write-back operation is received, the data to be processed is cached in the memory buffer of the transparent file system, and then when the write-back process is triggered, the FPGA is called in the transparent file system to encrypt the data to be processed, and the encrypted data is disk-written. The cache allocation and write-back functions of encrypted data are implemented in the transparent file system, and efficient write-back operations for encrypted files are achieved, solving the problems of inefficient occupation of resources, poor system performance, and low data processing efficiency caused by frequent hardware interactions during heterogeneous computing encryption operations, reducing system energy consumption and consumption of computing resources, slowing down the aging speed of the FPGA, reducing the system maintenance cost, and improving the system response speed and overall performance.

[0060] In some embodiments, calling the field programmable gate array to perform encryption operations on the data to be processed in the memory buffer may include: Sending the data to be processed to the device memory corresponding to the field programmable gate array; Based on the encryption parameters corresponding to each computing unit, each computing unit is called to perform an encryption operation on the data to be processed.

[0061] In this embodiment, the field programmable gate array may include multiple computing units (CUs).

[0062] The number of multiple computing units may be determined based on the number of CU linked list nodes. Among them, the value of the number of CU linked list nodes may be user-defined. For example, the number of CU linked list nodes may be set to 16, that is, it may be set that the field programmable gate array includes 16 computing units.

[0063] When starting the encryption process, the write-back function of the transparent file system may call the FPGA driver interface to start FPGA data transmission. DMA (Direct Memory Access) may transmit data blocks to the FPGA device memory through PCIe.

[0064] Each computing unit of the FPGA corresponds to encryption parameters, and the encryption parameters include the location address in the device memory where the encrypted data block is stored, the size of the encrypted data, and the storage address of the encryption result, etc.

[0065] Each computing unit may perform an encryption operation on the data to be processed corresponding to each computing unit based on the encryption parameters.

[0066] The FPGA encryption IP may process data to generate ciphertext, and DMA may read the encryption result.

[0067] In some embodiments, before calling each computing unit to perform an encryption operation on the data to be processed based on the encryption parameters corresponding to each computing unit, the method may further include: Obtain multiple work items in the work queue corresponding to the operating system; Divide the data to be processed into multiple data blocks, and allocate data blocks to each work item; Allocate the first target computing unit among the multiple computing units to the target work item among the multiple work items.

[0068] In this embodiment, as Figure 5 shown, a work queue may be created, and the work queue may include multiple work items (workers).

[0069] The data to be processed may be divided into multiple data blocks. Each data block includes at least part of the data to be processed, and the data size of each data block may be the same. For example, the data to be processed may be evenly divided into multiple data blocks of 256 KB.

[0070] A corresponding data block may be allocated to each work item. For example, one work item may correspond to processing a data block of 256 KB in size.

[0071] The work items in the work queue can be configured, the CUid can be obtained from the linked list of CU computing units, a computing unit CU is assigned to each work item, each work item can include the encryption parameters corresponding to the data block, and after starting the encryption process, the encryption parameters can be configured for each computing unit.

[0072] The first target computing unit is any one of the multiple computing units, and the first target computing unit corresponds to the target work item.

[0073] One computing unit can correspond to one work item, and one work item can correspond to one data block.

[0074] According to the heterogeneous computing-based encrypted file processing method provided by the embodiments of the present application, by creating multiple computing units corresponding to the FPGA, so that each computing unit processes the corresponding work item respectively, multiple computing units can process independent work items simultaneously, improving the parallel processing ability of the FPGA, enhancing the overall throughput and resource utilization rate, and improving the work efficiency.

[0075] In some embodiments, before calling each computing unit to perform an encryption operation on the data to be processed based on the encryption parameters corresponding to each computing unit, the method may further include: Dividing the data to be processed into multiple data blocks; each data block includes at least part of the data to be processed; When it is detected that the target data block among the multiple data blocks includes a newly written data page, copying the target data block to the buffer array in the device memory corresponding to the field programmable gate array to perform an encryption operation on the target data block.

[0076] In this embodiment, the data to be processed can be divided into multiple data blocks and sent to the device memory of the FPGA in blocks.

[0077] For example, the data to be processed can be evenly divided into multiple data blocks of 256KB, and each data block includes multiple page pages (data pages).

[0078] Such as Figure 5 As shown, for example, when the user modifies one of the page pages in the target data block, the target data block can be encrypted.

[0079] When the target data block is detected to include a newly written data page, that is, when a dirty page is detected in the target data block, other pages in the target data block can be copied to the buffer array (such as a temporary buffer array) in the device memory of the FPGA to perform block-by-block calculation on the encrypted data.

[0080] According to the encrypted file processing method for heterogeneous computing provided by the embodiments of the present application, by performing block processing on the data to be processed, when it is detected that there is a dirty data page in the target data block, the target data block is copied into the temporary buffer array, and the encrypted data can be calculated in blocks, balancing performance and consistency in the random write scenario. By reducing the number of encryptions, optimizing I / O, and simplifying management, the overall system efficiency is improved.

[0081] In some embodiments, detecting that the operating system triggers a write-back process may include: When it is detected that the operating system meets at least one of multiple trigger conditions, it is determined that the operating system triggers a write-back process; the multiple trigger conditions include: not writing the data to be processed to the disk storage device within the target duration threshold, the remaining memory capacity corresponding to the operating system being less than the target capacity threshold, and receiving a data synchronization command.

[0082] In this embodiment, the operating system can periodically check the age of dirty data through the kernel timer. For example, the target duration threshold can be set to 30s. If there is still data that has not been written to the disk within 30s, the write-back process can be triggered.

[0083] For example, the operating system can set a timer to trigger a write-back every once in a while, ensuring that data can be saved regularly even if there are no other conditions to trigger it, and avoiding data risks caused by not writing for a long time.

[0084] The memory of the operating system can be monitored through the memory management subsystem. When the available memory (i.e., the remaining memory capacity) is below the target capacity threshold, the write-back process can be triggered.

[0085] In the case of insufficient memory, the system needs to release memory space and write the dirty data pages back to the disk, which can free up memory for other processes to use, helping to maintain the stability and performance of the system and avoiding problems such as application crashes or system slowdowns caused by memory exhaustion.

[0086] When the user executes a data synchronization command (such as the sync command), the write-back process can be triggered and directly inserted into the write-back queue to ensure that the data is immediately written to the disk.

[0087] When a data synchronization command is received, in response to the data synchronization command, the data is immediately written to the disk.

[0088] According to the encrypted file processing method for heterogeneous computing provided by the embodiments of the present application, by setting multiple trigger conditions, when it is detected that the operating system meets at least one of the multiple trigger conditions, it is determined that the operating system triggers the write-back process, reducing the risk of data loss, meeting the persistent requirements of different scenarios, and balancing the memory and disk resources, thus improving the overall efficiency.

[0089] As Figure 5 shown, in some embodiments, caching the data to be processed into the memory buffer of the transparent file system may include: Allocating a target buffer for each data page in the data to be processed from the memory buffer; Caching each data page into the target buffer corresponding to the data page, and inserting each target buffer into the cache tree corresponding to the operating system.

[0090] In this embodiment, the transparent file system may allocate idle cache pages (target buffers) from the memory pool and copy each data page in the data to be processed into the target buffer.

[0091] Among them, according to characteristics such as the access pattern, size, type, or correlation of the data page, it can be allocated to a preset sub-region (target buffer) in the memory buffer.

[0092] The cached data pages can be organized into the global cache tree of the operating system in a specific structure, with each node corresponding to a target buffer, recording the metadata of the page (such as address, access time, and dirty flag, etc.).

[0093] According to the encrypted file processing method for heterogeneous computing provided by the embodiments of the present application, by allocating a target buffer for each data page in the data to be processed, caching each data page into the target buffer corresponding to it, and then inserting it into the operating system cache tree, it supports the superposition of multiple-layer file systems, can adapt to the load scenario, and improves the scalability of the architecture.

[0094] As Figure 2 shown, in some embodiments, when receiving a write operation, caching the data to be processed into the memory buffer of the transparent file system may include: When receiving a write operation, sending the write operation to the virtual file system; When it is detected that the write operation has a target flag parameter, sending the write operation from the virtual file system to the transparent file system; In response to the write operation, caching the data to be processed into the memory buffer of the transparent file system.

[0095] In this embodiment, as Figure 3 shown, the kernel layer of the operating system includes a virtual file system, and the virtual file system is connected to the transparent file system.

[0096] Write operations at the application layer can enter the kernel layer of the operating system by calling system calls (such as the write() function). The system call first reaches the virtual file system, which is the entry point for the operating system to handle file operations. The virtual file system provides a unified interface, enabling the operating system to support multiple different file systems.

[0097] When the virtual file system receives a write operation request, it can check whether the target flag parameter is set. If the target flag parameter is set, it will directly enter the DIRECT IO path.

[0098] Among them, the target flag parameter can be the O_DIRECT flag. The O_DIRECT flag is used to prompt the kernel layer to bypass the system's regular caching mechanism and perform I / O operations directly. The data to be processed will not be cached in the page cache of the operating system but will be written to the disk after being processed by the transparent file system.

[0099] The write operation can be sent from the virtual file system to the transparent file system. When the write operation process enters the transparent file system, it can allocate caches for the entire encrypted file and add these caches to the cache tree of the operating system.

[0100] According to the heterogeneous computing encrypted file processing method provided by the embodiments of the present application, after the write operation enters the virtual file system through the system call, when it is detected that the write operation corresponds to the O_DIRECT flag, the write operation can execute the DIRECT IO non-caching process, and the write process can then enter the transparent file system, thereby caching and writing back the data based on the transparent file system, realizing the cache write function of the heterogeneous computing system, and finally achieving operations such as enhancing the transparency, efficient encryption, and cache write-back of data files in the encrypted heterogeneous computing framework.

[0101] In some embodiments, writing the encrypted data to be processed to the disk storage device may include: Calling the target write function to write the encrypted data to be processed to the disk storage device.

[0102] In this embodiment, the target write function corresponds to a target flag parameter (such as the O_DIRECT flag), which is a direct write method and can be directly written to the disk.

[0103] The target write function can be the Kernel_write function.

[0104] By calling the target write function, the encrypted data can be directly written to the disk storage device.

[0105] According to the encrypted file processing method for heterogeneous computing provided by the embodiments of the present application, by calling a target write function with a target flag parameter, the encrypted data is directly written to a disk storage device, realizing P2P data transmission between the FPGA and the disk, reducing data latency, increasing data throughput, and achieving end-to-end data encryption, which is applicable to the confidential computing scenario and has a relatively wide range of applicable scenarios.

[0106] In some embodiments, writing the encrypted data to be processed to a disk storage device may include: Based on the linked list arrangement order of multiple computing units, at least part of the data to be processed encrypted by each computing unit is written to the disk storage device respectively.

[0107] In this embodiment, the field programmable gate array includes multiple computing units, and each computing unit is used to perform an encryption operation on at least part of the data to be processed. For example, each computing unit can be used to perform an encryption operation on a data block.

[0108] Such as Figure 5 As shown, based on the linked list arrangement order of multiple computing units, at least part of the data to be processed encrypted corresponding to each computing unit is sequentially written to the disk storage device, and when it is determined that the last data block has been successfully written to the disk, the process ends.

[0109] Continue to refer to Figure 5 , in some embodiments, after writing at least part of the data to be processed encrypted by each computing unit to the disk storage device based on the linked list arrangement order of multiple computing units, the method may further include: Releasing the second target computing unit among the multiple computing units; Inserting the second target computing unit into the target position in the linked list corresponding to the multiple computing units.

[0110] In this embodiment, the second target computing unit is the computing unit corresponding to at least part of the data to be processed that has been written to the disk storage device.

[0111] When at least part of the data to be processed corresponding to a computing unit has been written to the disk storage device, the computing unit can be released and inserted into the target position in the CU linked list.

[0112] Among them, the target position can be the head or the tail, or it can also be other positions, which can be selected based on user requirements and are not limited in the present application.

[0113] During the actual execution process, for example, it can be set that the FPGA includes 16 computing units CU, and each computing unit CU can perform encryption calculations independently.

[0114] The CU linked list management of the computing units is: Initial linked list state: HEAD -> cu15 -> cu14 -> cu13 -> cu12 … -> cu2 -> cu1 -> cu0, First iteration: HEAD -> cu0 -> cu15 -> cu14 -> cu13 … -> cu3 -> cu2 -> cu1, Second iteration: HEAD -> cu1 -> cu0 -> cu15 -> cu14 … -> cu4 -> cu3 -> cu2, Third iteration: HEAD -> cu2 -> cu2 -> cu0 -> cu15… -> cu5 -> cu4 -> cu3, … The above is the management of the computing unit CU linked list. First, a linked list with 16 nodes is initialized. Each node represents the id number of a computing unit CU. From the tail to the head of the linked list are cu0, cu1, cu2…cu15 in sequence. When the first iteration occurs, cu0 is obtained from the tail of the linked list. After the calculation is completed, cu0 is inserted into the head of the linked list. When the second iteration occurs, cu1 is continuously obtained from the tail of the linked list. After the calculation is completed, cu1 is inserted into the head of the linked list. The operation is cycled in sequence. Each time a computing task is allocated, the id of the cu node is obtained from the tail of the linked list, thereby achieving the purpose of allocating and maintaining the computing unit.

[0115] According to the heterogeneous computing encrypted file processing method provided by the embodiments of the present application, through the co - design of hardware linked list dynamic scheduling and FPGA acceleration, it is applicable to encryption scenarios that are sensitive to latency and computationally intensive, and provides a high - performance and low - cost solution for fields such as data centers, fintech, and privacy computing.

[0116] In some embodiments, after inserting the second target computing unit into the target position in the linked list corresponding to multiple computing units, the method may further include: In the case of determining that there are data blocks that have not been written to disk among multiple data blocks, allocate computing units for the data blocks that have not been written to disk, so as to perform encryption operations on the data blocks that have not been written to disk and write them to the disk storage device until all multiple data blocks have been written to the disk storage device; In the case of determining that all multiple data have been written to the disk storage device, end the data encryption processing flow.

[0117] In this embodiment, as Figure 5 shown, after the data to be processed is divided into blocks, the data blocks can be encrypted and written to disk in sequence. After releasing the computing unit and re - inserting it into the linked list, it can be detected whether the last data block has been written to disk.

[0118] In the case where the last data block has not been completely written to disk, the following steps can be returned: When it is detected that the target data block among multiple data blocks includes a newly written data page, copy the target data block to the buffer array in the device memory corresponding to the field-programmable gate array to perform an encryption operation on the target data block; continue with the next loop.

[0119] In the case where the last data block has been completely written to disk, the data encryption processing flow can be ended.

[0120] According to the encryption file processing method for heterogeneous computing provided by the embodiments of the present application, in the case where there are data blocks in the data to be processed that have not been written to disk, continue with the next loop to perform encryption and write-to-disk processing on the data blocks that have not been written to disk until all data blocks have been completely written to disk, ensuring data consistency.

[0121] The computer program product provided by the present application will be described below. The computer program product described below can be mutually corresponding and referred to with the encryption file processing method for heterogeneous computing described above.

[0122] The encryption file processing method for heterogeneous computing provided by the embodiments of the present application can have a computer program product as the execution entity. In the embodiments of the present application, taking the computer program product as the execution entity of the encryption file processing method for heterogeneous computing as an example, the computer program product provided by the embodiments of the present application is described.

[0123] The embodiments of the present application further provide a computer program product.

[0124] As Figure 6 shown, this computer program product is applied to an operating system, and the operating system includes a transparent file system; it includes: a first processing module 610, a second processing module 620, and a third processing module 630.

[0125] The first processing module 610 is configured to cache the data to be processed in the memory buffer area of the transparent file system when a write operation is received; The second processing module 620 is configured to call the field-programmable gate array to perform an encryption operation on the data to be processed in the memory buffer area when it is detected that the operating system triggers a write-back process; The third processing module 630 is configured to write the encrypted data to be processed to a disk storage device; the disk storage device is connected to the server host where the operating system is located.

[0126] According to the computer program product provided by the embodiments of the present application, by inserting a transparent file system into the operating system, when a write-back operation is received, the data to be processed is cached in the memory buffer of the transparent file system, and then when the write-back process is triggered, the FPGA is called in the transparent file system to encrypt the data to be processed, and the encrypted data is written to disk. The cache allocation and write-back functions of the encrypted data are implemented in the transparent file system, the efficient write-back operation of the encrypted file is realized, and the problems such as inefficient occupation of resources, poor system performance, and low data processing efficiency caused by frequent hardware interactions during heterogeneous computing encryption operations are solved, the system energy consumption and consumption of computing resources are reduced, the aging speed of the FPGA is slowed down, the system maintenance cost is reduced, and the system response speed and overall performance are improved.

[0127] In some embodiments, the field programmable gate array includes multiple computing units; the second processing module 620 can also be used for: Send the data to be processed to the device memory corresponding to the field programmable gate array; Based on the encryption parameters corresponding to each computing unit, call each computing unit to perform an encryption operation on the data to be processed.

[0128] In some embodiments, the computer program product may further include a fourth processing module, configured to obtain multiple work items in the work queue corresponding to the operating system before calling each computing unit to perform an encryption operation on the data to be processed based on the encryption parameters corresponding to each computing unit; Divide the data to be processed into multiple data blocks, and allocate data blocks to each work item; each data block includes at least part of the data to be processed; Allocate the first target computing unit among the multiple computing units to the target work item among the multiple work items.

[0129] In some embodiments, the computer program product may further include a fifth processing module, configured to divide the data to be processed into multiple data blocks before calling each computing unit to perform an encryption operation on the data to be processed based on the encryption parameters corresponding to each computing unit; each data block includes at least part of the data to be processed; When it is detected that the target data block among the multiple data blocks includes a newly written data page, copy the target data block to the buffer array in the device memory corresponding to the field programmable gate array to perform an encryption operation on the target data block.

[0130] In some embodiments, the second processing module 620 can also be used for: When it is detected that the operating system meets at least one of multiple trigger conditions, determine that the operating system triggers a write-back process; the multiple trigger conditions include: not writing the data to be processed to the disk storage device within the target duration threshold, the remaining memory capacity corresponding to the operating system being less than the target capacity threshold, and receiving a data synchronization command.

[0131] In some embodiments, the first processing module 610 may further be configured to: Allocate a target buffer area for each data page in the data to be processed from the memory buffer; Cache each data page into the target buffer area corresponding to the data page, and insert each target buffer area into the cache tree corresponding to the operating system.

[0132] In some embodiments, the operating system includes a virtual file system, and the virtual file system is connected to a transparent file system; the first processing module 610 may further be configured to: When a write operation is received, send the write operation to the virtual file system; When it is detected that the write operation corresponds to a target flag parameter, send the write operation from the virtual file system to the transparent file system; In response to the write operation, cache the data to be processed into the memory buffer area in the transparent file system.

[0133] In some embodiments, the third processing module 630 may further be configured to: Call a target write function to write the encrypted data to be processed to the disk storage device; the target write function corresponds to a target flag parameter.

[0134] In some embodiments, the field programmable gate array includes multiple computing units, and each computing unit is used to perform an encryption operation on at least part of the data to be processed; the third processing module 630 may further be configured to: Based on the linked list arrangement order of the multiple computing units, write at least part of the data to be processed encrypted by each computing unit to the disk storage device respectively.

[0135] In some embodiments, the computer program product may further include a sixth processing module, configured to release a second target computing unit among the multiple computing units after writing at least part of the data to be processed encrypted by each computing unit to the disk storage device respectively based on the linked list arrangement order of the multiple computing units; the second target computing unit is the computing unit corresponding to at least part of the data to be processed that has been written to the disk storage device; Insert the second target computing unit into the target position in the linked list corresponding to the multiple computing units.

[0136] The computer program product in the embodiments of the present application may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than terminals. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., or may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations. <> <>

[0137] The computer program product in the embodiments of the present application may be a device with an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations. <> <>

[0138] The computer program product provided by the embodiments of the present application can implement <> Figures 1 to 5 each process implemented by the method embodiments described above. To avoid repetition, it will not be elaborated here. <> <>

[0139] In some embodiments, as <> Figure 7 shown, the embodiments of the present application further provide an electronic device 700, including a processor 701, a memory 702, and a computer program stored on the memory 702 and executable on the processor 701. When the program is executed by the processor 701, it implements each process of the above-described method embodiment for encrypting file processing in heterogeneous computing and can achieve the same technical effects. To avoid repetition, it will not be elaborated here. <> <>

[0140] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices. <> <>

[0141] As <> Figure 4 shown, the embodiments of the present application further provide a heterogeneous computing system, including: an operating system, a disk storage device, and an acceleration board. <> <>

[0142] In this embodiment, the operating system is deployed on the server host, and the driver corresponding to the field programmable gate array is deployed in the operating system.

[0143] The disk storage device can be connected to the server host through the PCIe bus.

[0144] The acceleration board can be connected to the server host through the PCIe bus, and the driver corresponding to the field programmable gate array is used to call the acceleration board.

[0145] The driver can also be used to configure and manage the acceleration computing device (i.e., the acceleration board) corresponding to the FPGA.

[0146] The acceleration board can include: DEV_DMA-IP, encryption IP, memory controller, and device memory.

[0147] DEV_DMA-IP is responsible for DMA data transmission on the PCIe bus.

[0148] The encryption IP is responsible for data encryption operations.

[0149] The memory controller is used to manage the memory of the device.

[0150] According to the heterogeneous computing system provided by the embodiments of the present application, by inserting a transparent file system into the operating system, when a write-back operation is received, the data to be processed is cached in the memory buffer of the transparent file system, and then when the write-back process is triggered, the FPGA is called in the transparent file system to encrypt the data to be processed, and the encrypted data is written to disk. The cache allocation and write-back functions of the encrypted data are realized in the transparent file system, the efficient write-back operation of the encrypted file is realized, the problems of inefficient resource occupation, poor system performance, and low data processing efficiency caused by frequent hardware interactions during heterogeneous computing encryption operations are solved, the system energy consumption and consumption of computing resources are reduced, the aging speed of the FPGA is slowed down, the system maintenance cost is reduced, and the system response speed and overall performance are improved.

[0151] In some embodiments, the operating system may include: an application layer and a kernel layer.

[0152] In this embodiment, the application layer is used to receive the write operation input by the user, and this operation is data encryption.

[0153] The kernel layer is connected to the application layer, and the transparent file system is configured in the kernel layer, and the cache allocation and write-back functions can be implemented inside the kernel layer.

[0154] The write-back function can be implemented in a transparent file system. The main steps of the write-back function are as follows: creating a linked list of computing units CU, creating a work queue, performing a block search on the data to be processed, configuring work items (allocating a computing unit for each work item), calling the FPGA driver for encryption calculation, and calling the target write function kernel_write to directly write the encrypted data to the disk storage device.

[0155] In this application, when the file system receives data that needs to be encrypted and stored, it does not immediately trigger the encryption operation and the process of writing to the disk. Instead, the data is temporarily stored in the memory buffer of the operating system. The memory buffer has the advantage of fast read and write speeds and can efficiently cache data at this stage. For example, when the user executes the sync command at the command line, the write-back operation is triggered, and the system starts to execute the write-back process, that is, the data cached in the memory buffer is encrypted and written to the disk in sequence according to the set rules and priorities. The encryption calculation is undertaken by the FPGA. Utilizing the parallel computing ability of the FPGA, it can quickly complete the encryption operation on batch data. After the data is encrypted, the encrypted data is officially written to the disk for persistent storage. This process realizes the organic combination of data caching, on-demand encryption, and writing to the disk, effectively reducing unnecessary encryption calculations and the frequency of disk I / O operations, and improving the performance of the encrypted heterogeneous computing system in the data storage link.

[0156] The heterogeneous computing system provided by this application can be applied to servers and acceleration boards. Especially for computing-intensive tasks such as data security and encryption of large data files, it greatly improves the working efficiency of the server and significantly reduces the data transmission delay. It is suitable for fields with extremely high requirements for data security, such as government departments, financial institutions, and other industries involving sensitive information processing. Thus, it can help these institutions not only improve the working efficiency of relevant operations but also ensure the security and compliance of the data transmission process, bringing great economic benefits.

[0157] On the other hand, this application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements each process of the above-mentioned encryption file processing method embodiment of heterogeneous computing and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0158] On the other hand, an embodiment of this application further provides a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above-mentioned encryption file processing method embodiment of heterogeneous computing and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0159] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.

[0160] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative effort.

[0161] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution or the part that contributes to the related technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An encrypted file processing method for heterogeneous computing, characterized in that Applied to an operating system, the operating system including a transparent file system; the method includes: When a write operation is received, caching the data to be processed into a memory buffer in the transparent file system; When it is detected that the operating system triggers a write-back process, calling a field-programmable gate array to perform an encryption operation on the data to be processed in the memory buffer; Writing the encrypted data to be processed into a disk storage device; the disk storage device is connected to the server host where the operating system is located.

2. The encrypted file processing method for heterogeneous computing according to claim 1, wherein, The field-programmable gate array includes a plurality of computing units; The calling the field-programmable gate array to perform an encryption operation on the data to be processed in the memory buffer includes: Sending the data to be processed to the device memory corresponding to the field-programmable gate array; Based on the encryption parameters corresponding to each of the computing units, calling each of the computing units to perform an encryption operation on the data to be processed.

3. The encrypted file processing method for heterogeneous computing according to claim 2, wherein Before the step of, based on the encryption parameters corresponding to each of the computing units, calling each of the computing units to perform an encryption operation on the data to be processed, the method further includes: Obtaining a plurality of work items in a work queue corresponding to the operating system; Dividing the data to be processed into a plurality of data blocks, and allocating the data blocks to each of the work items; each of the data blocks includes at least part of the data to be processed; Allocating a first target computing unit among the plurality of computing units to a target work item among the plurality of work items.

4. The encrypted file processing method for heterogeneous computing according to claim 2, wherein Before the step of, based on the encryption parameters corresponding to each of the computing units, calling each of the computing units to perform an encryption operation on the data to be processed, the method further includes: Dividing the data to be processed into a plurality of data blocks; each of the data blocks includes at least part of the data to be processed; When it is detected that a target data block among the plurality of data blocks includes a newly written data page, copying the target data block to a buffer array in the device memory corresponding to the field-programmable gate array to perform an encryption operation on the target data block.

5. The heterogeneous computing-based encrypted file processing method according to any one of claims 1-4, characterized in that The detecting that the operating system triggers a write-back process includes: When it is detected that the operating system meets at least one of a plurality of trigger conditions, determining that the operating system triggers a write-back process; the plurality of trigger conditions include: not writing the data to be processed into the disk storage device within a target duration threshold, the remaining memory capacity corresponding to the operating system being less than a target capacity threshold, and receiving a data synchronization command.

6. The heterogeneous computing-based encrypted file processing method according to any one of claims 1-4, characterized in that, The caching the data to be processed into a memory buffer in the transparent file system includes: Allocating a target buffer for each data page in the data to be processed from the memory buffer; Caching each of the data pages into the target buffer corresponding to the data page, and inserting each of the target buffers into a cache tree corresponding to the operating system.

7. The heterogeneous computing-based encrypted file processing method according to any one of claims 1-4, characterized in that, The operating system includes a virtual file system, and the virtual file system is connected to the transparent file system; the caching the data to be processed into a memory buffer in the transparent file system when a write operation is received includes: When the write operation is received, sending the write operation to the virtual file system; In the case where the write operation is detected to correspond to a target flag parameter, send the write operation from the virtual file system to the transparent file system; In response to the write operation, cache the data to be processed in the memory buffer area in the transparent file system.

8. The encrypted file processing method for heterogeneous computing according to any one of claims 1-4, characterized in that The writing the encrypted data to be processed into the disk storage device includes: Call a target write function to write the encrypted data to be processed into the disk storage device; the target write function corresponds to a target flag parameter.

9. The method for processing encrypted files in heterogeneous computing according to any one of claims 1-4, characterized in that The field programmable gate array includes a plurality of computing units, and each of the computing units is used to perform an encryption operation on at least part of the data to be processed; the writing the encrypted data to be processed into the disk storage device includes: Based on the linked list arrangement order of the plurality of computing units, write at least part of the data to be processed encrypted by each of the computing units into the disk storage device respectively.

10. The heterogeneous computing-based encrypted file processing method according to claim 9, wherein After writing at least part of the data to be processed encrypted by each of the computing units into the disk storage device respectively based on the linked list arrangement order of the plurality of computing units, the method further includes: Release a second target computing unit among the plurality of computing units; the second target computing unit is the computing unit corresponding to at least part of the data to be processed that has been written into the disk storage device; Insert the second target computing unit into a target position in the linked list corresponding to the plurality of computing units.

11. A computer program product, characterized in that, Applied to an operating system, the operating system includes a transparent file system; includes: A first processing module, configured to cache the data to be processed in the memory buffer area in the transparent file system when a write operation is received; A second processing module, configured to call a field programmable gate array to perform an encryption operation on the data to be processed in the memory buffer area when it is detected that the operating system triggers a write-back process; A third processing module, configured to write the encrypted data to be processed into the disk storage device; the disk storage device is connected to the server host where the operating system is located.

12. A heterogeneous computing system, characterized in that, Includes: An operating system, the operating system is deployed on a server host, and a driver corresponding to the field programmable gate array is deployed on the operating system; A disk storage device, the disk storage device is connected to the server host; An acceleration board, the acceleration board is connected to the server host, and the driver corresponding to the field programmable gate array is used to call the acceleration board.

13. The heterogeneous computing system according to claim 12, wherein The operating system includes: An application layer, the application layer is used to receive a write operation input by a user; A kernel layer, the kernel layer is connected to the application layer, and the kernel layer is configured with a transparent file system.

14. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the heterogeneous computing-based encrypted file processing method according to any one of claims 1-10.

15. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the heterogeneous computing-based encrypted file processing method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Caching method, caching architecture, heterogeneous architecture and electronic equipment

    CN116126747A

  • Transparent encryption and decryption computing system and method based on heterogeneous computing, equipment and medium

    CN117349870A

  • Storage device, write-back method, and computer product

    US20080052537A1

  • Virtual machines and cloud storage caching for cloud computing applications

    US8805951B1

Cited By

  • Storage equipment simulation method and device, electronic equipment and storage medium

    CN120872713A

  • Data encryption and decryption method, electronic equipment and computer program product

    CN122020692A