Data processing method and apparatus, device, and storage medium
By directly storing and reading data between the computing server and the computing device, the data delivery delay problem caused by the increase in computing power of the graphics processor is solved, and the computing performance of the system is improved.
Patent Information
- Application Number
- PCT/CN2024/116955
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-06
- Filing Date
- 2024-09-04
- Publication Date
- 2025-03-13
AI Technical Summary
When the prior art improves the computing power and flexibility of the graphics processor, the host's processing of network data packets has greatly increased data delivery delay, affecting the overall computing performance of the system.
The computing server issues target computing tasks to the computing device, including resource occupancy information of the source data to be calculated and remote direct address access requests, receive feedback information from the computing device to allocate storage addresses, realize direct storage and reading of data between memory of the computing device, and reduce data copying operations.
It greatly improves data transmission efficiency, reduces the system's computing delay, and improves overall computing performance.
Smart Images

Figure CN2024116955_13032025_PF_FP_ABST
Abstract
Description
Data processing method, device, equipment and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on September 6, 2023, with application number 202311141816.1, and application name “Data processing method, device, equipment and storage medium”, all contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, device and storage medium. Background Art
[0004] With the continuous development of artificial intelligence, graphics processor computing resources have become an indispensable infrastructure for artificial intelligence computing. In order to improve the computing power and flexibility of the graphics processor, networks and other auxiliary modules (such as field programmable gate arrays) are usually used to connect the host and the graphics processor, making the graphics processor more independent of the host, thereby achieving better scalability and flexibility. However, if all operations on the graphics processor are performed on the device itself, it is generally necessary to place a central processing unit on the device and then run the operating system on the central processing unit. However, this solution has relatively high performance requirements for the graphics processor, and even if a high-performance graphics processor is used, the host's processing of network data packets will greatly increase the delay in the data transmission process, affecting the overall computing performance of the system.
[0005] Summary of the Invention
[0006] In a first aspect, the present application provides a data processing method, the method comprising:
[0007] Sending target computing tasks to computing devices through computing servers, including resource occupancy information of source data to be calculated and remote direct address access requests;
[0008] receiving feedback information reported by the computing device based on the target computing task, the feedback information including a first storage address allocated for storing the source data to be calculated and a second storage address allocated for storing the calculation result data based on the remote direct address access request and resource occupancy information of the source data to be calculated;
[0009] storing the source data to be calculated in the first storage address based on the feedback information, so that the computing device performs data calculation based on the source data to be calculated;
[0010] In response to receiving calculation completion information reported by the calculation device based on the source data to be calculated, the calculation result data is read from the second storage address.
[0011] In some optional implementations, the computing device generates feedback information including:
[0012] Get the write request and read request in the remote direct address access request;
[0013] Allocate data storage space and result storage space for source data to be calculated based on resource usage information;
[0014] generating a first storage address based on a write request in the remote direct address access request and an address of the data storage space;
[0015] generating a second storage address based on the read request in the remote direct address access request and the address of the result storage space;
[0016] Feedback information is generated based on the first storage address and the second storage address.
[0017] In some optional implementations, the computing server stores the source data to be calculated in the first storage address based on the feedback information, so that the computing device performs data calculation based on the source data to be calculated, including:
[0018] The computing server obtains a first storage address for storing source data to be calculated;
[0019] The source data to be calculated is written into the data storage space allocated by the computing device based on the first storage address, and a computing instruction is generated to enable the computing device to perform data calculation based on the source data to be calculated.
[0020] In some optional implementations, the computing server stores the source data to be computed at the first storage address based on the feedback information, further comprising:
[0021] In response to the source data to be calculated not being successfully stored in the first storage address allocated by the computing device, allocating a first memory area with a continuous physical address for the source data to be calculated in the computing server;
[0022] The first address information of the first memory area is sent to the computing device, so that the computing device reads the source data to be calculated from the first memory area of the computing server based on the first address information and performs calculation.
[0023] In some optional implementations, the computing device further includes a first cache space, and the computing device reads the source data to be calculated from the first memory area of the computing server based on the first address information, including:
[0024] The computing device generates a read request based on the first address information to request that the source data to be calculated read from the computing server be copied into the first cache space;
[0025] Based on the first storage address, the source data to be calculated in the first cache space is written into the data storage space.
[0026] In some optional implementations, the computing device further includes a second cache space for copying the source data to be calculated into the first cache space, and further includes:
[0027] In response to insufficient space capacity of the first cache space in the computing device, copying the source data to be calculated into the second cache space;
[0028] Based on the first storage address, the source data to be calculated in the second cache space in the computing device is written into the data storage space.
[0029] In some optional embodiments, the computing server reads the computing result data from the second storage address, including
[0030] When calculation completion information reported by the computing device is received within a preset time, obtaining the second storage address;
[0031] The calculation result data is read from the result storage space allocated by the calculation device based on the second storage address.
[0032] In some optional implementations, the computing server reads the computing result data from the second storage address, and further includes:
[0033] In response to the computing server not receiving computing completion information reported by the computing device based on the source data to be computed within a preset time, or being unable to read the computing result data, allocating a second memory area with a continuous physical address for the computing result data in the computing server;
[0034] The second address information of the second memory area is sent to the computing device, so that the computing device writes the calculation result data into the second memory area of the computing server based on the second address information.
[0035] In some optional implementations, the computing device writes the calculation result data into the second memory area based on the second address information, including:
[0036] The computing device generates a write request based on the second address information to request that the computing result data read from the result storage space be cached in the first cache space;
[0037] Based on the second address information, the calculation result data in the first cache space in the computing device is written into the second memory area.
[0038] In some optional implementations, the calculation result data read from the result storage space is cached in the first cache space, further comprising:
[0039] In response to insufficient space capacity of the first cache space in the computing device, cache the computing result data in the second cache space;
[0040] Based on the second address information, the calculation result data in the second cache space in the computing device is written into the second memory area of the computing server.
[0041] In some optional implementations, writing the source data to be calculated in the first cache space and / or the second cache space in the computing device into the data storage space based on the first storage address includes:
[0042] Obtaining the amount of source data to be calculated in the first cache space and / or the second cache space in the computing device;
[0043] In response to the data amount of the source data to be calculated being greater than a first data amount threshold, the source data to be calculated in the first cache space and / or the second cache space is written into the data storage space based on the first storage address.
[0044] In some optional implementations, writing the calculation result data in the first cache space and / or the second cache space in the computing device into the second memory area based on the second address information includes:
[0045] Obtaining the amount of calculation result data in the first cache space and / or the second cache space in the computing device;
[0046] In response to the data volume of the calculation result data being greater than the second data volume threshold, the calculation result data in the first cache space and / or the second cache space is written into the second memory area based on the second address information.
[0047] In some optional embodiments, the method further comprises:
[0048] Determining a next cache state of the first cache space and the second cache space based on a request type; the request type includes a write request and a read request;
[0049] Based on the next cache state, determining a result write path for the calculation result data and a data write path for the source data to be calculated;
[0050] The result writing path includes a first result writing path from the result storage space to the first cache space and / or the second cache space, and a second result writing path from the first cache space and / or the second cache space to the second memory space;
[0051] The data write-out path includes a first data write-out path from the first memory area to the first cache space and / or the second cache space, and a second data write-out path from the first cache space and / or the second cache space to the data storage space.
[0052] In some optional implementations, determining the next cache state of the first cache space and the second cache space based on the request type includes:
[0053] Determining whether a next cache state of the first cache space and the second cache space is a full state based on the writable space of the first cache space and the second cache space and the request type;
[0054] Based on the to-be-calculated source data, calculation result data, and request type that can be written in the first cache space and the second cache space, it is determined whether the next cache state of the first cache space and the second cache space is an empty state.
[0055] In some optional implementations, before the computing server issues the computing task to the computing device, the method further includes:
[0056] The computing server receives the connection request initiated by the computing device and starts the target computing program according to the connection request;
[0057] A connection between the computing server and the computing device is established through the target computing program.
[0058] In some optional implementations, a task cluster is stored in the computing server, and the computing server sends a target computing task to the computing device, including:
[0059] Get the computing status of each computing task in the task cluster;
[0060] Based on the computing status and the idle resource status information carried in the connection request, the target computing task is sent to the computing device.
[0061] In some optional implementations, issuing a target computing task to a computing device based on the computing status and idle resource status information carried in the connection request includes:
[0062] Based on the idle resource status information, a target computing task is selected from computing tasks whose computing status is pending;
[0063] Obtain resource usage information of the source data to be calculated in the target computing task;
[0064] Send target computing tasks to computing devices based on resource occupancy information.
[0065] In a second aspect, the present application provides a data processing device, which is applied to a computing server. The device mainly includes: a task issuing module, an information feedback module, a data storage module and a data reading module; wherein,
[0066] The task delivery module is used to deliver the target computing task to the computing device through the computing server. The target computing task includes the resource occupancy information of the source data to be calculated and the remote direct address access request;
[0067] an information feedback module, configured to receive feedback information reported by a computing device based on a target computing task, the feedback information including a first storage address allocated for storing the source data to be calculated and a second storage address allocated for storing the calculation result data based on the remote direct address access request and resource occupancy information of the source data to be calculated;
[0068] A data storage module, configured to store the source data to be calculated in a first storage address based on the feedback information, so that the computing device performs data calculation based on the source data to be calculated;
[0069] The data reading module is configured to read the calculation result data from the second storage address in response to receiving the calculation completion information reported by the calculation device based on the source data to be calculated.
[0070] In a third aspect, the present application provides a data processing system, characterized by comprising: a computing server and a computing device;
[0071] The computing server is used to send target computing tasks to computing devices. The target computing tasks include resource occupancy information of the source data to be calculated and remote direct address access requests.
[0072] a computing device configured to receive feedback information reported by a target computing task, the feedback information including a first storage address allocated for storing the source data to be calculated and a second storage address allocated for storing the calculation result data based on the remote direct address access request and resource occupancy information of the source data to be calculated;
[0073] The computing server is further used to store the source data to be calculated in the first storage address based on the feedback information, and read the calculation result data from the second storage address in response to receiving the calculation completion information reported by the computing device based on the source data to be calculated.
[0074] In some optional implementations, the computing device further includes:
[0075] an autonomous forwarding module, configured to write the source data to be calculated into the data storage space corresponding to the first storage address based on the link information carried in the remote direct address access request;
[0076] The autonomous forwarding module is further used to obtain the calculation result data in the result storage space corresponding to the second storage address, and write the calculation result data to the calculation server based on the link information carried in the remote direct address access request.
[0077] In a fourth aspect, the present application provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer-readable instructions, and the processor executing the computer-readable instructions to execute the data processing method of the first aspect or any corresponding embodiment thereof.
[0078] In a fifth aspect, the present application provides one or more non-volatile computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the data processing method of the above-mentioned first aspect or any corresponding embodiment thereof is executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0080] FIG1 is a schematic diagram of an application environment of one or more embodiments of the present application;
[0081] FIG2 is a flow chart of a data processing method according to one or more embodiments of the present application;
[0082] FIG3 is a flow chart of another data processing method according to one or more embodiments of the present application;
[0083] FIG4 is a flow chart of another data processing method according to one or more embodiments of the present application;
[0084] FIG5 is a flowchart of yet another data processing method according to one or more embodiments of the present application;
[0085] FIG6 is a data flow diagram of one or more embodiments of the present application;
[0086] FIG7 is another data flow diagram of one or more embodiments of the present application;
[0087] FIG8 is a block diagram of a data processing device according to one or more embodiments of the present application;
[0088] FIG9 is a schematic diagram of the hardware structure of a computer device according to one or more embodiments of the present application. DETAILED DESCRIPTION
[0089] To make the purpose, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.
[0090] The terms "first" and "second" in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of its variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in this application can mean at least two, for example, two, three or more, and the embodiments of this application are not limited thereto.
[0091] Please refer to Figure 1, which is a schematic diagram of an application environment provided by an embodiment of the present application. This schematic diagram includes a computing device 100 that may include a field programmable gate array 101 and a graphics processor 102; the graphics processor 102 is used to calculate and store data, and the field programmable gate array is used to forward computing data. The computing device 100 can communicate with a computing server 200 via a network 300. A database 201 can be provided on or independently of the computing server 200 to provide data storage services for the computing server 200. In addition, the computing server 200 can run a processing engine 202, which can be used to execute the steps performed by the computing server 200.
[0092] Optionally, the computing device 100 may be, but is not limited to, a terminal capable of computing data, such as a mobile terminal (e.g., a tablet), a laptop, a PC (Personal Computer), or the like. The aforementioned network may include, but is not limited to, a wireless network or a wired network. Wireless networks include, but are not limited to, Bluetooth, WIFI (Wireless Fidelity), remote direct address access, and other networks that enable wireless communication. Wired networks may include, but are not limited to, wide area networks, metropolitan area networks, and server clusters. The aforementioned computing server 200 may include, but is not limited to, any hardware device capable of computing.
[0093] Furthermore, in this embodiment, the data processing method described above can also be applied, but is not limited to, to an independent processing device with relatively powerful processing capabilities, without requiring data exchange. For example, the processing device can be, but is not limited to, a terminal device with relatively powerful processing capabilities. That is, the various operations in the data processing method described above can be integrated into an independent processing device. The above is merely an example and is not intended to be limiting in this embodiment.
[0094] Optionally, in this embodiment, the above data processing method may be executed by the computing server 200, or by the computing device 100, or may be jointly executed by the computing server 200 and the computing device 100. The computing device 100 may execute the data processing method of the embodiment of the present application, or the client installed thereon.
[0095] According to an embodiment of the present application, an embodiment of a data processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0096] In this embodiment, a data processing method is provided, which can be used in the above-mentioned computing server. FIG2 is a flow chart of the data processing method according to an embodiment of the present application. As shown in FIG2 , the flow chart includes the following steps:
[0097] Step S201: Send a target computing task to a computing device through a computing server. The target computing task includes resource occupancy information of source data to be calculated and a remote direct address access request.
[0098] As described above, the computing server issues a target computing task to the computing device, informing the computing device of the resource usage information of the source data to be computed. Direct memory access is also established between the computing device and the computing server based on a remote direct address access request. The source data to be computed may include the computation model, data volume, and number of computations.
[0099] In some optional implementations, a task cluster is stored in the computing server, and the computing server can first receive a connection request initiated by the computing device, and start the target computing program according to the connection request; establish a connection between the computing server and the computing device through the target computing program; then obtain the computing status of each computing task in the task cluster; and send the target computing task to the computing device based on the computing status and the idle resource status information carried in the connection request.
[0100] For example, when the computing server receives a connection request initiated by the computing device through the socket, it starts the target computing program, such as an artificial intelligence computing program, according to the connection request, and then allows the artificial intelligence computing program to establish a network connection between the computing server and the computing device; at this time, the computing server obtains the computing status of each computing task stored internally, and sends the target computing task to the computing device based on the computing status of each computing task and the idle resource status information carried in the connection request.
[0101] In some optional implementations, when issuing a target computing task to a computing device based on the computing status and the idle resource status information carried in the connection request, the target computing task can be selected from the computing tasks with a computing status of to-be-calculated based on the idle resource status information; the resource occupancy information of the source data to be calculated in the target computing task can be obtained; and the target computing task can be issued to the computing device based on the resource occupancy information.
[0102] For example, when issuing a target computing task to a computing device, you can first obtain the amount of idle resources carried in the idle resource status information; then sort the computing tasks with a computing status of to-be-calculated according to the resource occupancy information, and then traverse the resource occupancy information based on the idle resource amount, so as to select the target computing task from the computing tasks with a computing status of to-be-calculated; finally, issue the target computing task to the computing device based on the resource occupancy information of the source data to be calculated in the target computing task.
[0103] Step S202, receiving feedback information reported by the computing device based on the target computing task, the feedback information includes the first storage address allocated for storing the source data to be calculated and the second storage address allocated for storing the calculation result data based on the remote direct address access request and the resource occupancy information of the source data to be calculated.
[0104] As mentioned above, by receiving the feedback information of the first storage address for storing the source data to be calculated and the second storage address for storing the calculation result data reported by the computing device based on the target computing task, it is convenient to write the source data to be calculated and directly read the calculation result data.
[0105] In some optional embodiments, when generating feedback information, the computing device may first obtain a write request and a read request in a remote direct address access request; allocate data storage space and result storage space for the source data to be calculated based on resource occupancy information; generate a first storage address based on the write request and the address of the data storage space in the remote direct address access request; generate a second storage address based on the read request and the address of the result storage space in the remote direct address access request; and generate feedback information based on the first storage address and the second storage address.
[0106] Specifically, upon receiving a computing task from a computing server, the computing device first allocates corresponding computing resources and corresponding memory space, such as data storage space and result storage space, to the source data to be computed based on the resource occupancy information of the source data to be computed. Simultaneously, based on the write request in the remote direct address access request and the address of the data storage space, a first storage address is generated, allowing the computing server to directly write the source data to be computed based on the first storage address. Based on the read request in the remote direct address access request and the address of the result storage space, a second storage address is generated, allowing the computing server to directly read the computation result data into its own memory based on the second storage address, thereby saving the time consumed by data copying.
[0107] Step S203: storing the source data to be calculated in the first storage address based on the feedback information, so that the computing device performs data calculation based on the source data to be calculated.
[0108] As described above, by storing the source data to be calculated in the first storage address based on the feedback information, an operation similar to data copying is saved, which can greatly improve the data transmission efficiency and enhance the overall computing performance of the system.
[0109] In some optional embodiments, the source data to be calculated is stored in a first storage address based on feedback information, so that when the computing device performs data calculation based on the source data to be calculated, the computing server first obtains the first storage address of the data storage space for storing the source data to be calculated based on the feedback information; then directly accesses the first storage address through the remote address, thereby writing the source data to be calculated into the data storage space; at the same time, generates a computing instruction to inform the computing device that the source data to be calculated has been written, and enables the computing device to perform data calculation based on the source data to be calculated.
[0110] Step S204: upon receiving calculation completion information reported by the calculation device based on the source data to be calculated, reading the calculation result data from the second storage address.
[0111] As described above, by reading the calculation result data from the second storage address when receiving the calculation completion information reported by the computing device, a similar data copy operation is saved, which can further significantly improve the data transmission efficiency and enhance the overall computing performance of the system.
[0112] In some optional embodiments, if a calculation completion message based on the source data to be calculated is received from the computing device within a preset time, the second storage address in the feedback message is obtained; the second storage address is then directly accessed via a remote address, thereby directly reading the calculation result data from the result storage space. Prior to receiving the calculation completion message reported by the computing device, the computing service device may be in a busy wait state.
[0113] Through the above process, the source data to be calculated in the computing server can be directly written into the memory of the computing device, thereby saving a similar data copy operation, and by directly reading the calculation result data from the memory of the computing device to the host memory of the computing server, further saving a similar data copy operation, which can greatly improve data transmission efficiency and enhance the overall computing performance of the system.
[0114] The data processing method provided in this embodiment first issues a target computing task to the computing device so as to inform the computing device of the resource occupancy information of the source data to be calculated for data calculation, and at the same time establishes direct access to the memory between the computing device and the computing server based on the remote direct address access request; by receiving feedback information of a first storage address for storing the source data to be calculated and a second storage address for storing the calculation result data reported by the computing device based on the target computing task, so as to write the source data to be calculated and directly read the calculation result data; by storing the source data to be calculated in the first storage address based on the feedback information, thereby saving an operation similar to data copying, which can greatly improve the data transmission efficiency and improve the overall computing performance of the system; by reading the calculation result data from the second storage address when receiving the calculation completion information reported by the computing device, thereby saving an operation similar to data copying, which can further greatly improve the data transmission efficiency and improve the overall computing performance of the system.
[0115] In this embodiment, a data processing method is provided, which can be used in the above-mentioned computing server. FIG3 is a flow chart of the data processing method according to the embodiment of the present application. As shown in FIG3 , the flow chart includes the following steps:
[0116] Step S301: Send a target computing task to a computing device through a computing server. The target computing task includes resource occupancy information of source data to be calculated and a remote direct address access request.
[0117] As described above, the computing server issues a target computing task to the computing device, informing the computing device of the resource usage information of the source data to be computed. Direct memory access is also established between the computing device and the computing server based on a remote direct address access request. The source data to be computed may include the computation model, data volume, and number of computations.
[0118] Please refer to step S201 of the embodiment shown in FIG2 for details, which will not be described again here.
[0119] Step S302, receiving feedback information reported by the computing device based on the target computing task, the feedback information includes resource occupancy information for the remote direct address access request and the source data to be calculated, the allocated first storage address for storing the source data to be calculated, and the second storage address for storing the calculation result data.
[0120] As mentioned above, by receiving feedback information of the first storage address for storing the source data to be calculated and the second storage address for storing the calculation result data reported by the computing device based on the target computing task, the source data to be calculated can be written and the calculation result data can be directly read through remote direct address access.
[0121] Please refer to step S202 of the embodiment shown in FIG2 for details, which will not be described again here.
[0122] Step S303: storing the source data to be calculated in the first storage address based on the feedback information.
[0123] As described above, by storing the source data to be calculated in the first storage address based on the feedback information, an operation similar to data copying is saved, which can greatly improve the data transmission efficiency and enhance the overall computing performance of the system.
[0124] Please refer to step S203 of the embodiment shown in FIG2 for details, which will not be described again here.
[0125] Step S304: When the source data to be calculated is not successfully stored in the first storage address allocated by the computing device, a first memory area with a continuous physical address is allocated to the source data to be calculated in the computing server.
[0126] As mentioned above, if the source data to be calculated is not successfully stored in the first storage address allocated by the computing device, a first memory area with a continuous physical address is allocated to the source data to be calculated in the computing server, so that the computing device can actively read the source data to be calculated, that is, directly access the computing server memory.
[0127] In some optional embodiments, when the computing server stores the source data to be calculated in the data storage space based on the first storage address, the write status of the source data to be calculated in the data storage space is monitored. When the source data to be calculated is not written within the threshold time, the written data is incomplete, or the written data is erroneous, it is determined that the source data to be calculated has not been successfully stored in the first storage address. At this time, in order to enable the target computing task to operate normally, a first memory area with a continuous physical address is allocated to the source data to be calculated on the computing server. It can be understood that the first memory area can be composed of multiple areas with continuous physical addresses.
[0128] Step S305: Send the first address information of the first memory area to the computing device, so that the computing device reads the source data to be calculated from the first memory area of the calculated server based on the first address information and performs calculation.
[0129] As described above, by sending the first address information of the first memory area to the computing device, the computing device can actively read and calculate the source data to be calculated when the computing server fails to write the source data to be calculated.
[0130] In some optional embodiments, in order to enable the image processor of the computing device to directly access the memory of the computing server through the bus PCIe using a remote address, or when the image processor of the computing device cannot directly access the memory of the computing server, the field programmable gate array of the computing device is also configured with a first cache space and a second cache space. When the source data to be calculated is not successfully stored in the first storage address, the computing device generates a read request based on the first address information to request that the source data to be calculated read from the computing server be copied to the first cache space, and then based on the first storage address, the source data to be calculated in the first cache space is written to the data storage space, thereby realizing the forwarding of the source data to be calculated.
[0131] Specifically, when the computing device receives first address information of a first memory region with a continuous physical address assigned by the computing server, a read request is generated based on the first address information of the first memory region. The read request is used to read the source data to be calculated in the first memory region into the data storage space of the graphics processor in the computing device. However, since the graphics processor in the computing device and the data storage space of the computing service cannot be directly accessed via a remote address or need to directly access the memory of the computing server via a PCIe bus, in order to avoid directly writing the source data to be calculated into the memory of the field editable gate array and then forwarding it to the graphics processor by software, when the graphics processor in the computing device generates a read request based on the first address information and the target address of the read request is the first memory region, the field editable gate array intercepts the read request and, based on the read request, copies the source data to be calculated into the first cache space; and then, based on the first storage address, writes the source data to be calculated in the first cache space into the data storage space.
[0132] In some optional embodiments, when the space capacity of the first cache space in the computing device is insufficient, the source data to be calculated is copied to the second cache space; based on the first storage address, the source data to be calculated in the second cache space in the computing device is written to the data storage space.
[0133] Specifically, based on the first storage address, when the source data to be calculated in the first cache space and / or the second cache space in the computing device is written into the data storage space, the data volume of the source data to be calculated in the first cache space and / or the second cache space in the computing device can be obtained; when the data volume of the source data to be calculated is greater than the first data volume threshold, the source data to be calculated in the first cache space and / or the second cache space is written into the data storage space based on the first storage address. In other embodiments, the source data to be calculated in the first cache space and / or the second cache space can also be written into the data storage space based on the first storage address after a period of time. It can be understood that by centrally reading and writing the source data to be calculated, the overhead of the computing device can be reduced, and at the same time, the calculation of the read source data to be calculated can be facilitated.
[0134] Step S306: upon receiving the calculation completion information reported by the calculation device within the preset time, reading the calculation result data from the second storage address.
[0135] As mentioned above, if the computing server receives the calculation completion information reported by the computing device within the preset time, it reads the calculation result data from the second storage address, thereby saving a similar data copy operation, which can further greatly improve the data transmission efficiency and enhance the overall computing performance of the system.
[0136] Please refer to step S204 of the embodiment shown in FIG2 for details, which will not be described again here.
[0137] The data processing method provided in this embodiment first sends a target computing task to the computing device to inform the computing device of the resource occupancy information of the source data to be calculated for data calculation, and at the same time establishes direct access to the memory between the computing device and the computing server based on the remote direct address access request; by receiving the feedback information of the first storage address for storing the source data to be calculated and the second storage address for storing the calculation result data reported by the computing device based on the target computing task, the source data to be calculated can be written and the calculation result data can be directly read; by storing the source data to be calculated in the first storage address based on the feedback information, an operation similar to data copying is saved, which can greatly improve the data transmission efficiency and enhance the efficiency. The overall computing performance of the system; if the source data to be calculated is not successfully stored in the first storage address, a first memory area with a continuous physical address is allocated to the source data to be calculated, so that the computing device can actively read the source data to be calculated, that is, directly access the memory of the computing server; by sending the first address information of the first memory area to the computing device, the computing device can actively read the source data to be calculated when the computing server fails to write the source data to be calculated; by reading the calculation result data from the second storage address when the calculation completion information reported by the computing device is received within the preset time, a similar data copy operation is saved, which can further greatly improve the data transmission efficiency and enhance the overall computing performance of the system.
[0138] In this embodiment, a data processing method is provided, which can be used in the above-mentioned computing server. FIG4 is a flow chart of the data processing method according to an embodiment of the present application. As shown in FIG4 , the flow chart includes the following steps:
[0139] Step S401: Send a target computing task to a computing device through a computing server. The target computing task includes resource occupancy information of source data to be calculated and a remote direct address access request.
[0140] As described above, by issuing a target computing task to a computing device, the computing device is informed of the resource usage information of the source data to be calculated, and direct memory access is established between the computing device and the computing server based on a remote direct address access request. The source data to be calculated may include the calculation model, data volume, and number of calculations.
[0141] Please refer to step S201 of the embodiment shown in FIG2 for details, which will not be described again here.
[0142] Step S402: receiving feedback information reported by the computing device based on the target computing task, where the feedback information includes a first storage address for storing source data to be calculated and a second storage address for storing calculation result data.
[0143] As mentioned above, by receiving the feedback information of the first storage address for storing the source data to be calculated and the second storage address for storing the calculation result data reported by the computing device based on the target computing task, it is convenient to write the source data to be calculated and directly read the calculation result data.
[0144] Please refer to step S202 of the embodiment shown in FIG2 for details, which will not be described again here.
[0145] Step S403: storing the source data to be calculated in the first storage address based on the feedback information, so that the computing device performs data calculation based on the source data to be calculated.
[0146] As described above, by storing the source data to be calculated in the first storage address based on the feedback information, an operation similar to data copying is saved, which can greatly improve the data transmission efficiency and enhance the overall computing performance of the system.
[0147] Please refer to step S203 of the embodiment shown in FIG2 for details, which will not be described again here.
[0148] Step S404: If the computing server does not receive the computing completion information reported by the computing device based on the source data to be calculated within the preset time, or cannot read the computing result data, a second memory area with a continuous physical address is allocated to the computing result data in the computing server.
[0149] As mentioned above, if the computing server does not receive the calculation completion information reported by the computing device based on the source data to be calculated within the preset time, or cannot read the calculation result data, a second memory area with a continuous physical address is allocated to the calculation result data in the computing server, so that the computing device can actively write the result data to be calculated, that is, directly access the computing server memory, thereby saving an operation similar to data copying, which can greatly improve data transmission efficiency and enhance the overall computing performance of the system.
[0150] In some optional embodiments, when the computing server reads the calculation result data from the result storage space based on the second storage address, the calculation completion information and the reading status of the calculation result data are monitored. If the calculation completion information reported by the computing device is not received within a preset time, or the calculation result data cannot be read, it is determined that the reading of the calculation result data has failed. At this time, in order to enable the calculation result data of the target computing task to be read normally, a second memory area with a continuous physical address is allocated to the calculation result data on the computing server. It is understandable that the second memory area can be composed of multiple areas with continuous physical addresses.
[0151] Step S405: Send the second address information of the second memory area to the computing device, so that the computing device writes the calculation result data into the second memory area of the computing server based on the second address information.
[0152] As described above, the computing server sends the second address information of the second memory area to the computing device, thereby enabling the computing device to actively write the computing result when the computing server fails to read the computing result data.
[0153] In some optional embodiments, when the computing device writes the calculation result data to the second memory area based on the second address information, the computing device generates a write request based on the second address information to request that the calculation result data read from the result storage space be cached in the first cache space, and then, based on the second address information, the calculation result data in the first cache space of the computing device be written to the second memory area. When the space capacity of the first cache space of the computing device is insufficient, the calculation result data in the computing device is cached in the second cache space; and, based on the second address information, the calculation result data in the second cache space is written to the second memory area of the computing server.
[0154] Specifically, when the computing device receives the second address information of the second memory area with a continuous physical address assigned by the computing server, a write request is generated based on the second address information of the second memory area. The write request is used to write the calculation result data in the result storage space into the second memory area of the computing server. However, because the graphics processor in the computing device and the computing service data storage space cannot be directly accessed via a remote address or need to directly access the memory of the computing server via the PCIe bus, in order to avoid directly writing the calculation result data in the graphics processor into the memory of the field editable gate array and then forwarding it to the computing server by software, when the graphics processor in the computing device generates a write request based on the second address information and the target address of the write request is the second memory area, the field editable gate array intercepts the write request and, based on the write request, temporarily caches the calculation result data in the calculation result space into the first cache space; and then, based on the second address information, writes the calculation result data in the first cache space into the second memory area.
[0155] In some optional implementations, when the computing device writes the calculation result data in the first cache space and / or the second cache space into the second memory area based on the second address information, the data volume of the calculation result data in the first cache space and / or the second cache space can be obtained; when the data volume of the calculation result data is greater than the second data volume threshold, the calculation result data in the first cache space and / or the second cache space is written into the second memory area of the computing server based on the second address information. In other embodiments, the computing device can also write the calculation result data in the first cache space and / or the second cache space into the second storage area based on the first storage address after a period of time. It can be understood that the overhead of the computing device can be reduced by centrally writing the calculation result data.
[0156] The data processing method provided in this embodiment first issues a target computing task to a computing device to inform the computing device of resource usage information of source data to be calculated, and simultaneously establishes direct memory access between the computing device and a computing server based on a remote direct address access request. The method receives feedback information, reported by the computing device based on the target computing task, regarding a first storage address for storing the source data to be calculated and a second storage address for storing calculation result data, so as to facilitate writing the source data to be calculated and directly reading the calculation result data. By storing the source data to be calculated in the first storage address based on the feedback information, a data copy operation is saved, which can significantly improve data transmission efficiency and enhance the overall computing performance of the system. If no calculation completion information reported by the computing device is received within a preset time, or the calculation result data cannot be read, a second memory area with a continuous physical address is allocated for the calculation result data, so that the computing device can actively write the calculation result data, that is, directly access the memory of the computing server, thereby again saving a data copy operation. By issuing the second address information of the second memory area to the computing device, the computing device can actively write the calculation result data if the computing server fails to read the calculation result data.
[0157] In this embodiment, a data processing method is provided, which can be used in the above-mentioned computing server. FIG5 is a flow chart of the data processing method according to the embodiment of the present application. As shown in FIG5 , the flow chart includes the following steps:
[0158] Step S501: Allocate a first memory region with continuous physical addresses to source data to be calculated, and allocate a second memory region with continuous physical addresses to calculation result data.
[0159] As mentioned above, by allocating a first memory area with a continuous physical address to the source data to be calculated, the computing device can actively obtain the source data to be calculated when it receives the target computing task; by allocating a second memory area with a continuous physical address to the calculation result data, the computing device can actively upload the calculation result data when the calculation is completed.
[0160] Step S502: Send a target computing task to the computing device. The target computing task includes resource occupancy information of the source data to be calculated and a remote direct address access request.
[0161] As described above, by issuing a target computing task to a computing device, the computing device is informed of the resource usage information of the source data to be calculated, and direct memory access is established between the computing device and the computing server based on a remote direct address access request. The source data to be calculated may include the calculation model, data volume, and number of calculations.
[0162] Please refer to step S201 of the embodiment shown in FIG2 for details, which will not be described again here.
[0163] Step S503: Send the first address information of the first memory area to the computing device, so that the computing device reads the source data to be calculated based on the first address information.
[0164] As described above, by sending the first address information of the first memory area to the computing device, the computing device can actively read the source data to be calculated when the computing server fails to write the source data to be calculated.
[0165] Please refer to step S304 of the embodiment shown in FIG3 for details, which will not be described again here.
[0166] Step S504: Send the second address information of the second memory area to the computing device, so that the computing device writes the calculation result data into the second memory area based on the second address information.
[0167] As mentioned above, by allocating a second memory area with a continuous physical address to the calculation result data, the computing device can actively write the result data to be calculated, that is, directly access the memory of the computing server, thereby saving an operation similar to data copying, which can greatly improve data transmission efficiency and enhance the overall computing performance of the system.
[0168] In some optional embodiments, when calculating the result write path of the result data and the data write path of the source data to be calculated, the next cache state of the first cache space and the second cache space can be determined based on the request type; the request type includes a write request and a read request; based on the next cache state, the result write path of the result data and the data write path of the source data to be calculated are determined. Wherein, the result write path includes a first result write path from the result storage space to the first cache space and / or the second cache space, and a second result write path from the first cache space and / or the second cache space to the second memory space; the data write path includes a first data write path from the first memory area to the first cache space and / or the second cache space, and a second data write path from the first cache space and / or the second cache space to the data storage space.
[0169] In some optional embodiments, when determining the next cache state of the first cache space and the second cache space based on the request type, it can be determined whether the next cache state of the first cache space and the second cache space is a full state based on the writable space of the first cache space and the second cache space and the request type; based on the writable source data to be calculated, calculation result data and request type in the first cache space and the second cache space, it can be determined whether the next cache state of the first cache space and the second cache space is an empty state.
[0170] For example, when the request type is a write request, the next cache state of the first cache space is determined to be a non-full state; when the request type is a write request and the amount of calculation result data that can be written or the amount of source data to be calculated is 1, the next cache state of the first cache space is determined to be a full state; when neither a write request nor a write request is received, the next cache state of the first cache space is determined to remain unchanged. In the process of determining the empty state, when the request type is a write request, the next cache state of the first cache space is determined to be a non-empty state; when the request type is a write request and the amount of calculation result data that can be written or the amount of source data to be calculated is 1, the next cache state of the first cache space is determined to be an empty state; when neither a write request nor a write request is received, the next cache state of the first cache space is determined to remain unchanged.
[0171] The data processing method provided in this embodiment first allocates a first memory area with a continuous physical address to the source data to be calculated, so that the computing device can actively obtain the source data to be calculated when receiving the target computing task; allocates a second memory area with a continuous physical address to the calculation result data, so that the computing device can actively upload the calculation result data when the calculation is completed; sends the target computing task to the computing device, so as to inform the computing device of the resource occupancy information of the source data to be calculated for data calculation, and at the same time establishes direct access to the memory between the computing device and the computing server based on the remote direct address access request; by sending the first address information of the first memory area to the computing device, the computing device can actively read the source data to be calculated when the computing server fails to write the source data to be calculated; by allocating a second memory area with a continuous physical address to the calculation result data, the computing device can actively write the result data to be calculated, that is, directly access the computing server memory, thereby saving an operation similar to data copying, which can greatly improve the data transmission efficiency and enhance the overall computing performance of the system.
[0172] During the data transfer process (metadata to be calculated and calculation result data), the computing server directly writes or reads the data through direct access to a remote address. However, in actual work, some models of FPGAs do not support direct access to the dual-port memory within the FPGA by external modules or the CPU. In this case, the FPGA needs to use direct memory access (DMA) to directly access the system memory (DMA memory for distributed devices) through the bus. For distributed computing devices, to avoid data being written to the FPGA memory and then forwarded to the host memory by the software-controlled remote address direct access module (because this scenario has poor performance), it is necessary to support the FPGA to directly access the host memory through DMA (plus other new logic to bypass software and avoid CPU intervention). For this scenario, this embodiment also provides a data processing system, as shown in FIG6 , including a computing server and a computing device. The computing server is configured to issue a target computing task to the computing device, the target computing task including resource occupancy information of the source data to be calculated and a remote direct address access request. The computing device is configured to allocate a first storage address for storing the source data to be calculated and a second storage address for storing calculation result data based on feedback information reported by the target computing task, the feedback information including the resource occupancy information of the source data to be calculated based on the remote direct address access request and the source data to be calculated. The computing server is further configured to store the source data to be calculated in the first storage address based on the feedback information, and read the calculation result data from the second storage address upon receiving calculation completion information reported by the computing device based on the source data to be calculated. The computing device also includes an autonomous forwarding module configured to write the source data to be calculated into the data storage space corresponding to the first storage address based on the link information carried in the remote direct address access request. The autonomous forwarding module is further configured to obtain the calculation result data in the result storage space corresponding to the second storage address, and write the calculation result data to the computing server based on the link information carried in the remote direct address access request.
[0173] Specifically, the computing device includes a graphics processor and a field programmable gate array connected to it; the computing server includes a central processing unit, the host includes a central processing unit, and a host memory and a remote address direct access network card connected to the central processing unit; the field programmable gate array includes an automatic forwarding module, which can perform internal cache memory (first cache space), as well as a field programmable gate array memory (second cache space) connected to the automatic forwarding module, and a remote address direct access module, which is connected to the remote address direct access network card; the graphics processor includes a dual-port memory and a computing unit, and the image processor and the field programmable gate array communicate through a bus (PCIe module).
[0174] Taking the support of direct memory access write operations for the graphics processor as an example, the specific working process is as follows:
[0175] ① The software on the computing server applies for a physical address continuous memory area (the second memory area), provides it to the image processor for access, and notifies the starting address and length of this memory area to the software running on the field programmable gate array soft core.
[0176] ② The software running on the FPGA soft core configures the host memory address in step ① to the image processor and the automatic forwarding module. The image processor will access this address as ordinary host memory.
[0177] ③ The image processor begins to write the calculation result data to the above memory area through direct memory access operation.
[0178] ④ The automatic forwarding module captures the address and data signals (belonging to the address range configured in step ②) of the memory access behavior sent by the image processor (through direct memory access) via the bus.
[0179] ⑤ The automatic forwarding module temporarily caches the calculation result data into its own internal cache (first cache space). When the space is insufficient, it can use the field programmable gate array on-board memory (second cache space).
[0180] ⑥ The automatic forwarding module accesses the remote address direct access module, and writes the calculation result data into the corresponding address (second address information) of the host memory (second memory area) through the remote address direct access write operation.
[0181] For the scenario where the image processor directly reads the host memory through direct memory access, the working process is as follows.
[0182] ① The software on the host applies for a memory area with continuous physical addresses (the first memory area), provides it to the image processor for access, and notifies the software running on the field programmable gate array soft core of the starting address and length of this memory area.
[0183] ② The software running on the FPGA soft core configures the host memory address in step ① to the image processor and the automatic forwarding module. The image processor will access this address as ordinary host memory.
[0184] ③ The image processor starts to read the source data to be calculated from the above memory area through direct memory access read operation.
[0185] ④ The automatic forwarding module captures the address signal (belonging to the address range configured in step ②) of the memory read behavior sent by the image processor (through direct memory access) through the bus, but does not give any response to the image processor for the time being.
[0186] ⑤ The automatic forwarding module accesses the remote address direct access module, and copies the source data to be calculated from the corresponding address of the host memory to the internal cache (first cache space) through the remote address direct access read operation. When the space is insufficient, the field programmable gate array on-board memory (second cache space) can be used.
[0187] ⑥ The automatic forwarding module begins to reply to the image processor's direct memory access read behavior by sending bus messages, and at the same time passes the source data to be calculated to the image processor.
[0188] It is understandable that by eliminating any notification (ie, network data transmission and reception) behavior between the computing server and the application of the computing device, a certain amount of computing time can be saved.
[0189] Please refer to Figure 7, which shows a data flow diagram for a computing device and a computing server in a data processing system. The computing server host includes a central processing unit (CPU) and a first field programmable gate array (FPGA) board connected to the CPU via a PCIe bus. The first FPGA board supports Ethernet logic and remote address direct access logic. The computing device also includes a second FPGA board and a graphics processor connected via a PCIe bus. The second FPGA board supports Ethernet logic and remote address direct access logic, that is, the second FPGA board interacts with the first FPGA board via Ethernet logic and remote address direct access logic. The second FPGA board also includes an interactive soft core and FPGA board memory, and the FPGA board memory also supports Ethernet logic and remote address direct access logic.
[0190] Specifically, the image processor and the central processing unit are connected via the PCIe bus. The image processor generally provides at least two base address registers for the central processing unit to access itself. One is the VRAM Bar. After the central processing unit maps the address to this Bar, it can directly read and write the contents of the memory on the image processor (called VRAM, or Visible RAM) through address access. The other is the register Bar. After the central processing unit maps the address to this Bar, it can use it to read and write various configurations in the image processor and operate various functions, such as initiating data transmission, reading interrupt status, restarting the device, etc.
[0191] The image processor consists of multiple modules. The AI computing application performs specific AI calculations, the MailBox assists other modules in communicating with the CPU, the MCU handles functions such as restart and power management, the DMA data transfer module accesses host memory via DMA, and the address translation unit helps other modules (such as the AI computing unit or MCU) convert virtual addresses into physical addresses for accessing on-board field programmable gate array memory or host memory.
[0192] The software running on the central processing unit can be divided into three major parts. The kernel-mode driver has the highest system authority and is responsible for memory management (including address mapping of all registers, assigning VRAM address segments to various functions, creating page tables and writing them to VRAM to assist the computing unit and MCU in the graphics processor in accessing VRAM or host memory), writing necessary firmware to the graphics processor, assisting the user-mode driver with address mapping, handling error interrupts, etc. The user-mode driver, as an intermediate layer, is responsible for providing APIs (function call interfaces) to applications, creating data streams (queues), initiating calculations, allocating and mapping VRAM (requiring cooperation from the kernel-mode driver), etc. The application is at the top layer and directly calls the APIs provided by the standard glibc dynamic library and the user-mode driver to perform the computing tasks required by the user.
[0193] In this embodiment, a data processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. Details that have been described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0194] This embodiment provides a data processing device, which is applied to a computing server, as shown in FIG8 , including:
[0195] The task issuing module 801 is used to issue a target computing task to the computing device through the computing server. The target computing task includes resource occupancy information of the source data to be calculated and a remote direct address access request.
[0196] An information feedback module 802 is configured to receive feedback information reported by a computing device based on a target computing task, the feedback information including a first storage address allocated for storing the source data to be calculated and a second storage address allocated for storing the calculation result data based on the remote direct address access request and resource usage information of the source data to be calculated;
[0197] The data storage module 803 is configured to store the source data to be calculated in the first storage address based on the feedback information, so that the computing device performs data calculation based on the source data to be calculated;
[0198] The data reading module 804 is configured to read the calculation result data from the second storage address upon receiving calculation completion information reported by the calculation device based on the source data to be calculated.
[0199] The task issuing module 801 includes:
[0200] The connection establishment unit is used to enable the computing server to receive the connection request initiated by the computing device, start the target computing program according to the connection request, and establish a connection between the computing server and the computing device through the target computing program, wherein the computing server stores the task cluster.
[0201] The task dispatching unit is used to obtain the computing status of each computing task in the task cluster; based on the computing status and the idle resource status information carried in the connection request, dispatch the target computing task to the computing device.
[0202] Optionally, the task issuing unit includes:
[0203] The task selection subunit is used to select a target computing task from computing tasks in a computing state of pending computing based on idle resource status information;
[0204] The information acquisition subunit is used to obtain resource occupancy information of the source data to be calculated in the target computing task;
[0205] The task issuing subunit is used to issue target computing tasks to computing devices based on resource occupancy information.
[0206] In some optional implementations, the information feedback module 802 includes:
[0207] A request acquisition unit, configured to acquire a write request and a read request in a remote direct address access request;
[0208] A space allocation unit is used to allocate data storage space and result storage space for source data to be calculated based on resource occupancy information;
[0209] a first address generating unit, configured to generate a first storage address based on a write request in a remote direct address access request and an address of a data storage space;
[0210] a second address generating unit, configured to generate a second storage address based on the read request in the remote direct address access request and the address of the result storage space;
[0211] The feedback information generating unit is configured to generate feedback information based on the first storage address and the second storage address.
[0212] In some optional implementations, the data storage module 803 includes:
[0213] A first area allocation unit is configured to allocate a first memory area with a continuous physical address to the source data to be calculated in the computing server when the source data to be calculated is not successfully stored in the first storage address allocated by the computing device;
[0214] The first information sending unit is used to send the first address information of the first memory area to the computing device, so that the computing device reads the source data to be calculated from the first memory area of the computing server based on the first address information and performs calculation.
[0215] Optionally, the computing device further includes a first cache space and a second cache space, and the first information sending unit includes:
[0216] A first source data copying unit is configured to enable the computing device to generate a read request based on the first address information, requesting to copy the source data to be calculated read from the computing server into the first cache space;
[0217] A first source data writing unit is configured to write the source data to be calculated in the first cache space into the data storage space based on the first storage address;
[0218] a second source data copying unit, configured to copy the source data to be calculated into the second cache space when the space capacity of the first cache space in the computing device is insufficient;
[0219] The second source data writing unit writes the source data to be calculated in the second cache space of the computing device into the data storage space based on the first storage address.
[0220] In some optional embodiments, the data storage module 803 is also used to obtain the data volume of the source data to be calculated in the first cache space and / or the second cache space in the computing device when writing the source data to be calculated in the first cache space and / or the second cache space in the computing device into the data storage space based on the first storage address; when the data volume of the source data to be calculated is greater than the first data volume threshold, the source data to be calculated in the first cache space and / or the second cache space is written into the data storage space based on the first storage address.
[0221] In some optional implementations, the data reading module 804 includes:
[0222] The first data reading unit is used to obtain the second storage address when receiving the calculation completion information reported by the computing device within a preset time; and read the calculation result data from the result storage space allocated by the computing device based on the second storage address.
[0223] The second data reading unit is used to allocate a second memory area with a continuous physical address for the calculation result data in the calculation server if the calculation server does not receive the calculation completion information reported by the calculation device based on the source data to be calculated within a preset time, or cannot read the calculation result data; and send the second address information of the second memory area to the computing device, so that the computing device writes the calculation result data into the second memory area of the computing server based on the second address information.
[0224] Optionally, the second data reading unit includes:
[0225] a write request obtaining subunit, configured to enable the computing device to generate a write request based on the second address information, so as to request that the computing result data read from the result storage space be cached in the first cache space;
[0226] a first result writing subunit, configured to write the calculation result data in the first cache space of the computing device into the second memory area based on the second address information;
[0227] A second result caching subunit is configured to cache the calculation result data in a second cache space when the space capacity of the first cache space in the first computing device is insufficient;
[0228] The second result writing subunit writes the calculation result data in the second cache space in the computing device into the second memory area of the computing server based on the second address information.
[0229] In some optional embodiments, the data reading module 804 is also used to obtain the data volume of the calculation result data in the first cache space and / or the second cache space in the computing device when writing the calculation result data in the first cache space and / or the second cache space into the second memory area based on the second address information; when the data volume of the calculation result data is greater than the second data volume threshold, the calculation result data in the first cache space and / or the second cache space is written into the second memory area based on the second address information.
[0230] In some optional embodiments, the data reading module 804 is used to determine the next cache state of the first cache space and the second cache space based on the request type; the request type includes a write request and a read request; based on the next cache state, determine the result write path of the calculation result data and the data write path of the source data to be calculated; the result write path includes a first result write path from the result storage space to the first cache space and / or the second cache space, and a second result write path from the first cache space and / or the second cache space to the second memory space; the data write path includes a first data write path from the first memory area to the first cache space and / or the second cache space, and a second data write path from the first cache space and / or the second cache space to the data storage space.
[0231] Optionally, when determining the next cache state of the first cache space and the second cache space based on the request type, based on the writable space of the first cache space and the second cache space and the request type, determine whether the next cache state of the first cache space and the second cache space is a full state; based on the source data to be calculated, calculation result data and request type that can be written in the first cache space and the second cache space, determine whether the next cache state of the first cache space and the second cache space is an empty state.
[0232] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0233] The data processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0234] An embodiment of the present application also provides a computer device having the data processing device shown in FIG8 above.
[0235] Please refer to Figure 9, which is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present application. As shown in Figure 9, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 9 takes a processor 10 as an example.
[0236] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0237] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.
[0238] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created based on the use of a computer device for displaying a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a server cluster, a mobile communication network, and a combination thereof.
[0239] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0240] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0241] The present application also provides one or more non-volatile computer-readable storage media storing computer-readable instructions, which, when executed by one or more processors, cause one or more processors to perform the method of the above embodiment. The above method according to the embodiment of the present application can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded on a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded via a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0242] Although the embodiments of the present application have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations shall fall within the scope defined by the appended claims.
Claims
1. A data processing method, characterized in that: The method comprises: Sending a target computing task to a computing device through a computing server, wherein the target computing task includes resource occupation information of source data to be calculated and a remote direct address access request; receiving feedback information reported by the computing device based on the target computing task, the feedback information including a first storage address for storing the source data to be calculated and a second storage address for storing calculation result data allocated based on the remote direct address access request and resource occupation information of the source data to be calculated; storing the source data to be calculated in the first storage address based on the feedback information, so that the computing device performs data calculation based on the source data to be calculated; and In response to receiving the calculation completion information reported by the calculation device based on the source data to be calculated, the calculation result data is read from the second storage address.
2. The method according to claim 1, characterized in that The computing device generates the feedback information, including: Obtaining a write request and a read request in the remote direct address access request; Allocate data storage space and result storage space for the source data to be calculated based on the resource occupation information; Generate a first storage address based on the write request in the remote direct address access request and the address of the data storage space; generating a second storage address based on the read request in the remote direct address access request and the address of the result storage space; and The feedback information is generated based on the first storage address and the second storage address.
3. The method according to claim 2, characterized in that The computing server stores the source data to be calculated in the first storage address based on the feedback information, so that the computing device performs data calculation based on the source data to be calculated, including: The computing server obtains the first storage address for storing the source data to be calculated; and The source data to be calculated is written into the data storage space allocated by the computing device based on the first storage address, and a computing instruction is generated so that the computing device performs data calculation based on the source data to be calculated.
4. The method according to claim 2 or 3, characterized in that: The computing server stores the to-be-computed source data in the first storage address based on the feedback information, further comprising: In response to the source data to be calculated not being successfully stored in the first storage address allocated by the computing device, allocating a first memory area with a continuous physical address for the source data to be calculated in the computing server; and The first address information of the first memory area is sent to the computing device, so that the computing device reads the source data to be calculated from the first memory area of the computing server based on the first address information and performs calculation.
5. The method according to claim 4, characterized in that The computing device further includes a first cache space, and the computing device reads the source data to be calculated from the first memory area of the computing server based on the first address information, including: The computing device generates a read request based on the first address information to request copying the source data to be calculated read from the computing server to the first cache space; and Based on the first storage address, the source data to be calculated in the first cache space is written into the data storage space.
6. The method according to claim 5, characterized in that The computing device further includes a second cache space, and the step of copying the source data to be calculated into the first cache space further includes: In response to insufficient space capacity of the first cache space in the computing device, copying the source data to be calculated into the second cache space; and Based on the first storage address, the source data to be calculated in the second cache space in the computing device is written into the data storage space.
7. The method according to claim 2 or 3, characterized in that: The computing server reads the computing result data from the second storage address, including When calculation completion information reported by the calculation device is received within a preset time, obtaining the second storage address; and The calculation result data is read from the result storage space allocated by the calculation device based on the second storage address.
8. The method according to claim 6, characterized in that The calculation server reads the calculation result data from the second storage address, and also includes In response to the computing server not receiving the computing completion information reported by the computing device based on the source data to be calculated within a preset time, or being unable to read the computing result data, allocating a second memory area with a continuous physical address for the computing result data in the computing server; and The second address information of the second memory area is sent to the computing device, so that the computing device writes the calculation result data into the second memory area of the computing server based on the second address information.
9. The method according to claim 8, characterized in that The computing device writes the calculation result data into the second memory area based on the second address information, including: The computing device generates a write request based on the second address information to request that the computing result data read from the result storage space be cached in the first cache space; and Based on the second address information, the calculation result data in the first cache space in the computing device is written into the second memory area.
10. The method according to claim 9, characterized in that The step of caching the calculation result data read from the result storage space in the first cache space also includes: In response to insufficient space capacity of the first cache space in the computing device, caching the computing result data in the second cache space; and Based on the second address information, the calculation result data in the second cache space in the computing device is written into the second memory area of the computing server.
11. The method according to claim 6, characterized in that Based on the first storage address, writing the source data to be calculated in the first cache space and / or the second cache space in the computing device into the data storage space includes: Acquiring the amount of the source data to be calculated in the first cache space and / or the second cache space in the computing device; and In response to the data volume of the source data to be calculated being greater than a first data volume threshold, the source data to be calculated in the first cache space and / or the second cache space is written into the data storage space based on the first storage address.
12. The method according to claim 10, characterized in that Writing the calculation result data in the first cache space and / or the second cache space in the computing device into the second memory area based on the second address information includes: Acquiring the amount of the calculation result data in the first cache space and / or the second cache space in the computing device; and In response to the data volume of the calculation result data being greater than a second data volume threshold, the calculation result data in the first cache space and / or the second cache space is written into the second memory area based on the second address information.
13. The method according to claim 8, characterized in that The method further comprises: Determine a next cache state of the first cache space and the second cache space based on a request type; the request type includes a write request and a read request; Based on the next cache state, determining a result writing path for the calculation result data and a data writing path for the source data to be calculated; The result writing path includes a first result writing path from the result storage space to the first cache space and / or the second cache space, and a second result writing path from the first cache space and / or the second cache space to the second memory space; and The data write-out path includes a first data write-out path from the first memory area to the first cache space and / or the second cache space, and a second data write-out path from the first cache space and / or the second cache space to the data storage space.
14. The method according to claim 13, characterized in that Determining the next cache state of the first cache space and the second cache space based on the request type includes: Determining whether a next cache state of the first cache space and the second cache space is a full state based on the writable space of the first cache space and the second cache space and the request type; and Based on the to-be-calculated source data, calculation result data and the request type that can be written in the first cache space and the second cache space, it is determined whether the next cache state of the first cache space and the second cache space is an empty state.
15. The method according to claim 1, characterized in that Before the computing server sends the computing task to the computing device, the method further includes: The computing server receives the connection request initiated by the computing device, and starts the target computing program according to the connection request; and A connection between the computing server and the computing device is established through the target computing program.
16. The method according to claim 15, characterized in that The computing server stores a task cluster, and the computing server sends a target computing task to a computing device, including: Obtaining the computing status of each computing task in the task cluster; and Based on the computing status and the idle resource status information carried in the connection request, the target computing task is issued to the computing device.
17. The method according to claim 16, characterized in that Based on the computing state and the idle resource state information carried in the connection request, issuing the target computing task to the computing device includes: Based on the idle resource status information, selecting a target computing task from the computing tasks whose computing status is to be calculated; Obtaining resource occupancy information of source data to be calculated in the target computing task; and The target computing task is issued to the computing device based on the resource occupancy information.
18. A data processing device, characterized in that: The device comprises: A task delivery module is used to deliver a target computing task to a computing device through a computing server, wherein the target computing task includes resource occupancy information of source data to be calculated and a remote direct address access request; an information feedback module, configured to receive feedback information reported by the computing device based on the target computing task, the feedback information including a first storage address allocated for storing the source data to be calculated and a second storage address allocated for storing calculation result data based on the remote direct address access request and the resource occupation information of the source data to be calculated; A data storage module, configured to store the source data to be calculated in the first storage address based on the feedback information, so that the computing device performs data calculation based on the source data to be calculated; and A data reading module is used to read the calculation result data from the second storage address in response to receiving the calculation completion information reported by the calculation device based on the source data to be calculated.
19. A data processing system, characterized in that: include: Computing servers and computing equipment; The computing server is used to send a target computing task to the computing device, wherein the target computing task includes resource occupation information of the source data to be calculated and a remote direct address access request; The computing device is configured to, based on feedback information reported by the target computing task, include a first storage address for storing the source data to be calculated and a second storage address for storing calculation result data allocated based on the remote direct address access request and resource occupation information of the source data to be calculated; and The computing server is further used to store the source data to be calculated in the first storage address based on the feedback information, and read the calculation result data from the second storage address in response to receiving the calculation completion information reported by the computing device based on the source data to be calculated.
20. The system according to claim 19, characterized in that The computing device further comprises: an autonomous forwarding module, configured to write the source data to be calculated into the data storage space corresponding to the first storage address based on the link information carried in the remote direct address access request; and The autonomous forwarding module is further used to obtain the calculation result data in the result storage space corresponding to the second storage address, and write the calculation result data into the calculation server based on the link information carried in the remote direct address access request.
21. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer-readable instructions, and the processor executes the method according to any one of claims 1 to 17 by executing the computer-readable instructions.
22. One or more non-volatile computer-readable storage media storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the method of any one of claims 1 to 17.
Citation Information
Patent Citations
Data transmission method and device for computing cluster and storage medium
CN114153754A
Hardware calculation module, device and method, electronic device and storage medium
CN116627888A
Image processing method and related device and system
CN116680042A
Data processing method and device, equipment and storage medium
CN116881191A
File transmission method and apparatus, and computer device and storage medium
WO2022126919A1
Cited By
Data transmission method
CN121029648A