A method, apparatus, device and readable medium for co-accelerating computation
By unifying the accelerated computing service interface in the DDS domain, the development complexity of system applications is simplified, and collaborative operation of accelerated computing services and efficient data processing are realized.
Patent Information
- Application Number
- CN202111674674.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2041-12-31
AI Technical Summary
Because different accelerator cards use different driver interfaces, the scheduling complexity and development difficulty of data processing systems and applications increase.
All accelerated computing services are abstracted into topics and managed through a unified interface via the DDS domain. System applications construct messages and perform data processing and scheduling through the DDS domain to achieve collaborative operation of accelerated services.
It simplifies the complexity and development difficulty of system applications, and realizes a unified interface for accelerated computing services and efficient data processing.
Smart Images

Figure CN114327954B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computers, and more particularly to a method, device, equipment and readable medium for cooperative acceleration computing. BACKGROUND
[0002] In recent years, with the development of emerging technologies such as mobile Internet and artificial intelligence, the scale of big data and the scale of Internet applications are growing exponentially. The business that data centers need to handle is also growing, and the computing power of general-purpose processors used by data centers has reached a bottleneck. In order to solve this problem, various PCIe board cards based on FPGA (Field Programmable Gate Array) and ASIC (Application Specific Integrated Circuit) special computing acceleration have emerged, such as compression and decompression cards, RAID (Redundant Array of Independent Disks) storage cards, and the GPGPU (General Purpose Graphics Processing Unit) we are familiar with for neural network training and inference.
[0003] The processing of the same data often requires multiple acceleration computing, which requires these acceleration computing services to process data in parallel or in series. However, because different acceleration cards use different driver interfaces, each step of data processing requires scheduling by the system application, increasing the design and development complexity of the system application. SUMMARY
[0004] Therefore, the purpose of the embodiments of the present application is to provide a method, device, equipment and readable medium for cooperative acceleration computing, which can abstract all acceleration computing services as topics and unify the interface of acceleration computing, and the series of data processing is completed by the acceleration service scheduling, which can simplify the complexity and development difficulty of the system application.
[0005] Based on the above purpose, one aspect of the embodiments of the present application provides a method for cooperative acceleration computing, comprising the following steps:
[0006] The system application constructs a message according to the required service and sends the constructed message to the DDS domain (Data Distribution Service, a middleware protocol and API standard, using a publish / subscribe architecture, emphasizing data-centric, the DDS domain represents a communication plane, only communication entities in the same domain can communicate) of the system;
[0007] The acceleration service in the DDS domain obtains the message and obtains operation information according to the operation index field in the message;
[0008] The acceleration service performs data processing in sequence according to the obtained operation information;
[0009] In response to completion of the data processing, the system application is fed back the data processing result.
[0010] According to one embodiment of the present application, the message structure comprises:
[0011] A task number, which is used to index the operation initiated by the system application, and facilitates the system application to monitor the state and handle errors, each task initiated by the system application has a different task number;
[0012] A feedback topic name, which is used to inform the topic used by the acceleration computing service to feed back the result;
[0013] A current operation index, which provides the position of the parameter required by the acceleration computing service in the operation information chain;
[0014] An operation information chain, which is used to identify the serial operation or parallel operation to be performed on the data and the parameter required by the operation;
[0015] Data, which is the data to be processed by the acceleration computing currently, if it is a parallel operation, the acceleration service directly forwards the current data, and if it is a serial operation, the acceleration service replaces the current data with the result of this processing.
[0016] According to one embodiment of the present application, the acceleration service sequentially performs data processing according to the obtained operation information, comprising:
[0017] Obtaining the current operation information from the operation chain according to the current operation index field in the message;
[0018] Judging whether the parallel processing topic name is empty;
[0019] In response to the parallel processing topic name not being empty, setting the current operation index in the message as the parallel processing index and publishing the message to the parallel processing topic;
[0020] Performing parallel data processing on the operation requiring parallel processing according to the operation parameter in the parallel processing.
[0021] According to one embodiment of the present application, in response to completion of the data processing, the system application is fed back the data processing result, comprising:
[0022] In response to completion of the data processing, judging whether the result needs to be published to the feedback topic;
[0023] In response to the result needing to be published to the feedback topic, publishing the data processing result to the feedback topic to inform the system application of the processing result.
[0024] Another aspect of the embodiment of the present application also provides a device for cooperative acceleration computing, comprising:
[0025] A constructing module configured to construct a message according to a required service of the system application and send the constructed message to a DDS domain of the system;
[0026] An obtaining module configured to obtain a message in the DDS domain and obtain operation information according to an operation index field in the message;
[0027] A processing module configured to perform data processing according to the obtained operation information by the acceleration service in sequence;
[0028] A feedback module configured to feed back a data processing result to the system application in response to completion of the data processing.
[0029] According to an embodiment of the present application, the structure of the message comprises:
[0030] A task number used for indexing an operation initiated by the system application, facilitating state monitoring and error processing of the system application, and each task initiated by the system application has a different task number;
[0031] A feedback topic name used for notifying a topic used by the acceleration computing service for feeding back a result;
[0032] A current operation index providing a position of a required parameter of the acceleration computing service in an operation information chain;
[0033] The operation information chain used for identifying a serial operation or a parallel operation to be performed on data and a required parameter of the operation;
[0034] Data being current data to be processed by the acceleration computing service, and if the operation is a parallel operation, the acceleration service directly forwards the current data, and if the operation is a serial operation, the acceleration service replaces the current data with a result of the current processing.
[0035] According to an embodiment of the present application, the processing module is further configured to:
[0036] obtain current operation information from the operation chain according to the current operation index field in the message;
[0037] determine whether a parallel processing topic name is empty;
[0038] in response to the parallel processing topic name not being empty, set the current operation index in the message as a parallel processing index and publish the message to a parallel processing topic;
[0039] perform parallel data processing on an operation requiring parallel processing according to an operation parameter in the parallel processing.
[0040] According to an embodiment of the present application, the feedback module is further configured to:
[0041] In response to completion of the data processing, it is determined whether the result needs to be published to the feedback topic;
[0042] In response to the need to publish the result to the feedback topic, the data processing result is published to the feedback topic to notify the system application of the processing result.
[0043] Another aspect of the embodiments of the present application also provides a computer device, which comprises:
[0044] at least one processor; and
[0045] a memory storing computer instructions executable on the processor, the instructions being executed by the processor to implement the steps of any of the above methods.
[0046] Another aspect of the embodiments of the present application also provides a computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of any of the above methods.
[0047] The present application has the following beneficial technical effects: the method for cooperative acceleration computing provided by the embodiments of the present application constructs a message according to the required service of a system application and sends the constructed message to a DDS domain of the system; an acceleration service in the DDS domain acquires the message and acquires operation information according to an operation index field in the message; the acceleration service sequentially performs data processing according to the acquired operation information; in response to completion of the data processing, the technical solution of feeding back the data processing result to the system application can abstract all acceleration computing services into topics, unifies the interface of acceleration computing, and enables a series of processing of data to be completed by the acceleration service to schedule, thereby simplifying the complexity and development difficulty of the system application. BRIEF DESCRIPTION OF DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other embodiments can also be obtained from these drawings without creative labor.
[0049] Figure 1 a schematic flow chart of the method for cooperative acceleration computing according to an embodiment of the present application;
[0050] Figure 2 a schematic diagram of the cooperative acceleration computing system according to an embodiment of the present application;
[0051] Figure 3 a schematic diagram of the message structure according to an embodiment of the present application;
[0052] Figure 4 Fig. 11 is a schematic diagram of an operational information chain structure according to an embodiment of the present application;
[0053] Figure 5 Fig. 14 is a schematic diagram of service requirements according to an embodiment of the present application;
[0054] Figure 6 Fig. 17 is a schematic diagram of a system block diagram for completing initialization according to an embodiment of the present application;
[0055] Figure 7 Fig. 20 is a schematic diagram of a system construction message according to an embodiment of the present application;
[0056] Figure 8 Fig. 23 is a schematic diagram of a service processing data flow according to an embodiment of the present application;
[0057] Figure 9 Fig. 26 is a schematic diagram of a feedback message according to an embodiment of the present application;
[0058] Figure 10 Fig. 29 is a schematic diagram of an apparatus for collaborative acceleration computing according to an embodiment of the present application;
[0059] Figure 11 Fig. 32 is a schematic diagram of a computer device according to an embodiment of the present application;
[0060] Figure 12 Fig. 35 is a schematic diagram of a computer readable storage medium according to an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to make the objects, technical solutions and advantages of the present application clearer, the following further describes embodiments of the present application in detail with reference to the accompanying drawings.
[0062] Based on the above purpose, a first aspect of embodiments of the present application provides an embodiment of a method for collaborative acceleration computing. Figure 1 Fig. 1 shows a schematic flowchart of the method.
[0063] As shown in Fig. 1, the method can include the following steps: Figure 1
[0064] S1 a system application constructs a message according to required services and sends the constructed message to a DDS domain of the system.
[0065] S2 an acceleration service in the DDS domain acquires the message and acquires operational information according to an operation index field in the message.
[0066] S3 the acceleration service sequentially performs data processing according to the acquired operational information.
[0067] S4 responds to the data processing completion, and feeds back the data processing result to the system application.
[0068] The above method can be implemented using a DDS-based system design as shown in the system schematic diagram. The acceleration computing topic, the software computing topic, and the remote acceleration topic in the system schematic diagram are all available services for the system application, and there is no essential difference. Here, it is only indicated that the system can support these types of services. The system includes: Figure 2
[0069] 1) DDS. The DDS is responsible for the distribution and transmission of data in the DDS domain.
[0070] 2) System application and corresponding feedback topic. The system application is the initiator of the entire data processing process, and the entire system provides services for the system application. When the system application needs services, it constructs a message (format shown below) according to the requirements and sends the message to the corresponding topic. The system application subscribes to the feedback topic to receive the data processing status.
[0071] 3) Acceleration computing service and corresponding acceleration computing topic. The acceleration computing service obtains the request of the system application by subscribing to the acceleration computing topic, processes and forwards the message according to the content of the operation information chain in the message, and notifies the corresponding system application through the feedback topic after the data processing is completed.
[0072] 4) For acceleration computing services that do not support DDS, a DDS_Agent (a protocol forwarding module that completes protocol conversion between the DDS domain and the acceleration computing service and forwards the message according to the situation) module is provided. The DDS_Agent completes the subscription and publication of the message. After receiving the message, the DDS_Agent converts the message into the protocol of the acceleration computing service and notifies the acceleration computing service. After the acceleration computing service completes the operation, the DDS_Agent publishes the operation result to the feedback topic.
[0073] The structure of the message that needs to be constructed is shown in Figure 3 The task number is used to index the operation initiated by the system application, facilitating the system application to perform state monitoring and error handling. Each task initiated by the system application has a different task number. The feedback topic name is used to notify the topic used by the acceleration computing service to feed back the result. The current operation index provides the position of the parameter required by the acceleration computing service in the operation information chain. The operation information chain is the serial / parallel operation to be performed on the data and the parameters thereof. The data is the current data to be subjected to acceleration computing. For parallel operation, the acceleration service directly forwards the current data. For serial operation, the acceleration service replaces the data with the result of this processing. The operation information chain is composed of a plurality of operations, and the specific structure is shown in Figure 4 The parallel operation topic name is the topic name corresponding to the operation which needs to be processed in parallel with the current operation, and when the parallel operation topic name is empty, it indicates that there is no operation which needs to be processed in parallel; the parallel processing operation index is the index of the above-mentioned parallel operation in the operation information chain; the serial processing topic name is the topic name corresponding to the operation which needs to be processed after the current operation is completed, and when the serial operation topic name is empty, it indicates that there is no operation which needs to be processed in series; the serial processing operation index is the index of the above-mentioned serial operation in the operation information chain; and the feedback parameter is whether the operation needs feedback, and according to the parameter, the acceleration calculation service judges whether the current result needs to be fed back to the feedback topic. The parameter is divided into three kinds, 0 indicates that only the error result or the result of the last operation in series is fed back; 1 indicates that the error and warning results (including the result of the last operation in series) are fed back; and 2 indicates that all the results are fed back. The system application can reasonably set the parameter according to the actual situation, and the system load can be reduced. The operation parameter corresponds to the parameter of the operation, and according to different specific operations, the required parameters are also different. For example, for the RAID storage service, the required parameters include a logical disk number and a logical block address; and for the network transmission service, the required parameters include a remote IP address and a port number.
[0074] Through the technical scheme of the application, all acceleration calculation services can be abstracted as topics, the interface of acceleration calculation is unified, a series of data processing is completed by the acceleration service for scheduling, and the complexity and development difficulty of the system application can be simplified.
[0075] In a preferred embodiment of the application, the structure of the message comprises:
[0076] The task number is used for indexing the operation initiated by the system application, facilitating state monitoring and error processing of the system application, and each task initiated by the system application has a different task number;
[0077] The feedback topic name is used for notifying the topic used by the acceleration calculation service for feeding back the result;
[0078] The current operation index provides the position of the parameter required by the acceleration calculation service in the operation information chain;
[0079] The operation information chain is used for identifying the serial operation or parallel operation to be performed on the data and the parameters required by the operation;
[0080] The data is the data to be processed by the acceleration calculation, and if it is a parallel operation, the acceleration service directly forwards the current data, and if it is a serial operation, the acceleration service replaces the current data with the processing result.
[0081] In a preferred embodiment of the application, the acceleration service performs data processing according to the obtained operation information in sequence, comprising:
[0082] obtaining current operation information from the operation chain according to the current operation index field in the message;
[0083] judging whether the parallel processing topic name is empty;
[0084] in response to the parallel processing topic name not being empty, setting the current operation index in the message as the parallel processing index and publishing the message to the parallel processing topic;
[0085] performing parallel data processing on the operations requiring parallel processing according to the operation parameters in the parallel processing.
[0086] In a preferred embodiment of the present application, in response to the data processing being completed, feeding back the data processing result to the system application comprises:
[0087] in response to the data processing being completed, judging whether the result needs to be published to the feedback topic;
[0088] in response to the result needing to be published to the feedback topic, publishing the data processing result to the feedback topic to notify the system application of the processing result.
[0089] Embodiment
[0090] There are RAID storage acceleration, AI acceleration, network acceleration, compression and decompression acceleration, encryption and decryption acceleration services in the system. The following business scenarios of the system application are analyzed, a piece of data is compressed and stored, AI calculation is performed at the same time, the AI calculation result is encrypted and transmitted through the network, and the business demand is as shown in Figure 5 .
[0091] First, system initialization is performed, the DDS service is started, all acceleration calculation services or DDS_Agent subscribe to the acceleration calculation topic, and after initialization is completed, the system is as shown in Figure 6 . Then the system application constructs a message according to the business demand, the application message constructed by the system is as shown in Figure 7 . The operation information chain can be abstracted as a linked list, each element contains two pointers, one of which points to the operation to be parallel, and the other points to the operation to be serial, as shown by the dashed line in the figure. The system application publishes the message to the acceleration calculation topic (in this example, the compression / decompression topic), and the acceleration service processes the message after receiving it. The data flow of data processing is as shown in Figure 8As shown, the processing detailed steps are 1) the system application publishes the message to the compression / decompression topic. 2) The compression / decompression service receives the message from the subscribed compression / decompression topic, and takes the operation information from the operation information chain according to the current operation index field (value 0). Since the parallel processing topic is not empty, the compression / decompression service sets the current operation index to the value of the parallel operation index field (value 1), and forwards the message to the "AI topic", and then performs compression / decompression processing. 3) After the compression / decompression service completes the operation, according to the feedback parameter in the operation information, if the operation fails, feedback the error to the feedback topic and interrupt the serial operation information chain. If the operation is successful, no feedback is given to the feedback topic, then the current operation index in the message is modified to the serial processing index, and the data is updated to the compressed data, and the message is sent to the storage topic. 4) After the storage service receives the message, since both the parallel and serial operation topics are empty, the storage service performs the storage operation, and after completion, the result is fed back to the feedback topic to notify the system application processing. 5) The AI service receives the message forwarded by the compression / decompression service, and according to the current operation index field (value 1, modified by the compression / decompression service), takes its own operation information from the operation information chain. Since the parallel processing topic is empty, the AI service directly performs AI calculation on the data (in time, it is in parallel relationship with the compressed data). After the AI calculation is completed, the result is filled in the message and the current operation index is modified to 3 (encryption / decryption operation information index). And send the message to the encryption / decryption topic. 6) The encryption / decryption receives the message and completes the operation, and then sends the modified message to the network topic. 7) The network topic completes the operation and sends a message to the feedback topic to notify the system application. 8) After the system application receives the two feedback messages, the task 0 related business is completed, and the two feedback messages are as follows Figure 9 As shown.
[0092] The technical solution of the present application provides a method for cooperative acceleration calculation, which abstracts all acceleration calculation services into topics, unifies the interface of acceleration calculation, and completes the scheduling of a series of data processing by acceleration services. The system application only needs to construct a data operation information chain to complete serial or parallel processing of data, thereby simplifying the complexity and development difficulty of the system application.
[0093] It should be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be implemented by a computer program instructing relevant hardware, and the above-mentioned program can be stored in a computer readable storage medium. The program, when executed, can include the processes of the above-mentioned embodiment methods. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding any method embodiments.
[0094] In addition, the method disclosed by the embodiment of the present application can also be implemented as a computer program executed by a CPU, which can be stored in a computer readable storage medium. When the computer program is executed by the CPU, the above-mentioned functions defined in the method disclosed by the embodiment of the present application are executed.
[0095] Based on the above-mentioned purpose, the second aspect of the embodiment of the present application proposes a device for cooperative acceleration calculation, as shown in Figure 10 The device 200 comprises:
[0096] A construction module configured to construct a message by a system application according to a required service and send the constructed message to a DDS domain of the system;
[0097] An acquisition module configured to acquire a message by an acceleration service in the DDS domain and acquire operation information according to an operation index field in the message;
[0098] A processing module configured to perform data processing by the acceleration service according to the acquired operation information;
[0099] A feedback module configured to feed back a data processing result to the system application in response to completion of the data processing.
[0100] In a preferred embodiment of the present application, the structure of the message comprises:
[0101] A task number used for indexing an operation initiated by the system application, facilitating state monitoring and error processing by the system application, and each task initiated by the system application has a different task number;
[0102] A feedback topic name used for notifying a topic used by the acceleration calculation service for feeding back a result;
[0103] A current operation index providing a position of a required parameter of the acceleration calculation service in an operation information chain;
[0104] The operation information chain is used for identifying the serial operation or parallel operation to be performed on the data and parameters required by the operation.
[0105] The data is the data currently to be accelerated, if the parallel operation, the acceleration service directly forwards the current data, if the serial operation, the acceleration service replaces the current data with the result of this processing.
[0106] In a preferred embodiment of the present application, the processing module is further configured to:
[0107] According to the current operation index field in the message, the current operation information is obtained from the operation chain;
[0108] It is judged whether the parallel processing topic name is empty;
[0109] In response to the parallel processing topic name not being empty, the current operation index in the message is set to the parallel processing index and the message is published to the parallel processing topic;
[0110] According to the operation parameters in the parallel processing, the operation requiring parallel processing is processed in parallel.
[0111] In a preferred embodiment of the present application, the feedback module is further configured to:
[0112] In response to the completion of data processing, it is judged whether the result needs to be published to the feedback topic;
[0113] In response to the result needing to be published to the feedback topic, the data processing result is published to the feedback topic to notify the system application to process the result.
[0114] Based on the above purpose, a third aspect of the embodiments of the present application provides a computer device. Figure 11 The figure shows an embodiment of the computer device provided by the present application. As shown in the figure, Figure 11 The embodiments of the present application include the following devices: at least one processor 21; and a memory 22, the memory 22 storing computer instructions 23 executable on the processor, the instructions being executed by the processor to implement the following method:
[0115] The system application constructs a message according to the required service and sends the constructed message to the DDS domain of the system;
[0116] The acceleration service in the DDS domain obtains the message and obtains the operation information according to the operation index field in the message;
[0117] The acceleration service performs data processing according to the obtained operation information in sequence;
[0118] In response to the completion of data processing, the data processing result is fed back to the system application.
[0119] In a preferred embodiment of the present application, the structure of the message comprises:
[0120] A task number, which is used to index the operation initiated by the system application, and facilitates the system application to monitor the state and handle errors, each task initiated by the system application has a different task number;
[0121] A feedback topic name, which is used to inform the topic used by the acceleration computing service to feedback the result;
[0122] A current operation index, which provides the position of the parameter required by the acceleration computing service in the operation information chain;
[0123] An operation information chain, which is used to identify the serial operation or parallel operation to be performed on the data and the parameter required by the operation;
[0124] Data, which is the data currently to be processed by the acceleration computing service, if it is a parallel operation, the acceleration service directly forwards the current data, and if it is a serial operation, the acceleration service replaces the current data with the result of this processing.
[0125] In a preferred embodiment of the present application, the acceleration service sequentially performs data processing according to the obtained operation information, comprising:
[0126] Obtaining the current operation information from the operation chain according to the current operation index field in the message;
[0127] Judging whether the parallel processing topic name is empty;
[0128] In response to the parallel processing topic name not being empty, setting the current operation index in the message as the parallel processing index and publishing the message to the parallel processing topic;
[0129] Performing parallel data processing on the operation requiring parallel processing according to the operation parameter in the parallel processing.
[0130] In a preferred embodiment of the present application, in response to the completion of data processing, the acceleration service feeds back the data processing result to the system application, comprising:
[0131] In response to the completion of data processing, judging whether the result needs to be published to the feedback topic;
[0132] In response to the result needing to be published to the feedback topic, publishing the data processing result to the feedback topic to inform the system application of the processing result.
[0133] To achieve the above object, a fourth aspect of the embodiments of the present application provides a computer readable storage medium. Figure 12 The figure shows the schematic diagram of the embodiment of the computer readable storage medium provided by the present application. Figure 12As shown, the computer readable storage medium 31 stores a computer program 32 which, when executed by the processor, performs the following method:
[0134] The system application builds a message according to the required service and sends the built message to the DDS domain of the system;
[0135] The acceleration service in the DDS domain acquires the message and acquires operation information according to the operation index field in the message;
[0136] The acceleration service sequentially performs data processing according to the acquired operation information;
[0137] In response to the completion of the data processing, the data processing result is fed back to the system application.
[0138] In a preferred embodiment of the present application, the structure of the message comprises:
[0139] The task number is used to index the operation initiated by the system application, facilitating the system application to perform state monitoring and error processing, and each task initiated by the system application has a different task number;
[0140] The feedback topic name is used to notify the topic used by the acceleration computing service to feed back the result;
[0141] The current operation index provides the position of the parameter required by the acceleration computing service in the operation information chain;
[0142] The operation information chain is used to identify whether serial operation or parallel operation is to be performed on the data and the parameters required for the operation;
[0143] The data is the data currently to be subjected to acceleration computing, and if it is parallel operation, the acceleration service directly forwards the current data, and if it is serial operation, the acceleration service replaces the current data with the result of this processing.
[0144] In a preferred embodiment of the present application, the acceleration service sequentially performs data processing according to the acquired operation information comprises:
[0145] According to the current operation index field in the message, the current operation information is acquired from the operation chain;
[0146] It is judged whether the parallel processing topic name is empty;
[0147] In response to the parallel processing topic name not being empty, the current operation index in the message is set as the parallel processing index and the message is published to the parallel processing topic;
[0148] According to the operation parameters in the parallel processing, the operation requiring parallel processing is subjected to parallel data processing.
[0149] In a preferred embodiment of the present application, in response to the data processing being completed, applying the feedback data processing result to the system comprises:
[0150] In response to the data processing being completed, determining whether the result needs to be published to the feedback topic;
[0151] In response to the result needing to be published to the feedback topic, publishing the data processing result to the feedback topic to notify the system application of the processing result.
[0152] In addition, the method disclosed by the embodiments of the present application can also be implemented as a computer program executed by a processor, which can be stored in a computer readable storage medium. When the computer program is executed by the processor, the above-mentioned functions defined in the method disclosed by the embodiments of the present application are executed.
[0153] In addition, the above-mentioned method steps and system units can also be implemented by using a controller and a computer readable storage medium for storing a computer program for enabling the controller to implement the above-mentioned steps or unit functions.
[0154] Those skilled in the art will also appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein can be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the particular application and design constraints imposed on the overall system. Skilled persons can implement the functions described in various ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments disclosed herein.
[0155] In one or more exemplary designs, the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media can be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code means in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or other wire-based, fiber-based, or wireless technologies, then the coaxial cable, fiber optic cable, twisted pair, DSL, or other wire-based, fiber-based, or wireless technologies are included in the definition of medium. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0156] The foregoing is considered as illustrative of the principles of the present embodiments disclosure. However, it is noted that numerous changes and modifications can be made to the embodiments described above without departing from the scope of the present embodiments disclosure, as defined by the appended claims, as desired. Functionality, steps, and / or actions described herein need not be performed in any particular order. Furthermore, although elements of the present embodiments disclosure can be described or claimed in individual formulations, one or more of them can be understood as a plurality of elements of a single generic formulation.
[0157] It should be understood that, as used herein, "and / or" is used to include any and all combinations of one or more of the associated listed items.
[0158] The above-mentioned embodiment numbers of the present embodiments disclosure are only for description, not representing advantages or disadvantages of embodiments.
[0159] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0160] Those skilled in the art shall understand that the above discussion of any embodiment is only exemplary, and is not intended to imply that the scope (including claims) of the embodiments of the present application is limited to these examples; the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes of different aspects of the embodiments of the present application as above. In order to be brief, they are not provided in details. Therefore, any omission, modification, equivalent replacement, improvement, etc. made in the spirit and principle of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.
Claims
1. A method of synergistically accelerating computation, characterized by, The method comprises the following steps: The system application constructs a message according to a required service and sends the constructed message to a DDS domain of a DDS-based system; An acceleration service in the DDS domain acquires the message and acquires operation information according to an operation index field in the message; The acceleration service sequentially performs data processing according to the acquired operation information; In response to completion of the data processing, the system application is fed back a data processing result; The structure of the message comprises: a task number, which is used to index an operation initiated by the system application, facilitates state monitoring and error processing of the system application, and each task initiated by the system application has a different task number; a feedback topic name, which is used to notify a topic used by the acceleration calculation service to feed back a result; a current operation index, which provides a position of a required parameter of the acceleration calculation service in an operation information chain; an operation information chain, which is used to identify a serial operation or a parallel operation to be performed on data and parameters required by the operation; data, which is current data to be subjected to the acceleration calculation, if the parallel operation, the acceleration service directly forwards the current data, and if the serial operation, the acceleration service replaces the current data with a result of this time processing; The acceleration service sequentially performing the data processing according to the acquired operation information comprises: acquiring current operation information from the operation information chain according to the current operation index field in the message; judging whether a parallel processing topic name is empty; in response to the parallel processing topic name not being empty, setting the current operation index in the message as a parallel processing index and publishing the message to the parallel processing topic; performing parallel data processing on an operation requiring parallel processing according to operation parameters in the parallel processing.
2. The method of claim 1, wherein, In response to completion of the data processing, the system application is fed back the data processing result, which comprises: in response to completion of the data processing, judging whether a result needs to be published to a feedback topic; in response to the result needing to be published to the feedback topic, publishing the data processing result to the feedback topic to notify the system application of the processing result.
3. An apparatus to cooperatively accelerate computation, the apparatus comprising: The device comprises: a construction module configured to have the system application construct a message according to a required service and send the constructed message to a DDS domain of a DDS-based system; an acquisition module configured to have an acceleration service in the DDS domain acquire the message and acquire operation information according to an operation index field in the message; a processing module configured to have the acceleration service sequentially perform data processing according to the acquired operation information; a feedback module configured to, in response to completion of the data processing, feed back a data processing result to the system application; the structure of the message comprises: a task number, which is used to index an operation initiated by the system application, facilitates state monitoring and error processing of the system application, and each task initiated by the system application has a different task number; a feedback topic name, which is used to notify a topic used by the acceleration calculation service to feed back a result; a current operation index, which provides a position of a required parameter of the acceleration calculation service in an operation information chain; An operation information chain is used to identify a serial operation or a parallel operation to be performed on data and parameters required by the operation; Data, which is current data to be accelerated, if it is a parallel operation, the acceleration service directly forwards the current data, if it is a serial operation, the acceleration service replaces the current data with the result of this processing; The processing module is further configured to: obtain current operation information from the operation information chain according to the current operation index field in the message; determine whether the parallel processing topic name is empty; in response to the parallel processing topic name not being empty, set the current operation index in the message as the parallel processing index and publish the message to the parallel processing topic; perform parallel data processing on the operation requiring parallel processing according to the operation parameters in the parallel processing.
4. The apparatus of claim 3, wherein, The feedback module is further configured to: in response to the data processing being completed, determine whether the result needs to be published to the feedback topic; in response to the result needing to be published to the feedback topic, publish the data processing result to the feedback topic to notify the system application to process the result.
5. A computer device, characterized by comprise: at least one processor; and a memory storing computer instructions executable on the processor, the instructions being executed by the processor to implement the steps of the method of any one of claims 1-2.
6. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 5. The computer program is executed by the processor to implement the steps of the method of any one of claims 1-2.
Citation Information
Patent Citations
CDN-based data distribution method
CN111416746A
System of data distribution service of shared memory and operation method of system
CN112887356A