Data processing method and device based on reconfigurable computing, equipment and storage medium
By clustering and mapping the task nodes of reconfigurable computing units, the problem of low data processing efficiency caused by redundancy of reconfigurable computing units is solved, parallel processing is realized, data processing efficiency is improved, and the needs of large-scale information encryption and decryption in the network are met.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GLOBAL ENERGY INTERCONNECTION RES INST CO LTD
- Filing Date
- 2022-09-21
- Publication Date
- 2026-04-21
AI Technical Summary
The problem of low data processing efficiency caused by redundancy in reconfigurable computing units.
By clustering the task nodes of the task to be processed into K clusters, and mapping these clusters to reconfigurable processing units, parallel processing can be achieved, including parallel processing of multiple tasks and parallel processing of multiple task nodes of a single task.
It improves the utilization rate of redundant units in the reconfigurable computing module, enhances data processing efficiency, and meets the needs of large-scale information encryption and decryption in the network.
Smart Images

Figure CN115827551B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, and specifically to data processing methods, apparatus, devices, and storage media based on reconfigurable computing. Background Technology
[0002] Reconfigurable computing is a parallel computing paradigm in the spatial domain. It organizes computing resources of different granularities and functions using spatial hardware structures. By configuring variable reconfigurable computing units, the hardware platform is transformed from a general-purpose computing platform into a dedicated one, enabling flexibility in the structure and interconnection architecture of its internal execution units, thereby achieving the construction and computation of different functions. Therefore, compared to application-specific integrated circuits (ASICs), reconfigurable computing units offer greater flexibility. However, due to redundancy and other factors, data processing efficiency is low. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a data processing method, apparatus, device and storage medium based on reconfigurable computing to solve the problem of low data processing efficiency caused by redundancy and other reasons in reconfigurable computing units.
[0004] According to a first aspect, embodiments of the present invention provide a data processing method based on reconfigurable computing, the method comprising:
[0005] Add the task node of the currently pending task to the task node table to be scheduled;
[0006] The task nodes in the task node table to be scheduled are clustered to obtain K clusters, where K is a positive integer;
[0007] The K clusters are mapped to reconfigurable processing units to process the current task in parallel.
[0008] Optionally, mapping the K clusters to reconfigurable processing units includes:
[0009] If K≤N, then a one-to-one mapping is directly applied;
[0010] If K>N, then first map N clusters, and then map the other KN clusters one by one according to the running state of the reconfigurable processing unit until the processing is completed.
[0011] Where N is the number of the reconfigurable processing units.
[0012] Optionally, mapping the K clusters to reconfigurable processing units includes:
[0013] For each cluster, if the cluster includes multiple task nodes, the multiple task nodes are prioritized according to their relevance, estimated execution time, and estimated data transmission time.
[0014] According to the stated priority, the data to be processed from the plurality of task nodes are sequentially loaded into different reconfigurable computing arrays in the reconfigurable processing unit mapped by the cluster for pipelined processing until the plurality of task nodes in the cluster have been processed.
[0015] Optionally, the step of clustering the task nodes in the task node table to be scheduled into K clusters includes:
[0016] S201: Obtain the K0 original clusters of the task node and the center of the original clusters;
[0017] S202: Calculate the distance between each of the task nodes and the center of each of the original clusters;
[0018] S203: Place the task node into the original cluster with the smallest distance;
[0019] S204: Determine a new center of the original cluster based on the mode of the task nodes in the original cluster in the two-dimensional attributes; the two-dimensional attributes include the target configuration information required to complete the task node and the data to be processed by the task node;
[0020] Repeat steps S202-S204 until the task nodes in the original clusters no longer change, and determine the K original clusters containing the task nodes from the K0 original clusters as the final clusters.
[0021] Optionally, obtaining the K0 original clusters of the task node and the center of the original clusters includes:
[0022] S301: Determine the center of the first original cluster based on the mode of the task node in the task node table in the two-dimensional attribute;
[0023] S302: Calculate the distance between each first task node and the center of the determined original cluster; the first task node is the task node that has not yet been the center of the original cluster;
[0024] S303: Select the task node with the largest average distance from the first task nodes as the center of a new original cluster; the average distance refers to the average distance from a first task node to the center of each original cluster;
[0025] Repeat steps S302-S303 until K0 centers of the original clusters are obtained.
[0026] Optional,
[0027] The step of obtaining the K0 original clusters of the task node and the center of the original clusters includes:
[0028] S401: Select a portion of the task nodes from the task node table as the second task nodes;
[0029] S402: Define a primitive cluster, and the primitive cluster is different each time it is defined;
[0030] S403: Randomly select one of the second task nodes that is not currently clustered as the starting node;
[0031] S404: Place the starting node into the original cluster;
[0032] S405: Determine whether there is a third task node among the second task nodes that are not currently clustered, wherein the third task node is a second task node whose distance from the fourth task node in the original cluster is less than or equal to a preset threshold; wherein the fourth task node is the second task node that was most recently added to the original cluster.
[0033] S406: If the third task node exists, the third task node is placed into the original cluster. The preset threshold is updated according to the average dissimilarity of the second task nodes currently existing in the original cluster to obtain a new preset threshold, and then proceeds to step S405. If the third task node does not exist, proceeds to step S402 until all the second task nodes are added to the corresponding original clusters to obtain K0 original clusters.
[0034] Optionally, before adding the task node of the currently pending task to the task node table to be scheduled, the method further includes:
[0035] Obtain the data to be processed;
[0036] The data to be processed is parsed;
[0037] Determine whether the parsed data to be processed is business data based on network security protocols, and determine the type of national cryptographic algorithm used in the parsed data to be processed, or the type of national cryptographic algorithm to be used, to obtain the determination result;
[0038] The task to be processed is determined based on the judgment result.
[0039] Optionally, mapping the K clusters to reconfigurable processing units includes:
[0040] For each task node in each cluster, the target configuration information required to complete the task node is retrieved from the pre-stored configuration information.
[0041] The target configuration information is parsed and mapped to the reconfigurable processing unit.
[0042] Optionally, the pre-stored configuration information includes configuration information for national cryptographic algorithms and configuration information for non-national cryptographic algorithms for network data, wherein the network data is business data based on network security protocols.
[0043] Optionally, the target configuration information is multi-level configuration information, which includes:
[0044] The first layer of configuration information is used to schedule the reconfigurable processing units in the reconfigurable processing unit group;
[0045] The second layer of configuration information includes the configuration information of the reconfigurable processing unit, the data interaction information within the reconfigurable processing unit, the configuration information of the input data of the reconfigurable processing unit, and the configuration information of the output data of the reconfigurable processing unit.
[0046] The third layer of configuration information includes configuration information of the reconfigurable computing array, data interaction information between the reconfigurable computing arrays, configuration information of the input data of the reconfigurable computing array, and configuration information of the output data of the reconfigurable computing array.
[0047] The fourth layer of configuration information includes the configuration information of the reconfigurable units.
[0048] Optionally, in the pre-stored configuration information, the configuration information of the operators is stored using an index; if the configuration information of the operators is the same, the index used for storage is the same, and the index is stored in association with the corresponding configuration information.
[0049] Optionally, before retrieving the target configuration information required to complete the task node from the pre-stored configuration information, the method further includes:
[0050] The business processes of various network security protocols and the software implementation processes of various national cryptographic algorithms are obtained respectively, and the core of each algorithm is analyzed to form the final software code that can be directly mapped.
[0051] The software code is converted into a directed data flow graph, such that each operator in the data flow graph can be mapped to a reconfigurable cell of the reconfigurable computing array.
[0052] The mapping algorithm for the data flow graph is determined to obtain the configuration information.
[0053] Optionally, the analysis of the algorithm's core includes:
[0054] Unroll the loop body in the algorithm;
[0055] Rewrite the branching operations in the algorithm.
[0056] Optionally, the mapping algorithm for the data flow graph is:
[0057] If the number of reconfigurable units required for the data flow graph mapping is less than or equal to the number of reconfigurable units in a reconfigurable computing array, then the data flow graph is directly mapped to a reconfigurable computing array.
[0058] If the number of reconfigurable units required for the data flow graph mapping is greater than the number of reconfigurable units in a reconfigurable computing array, then the data flow graph is divided and interleaved through the algorithm's pipeline.
[0059] Optionally, parsing the target configuration information includes:
[0060] The fourth-level configuration information is filled with values based on the index of the operator's configuration information;
[0061] Based on the fourth-layer configuration information after assignment and filling, the third-layer configuration information and the second-layer configuration information are obtained sequentially.
[0062] According to a second aspect, embodiments of the present invention provide a data processing apparatus based on reconfigurable computing, the apparatus comprising:
[0063] The table creation module is used to add the task nodes of the currently pending tasks to the task node table to be scheduled.
[0064] The partitioning module is used to perform clustering on the task nodes in the task node table to be scheduled, resulting in K clusters, where K is a positive integer.
[0065] The mapping module is used to map the K clusters to reconfigurable processing units respectively, so as to process the current task to be processed in parallel.
[0066] According to a third aspect, embodiments of the present invention provide an electronic device, comprising:
[0067] The memory and the processor are communicatively connected to each other. The memory is used to store a computer program, which, when executed by the processor, implements any of the data processing methods based on reconfigurable computing described in the first aspect above.
[0068] According to a fourth aspect, embodiments of the present invention provide a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements any of the data processing methods based on reconfigurable computing described in the first aspect.
[0069] In this embodiment of the invention, by clustering the task nodes of the current task to be processed into K clusters, and then mapping the K clusters to reconfigurable processing units in the reconfigurable processing module, parallel processing of tasks (including parallel processing of multiple tasks and parallel processing of multiple task nodes of a single task) is achieved using reconfigurable computing. This improves the utilization rate of redundant units in the reconfigurable computing module, thereby enhancing data processing efficiency. It can meet the needs of large-scale information encryption and decryption in networks. Attached Figure Description
[0070] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:
[0071] Figure 1 A flowchart illustrating a data processing method based on reconfigurable computing, provided in an embodiment of the present invention;
[0072] Figure 2 A schematic diagram illustrating the process of initial cluster partitioning of task nodes provided in an embodiment of the present invention;
[0073] Figure 3 This is a schematic diagram illustrating the process of task partitioning, configuration scheduling, and task processing provided in an embodiment of the present invention;
[0074] Figure 4 This is a schematic diagram of the hierarchical structure of a reconfigurable processing unit group provided in an embodiment of the present invention;
[0075] Figure 5 This is a schematic diagram of a multi-level configuration information provided in an embodiment of the present invention;
[0076] Figure 6 A schematic diagram of the structure of a data processing system based on reconfigurable computing provided in an embodiment of the present invention;
[0077] Figure 7 This is a schematic diagram of the structure of a data processing device based on reconfigurable computing, provided in an embodiment of the present invention.
[0078] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0079] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0080] It should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. In the following descriptions of embodiments, "a plurality of" means two or more, unless otherwise expressly specified.
[0081] Please see Figure 1 This invention provides a data processing method based on reconfigurable computing, the method comprising:
[0082] S101: Add the task node of the currently pending task to the task node table to be scheduled;
[0083] There can be one or more tasks currently pending, and the task nodes here can be all task nodes of the currently pending tasks.
[0084] S102: Perform clustering on the task nodes in the task node table to be scheduled to obtain K clusters, where K is a positive integer;
[0085] S103: Map the K clusters to reconfigurable processing units respectively to process the current task to be processed in parallel.
[0086] In this embodiment of the invention, by clustering the task nodes of the current task to be processed into K clusters, and then mapping the K clusters to reconfigurable processing units in the reconfigurable processing module, parallel processing of tasks (including parallel processing of multiple tasks and parallel processing of multiple task nodes of a single task) is achieved using reconfigurable computing. This improves the utilization rate of redundant units in the reconfigurable computing module, thereby enhancing data processing efficiency. It can meet the needs of large-scale information encryption and decryption in networks.
[0087] In some specific implementations, mapping the K clusters to reconfigurable processing units includes:
[0088] If K≤N, then a one-to-one mapping is directly applied;
[0089] If K>N, then first map N clusters, and then map the other KN clusters one by one according to the running state of the reconfigurable processing unit until the processing is completed.
[0090] Wherein, N is the number of the reconfigurable processing units.
[0091] In other words, when the number of reconfigurable processing units is less than the number of clusters, and insufficient to map all clusters to different reconfigurable processing units for parallel processing at once, then a portion of the clusters (N clusters) are first mapped to different reconfigurable processing units. The remaining clusters are then mapped to idle reconfigurable processing units, for example, after the reconfigurable processing units have finished processing the other clusters, i.e., when the reconfigurable processing units become idle. Alternatively, if the remaining processing capacity of a reconfigurable processing unit is less than a certain value, the remaining cluster can be mapped to that reconfigurable processing unit.
[0092] In some specific implementations, mapping the K clusters to reconfigurable processing units includes:
[0093] For each cluster, if the cluster includes multiple task nodes, the multiple task nodes are prioritized according to their relevance, estimated execution time, and estimated data transmission time.
[0094] According to the priority, the data to be processed of the multiple task nodes are sequentially loaded into different reconfigurable computing arrays in the reconfigurable processing unit of the cluster for pipelined processing until the multiple task nodes in the cluster have been processed.
[0095] Specifically, if there is only one task node in a cluster, then there is no need to prioritize the task nodes in that cluster.
[0096] The correlation between the multiple task nodes can be obtained based on the distance between each task node and the cluster center.
[0097] The estimated execution time of the multiple task nodes can be obtained by estimating the frequency of occurrence of various operators and the execution time of a single operator in each task node.
[0098] The estimated data transmission time for the multiple task nodes can be obtained by estimating the amount of input data for each type of operator in each task node. Specifically, the data transmission time can be the input transmission time or the sum of the input transmission time and the output transmission time.
[0099] In some specific implementations, the step of clustering the task nodes in the task node table to be scheduled into K clusters includes:
[0100] S201: Obtain the K0 original clusters of the task node and the center of the original clusters; at this time, all task nodes in the K0 original clusters do not necessarily include all task nodes in the task node table to be scheduled. In other words, at this time, not all task nodes in the task node table to be scheduled are necessarily divided into the K0 original clusters. Each original cluster may have only one task node or no task node.
[0101] S202: Calculate the distance between each of the task nodes and the center of each of the original clusters; each of the task nodes includes those already placed in the original clusters and those not yet placed in the original clusters;
[0102] S203: Place the task node into the original cluster with the smallest distance;
[0103] S204: Determine a new center of the original cluster based on the mode of the task nodes in the original cluster in the two-dimensional attributes; the two-dimensional attributes include the target configuration information required to complete the task node and the data to be processed by the task node; specifically, the new center of the original cluster is the mode of all task nodes in the original cluster with respect to the two-dimensional attributes, that is, the mode of each attribute of all task nodes in the original cluster is used as the value of the feature corresponding to the center of the original cluster; if there are still no task nodes in the original cluster or the task nodes have not changed (neither increased nor decreased), then the center of the original cluster will not change.
[0104] Repeat steps S202-S204 until the task nodes in the original clusters no longer change. Then, determine the K original clusters containing the task nodes from the K0 original clusters as the final clusters. Specifically, the task nodes in the original clusters no longer changing can manifest in two ways: 1. The center of the original cluster no longer changes. When the center of the original cluster no longer changes, the distance between each task node and the center of each original cluster will also remain unchanged. The distance between each task node in an original cluster and the center of that original cluster remains the minimum, and there are no task nodes in the original clusters that need to be adjusted. 2. The center of the original cluster changes, but the distance between each task node in the original cluster and the center of its current original cluster remains the minimum. In this case, there are also no task nodes in the original clusters that need to be adjusted, and the task nodes in the original clusters will not change.
[0105] In some specific implementations, obtaining the K0 original clusters of the task node and the center of the original clusters includes:
[0106] S301: Determine the center of the first original cluster based on the mode of all the task nodes in the task node table in the two-dimensional attribute; at this time, the original cluster is a blank cluster and does not include any task nodes;
[0107] S302: Calculate the distance between each first task node and the center of the determined original cluster; the first task node is the task node that has not yet been the center of the original cluster;
[0108] S303: Select the task node with the largest average distance from the first task nodes as the center of a new original cluster; the average distance refers to the average distance from a first task node to the center of each original cluster;
[0109] Repeat steps S302-S303 until the centers of K0 original clusters are obtained. At this point, the original clusters do not yet have task nodes.
[0110] For other specific implementations, please refer to Figure 2 The step of obtaining the K0 original clusters of the task node and the center of the original clusters includes:
[0111] S401: Select a portion of the task nodes from the task node table as the second task nodes; the specific selection rules can be determined according to actual needs, for example, some typical task nodes can be manually selected.
[0112] S402: Define a primitive cluster. Each time a primitive cluster is defined, it is different. The newly defined primitive cluster is an empty cluster that does not contain any task nodes. Specifically, the cluster identifier of the first primitive cluster definition can be C1, the identifier of the second primitive cluster definition can be C2, ..., and the identifier of the primitive cluster definition for the K0th time can be C... K0 ;
[0113] S403: Randomly select one of the second task nodes that are not currently clustered as the starting node; specifically, before clustering begins, all second task nodes can be marked as not being clustered, and then the mark is removed once the second task node is placed into the original cluster.
[0114] S404: Place the starting node into the original cluster;
[0115] S405: Determine whether there is a third task node among the second task nodes that are not currently clustered, wherein the third task node is a second task node whose distance from the fourth task node in the original cluster is less than or equal to a preset threshold; wherein the fourth task node is the second task node that was most recently added to the original cluster; the fourth task node is the starting node when this step is executed for the first time.
[0116] Here, the preset threshold t is generally a conservative small data t0, and the preset threshold t will be updated later; specifically, the third task node in the second task node that is not currently clustered can be traversed in a depth-first manner, that is, P' = NEAR(P,t), where P' is the third task node, P is the fourth task node, and t is the preset threshold. That is to say, the third task node is the task node adjacent to the fourth task node.
[0117] S406: If the third task node exists, the third task node is placed into the original cluster. The preset threshold is updated according to the average dissimilarity of the second task nodes currently existing in the original cluster to obtain a new preset threshold, and then proceeds to step S405. If the third task node does not exist, proceeds to step S402 until all the second task nodes are added to the corresponding original clusters to obtain K0 original clusters.
[0118] Regarding the dissimilarity of all the second task nodes currently existing in the cluster, the dissimilarity of each pair of second task nodes can be calculated using the following formula:
[0119]
[0120] Where X and Y are two different second task nodes currently existing in the original cluster, each second task node includes two-dimensional attributes, one of which is the data to be processed by the second task node, and the other is the reconfigurable computing configuration information (i.e., the target configuration information required to complete the second task node) that needs to be called when processing the data to be processed by the second task node. j =y j When, δ(x) j ,y j ) = 0; when x j ≠y j When, δ(x) j ,y j )=1,x j Let y be the j-th dimension attribute of the second task node X. j Let be the j-th dimension attribute of the second task node Y, where j = 1, 2 (i.e., m = 2). That is, the dissimilarity between any two second task nodes is determined based on whether the related two-dimensional attributes of that second task node are identical.
[0121] The preset threshold t can be updated according to the following formula: t1=t0*d′, where t1 is the updated preset threshold, t0 is the original preset threshold, and d′ is the average dissimilarity of all the second task nodes currently existing in the original cluster.
[0122] In some specific implementations, before adding the task node of the currently pending task to the task node table to be scheduled, the following steps are also included:
[0123] Obtain the data to be processed;
[0124] The data to be processed is parsed;
[0125] Determine whether the parsed data to be processed is business data based on network security protocols, and determine the type of national cryptographic algorithm used in the parsed data to be processed, or the type of national cryptographic algorithm to be used, to obtain the determination result;
[0126] The task to be processed is determined based on the judgment result.
[0127] Specifically, the data to be processed can originate from an Ethernet interface or from other processing units. Data from the Ethernet interface is generally business data based on network security protocols, while data from other processing units is generally business data based on non-network security protocols. Network security protocols include IPsec, SSL, etc. Non-network security protocol business data is data that has been encrypted using one of China's national cryptographic algorithms or data that requires encryption using one of these algorithms.
[0128] Based on the IPsec or SSL protocol format and negotiation process, data using the IPsec or SSL protocol can be parsed separately to identify whether the data to be processed is communication data using the IPsec or SSL protocol, or data directly sent by other processing units.
[0129] Regarding the processing of data to be processed: If the data to be processed is non-network security protocol business data, then the processing of the data to be processed can be to encrypt it using one of the national cryptographic algorithms, or the data to be processed has already been encrypted using one of the national cryptographic algorithms, and the processing here requires decryption; if the data to be processed is business data based on network security protocols, then the processing of the data to be processed includes not only encrypting or decrypting it using one of the national cryptographic algorithms, but also some non-encryption and decryption processing for the purpose of authentication negotiation and other processes.
[0130] In addition, data to be processed from the Ethernet interface or other processing units can be processed directly, or it can be stored in a data storage module (e.g., a data memory) and then input to the reconfigurable processing module for processing. The data storage module can be a buffer stack for input and output data, interacting with the input and output registers of the reconfigurable processing module.
[0131] For details regarding determining the task to be processed based on the judgment result, please refer to [link / reference needed]. Figure 3 If the received data to be processed is business data based on network security protocols, then the task for processing this data is network security protocol data processing. This task is then decomposed into authentication negotiation tasks and transmission encryption tasks. If the received data to be processed is business data not based on network security protocols, then the task for processing this data is data encryption / decryption. All three tasks—data encryption / decryption, authentication negotiation, and transmission encryption—can be further decomposed. The data encryption / decryption task decomposition results in tasks related to national cryptographic algorithms (CNCA), while the authentication negotiation and transmission encryption tasks decomposition results in tasks related to CNCA and non-CNCA algorithms. The CNCA tasks are then further decomposed into core and cyclic tasks, as well as other computational tasks. Core and cyclic tasks include SM2 core function tasks, SM3 core function tasks, and SM4 core function tasks. Ultimately, the task nodes can be divided into the following: SM2 core function task nodes, SM3 core function task nodes, SM4 core function task nodes, other computational task nodes, and non-CNCA algorithm computational task nodes.
[0132] During the authentication negotiation process, identity authentication and key negotiation use the public-key algorithm SM2, while key derivation uses the SM3 algorithm. The transmission encryption process primarily uses the symmetric cryptographic algorithm SM4 and the hash algorithm (SM3). Depending on the specific protocol, a suitable reconfigurable array is selected for computation when executing the SM4 algorithm; similarly, the same applies to the SM3 algorithm. In network communication scenarios, leveraging the characteristic that different data packets have different keys, interleaving techniques can be used to allow multiple data packets to be encrypted and decrypted in parallel.
[0133] Specifically, during task node partitioning, core functional tasks or computational tasks are divided into a series of task nodes based on the configuration information that the PEA array can load at one time. These include SM2 core functional task node 1-L; SM3 core functional task node 1-M; SM4 core functional task node 1-N; SM2 non-core functional task node 1-O; SM3 non-core functional task node 1-P; SM4 non-core functional task node 1-Q; and other computational task nodes 1-W, etc.
[0134] If a cluster contains multiple SM2 algorithm tasks, and the number of reconfigurable arrays in the reconfigurable processing units mapped to that cluster is large, then it can be divided into multiple regions, and the configuration information of the SM2 algorithm can be loaded and executed in parallel in multiple regions.
[0135] In this embodiment of the invention, in addition to parallel processing of tasks, the configuration information of subsequent algorithm steps can be preloaded during the current algorithm step processing to reduce pipeline idle time during configuration switching and further improve data processing speed.
[0136] In some specific implementations, mapping the K clusters to reconfigurable processing units includes:
[0137] For each task node in each cluster, the target configuration information required to complete the task node is retrieved from the pre-stored configuration information; wherein, completing the task node means processing the pending data belonging to the task node.
[0138] The target configuration information is parsed and mapped to the reconfigurable processing unit.
[0139] After processing the data to be processed, the processed data can be sent to the designated data unit.
[0140] In some specific implementations, the pre-stored configuration information includes configuration information for national cryptographic algorithms and configuration information for non-national cryptographic algorithms for network data, wherein the network data is business data based on network security protocols.
[0141] The configuration information for Chinese national cryptographic algorithms is generated based on their structure. The configuration information for non-national cryptographic algorithms used in network data is defined according to network security protocol formats and the national cryptographic algorithm structure. Network security protocols include IPsec and SSL, among others. IPsec is defined by its header (AH), Encapsulation of Secure Payload (ESP), and Key Exchange Protocol (IKE); SSL is defined by its SSL record protocol, SSL handshake protocol, SSL cipher change protocol, and SSL warning protocol. Both IPsec and SSL can be broadly divided into a handshake phase and a data transmission phase. The configuration information for the national cryptographic algorithms defines the algorithm's software structure based on the algorithm description file. This information can include fixed S-box content or constant information such as initial values within the algorithm.
[0142] In this embodiment of the invention, by pre-storing the configuration information of the national cryptographic algorithm and the configuration information of the non-national cryptographic algorithm for network data, the corresponding configuration information can be automatically retrieved as needed during configuration scheduling, eliminating the need for manual configuration based on the characteristics of the algorithm. Moreover, it fully considers the characteristic differences between different algorithms, enabling multiple national cryptographic algorithms to be implemented on the same reconfigurable processing hardware system, thus making it suitable for a variety of complex application scenarios.
[0143] In some specific implementations, the configuration information includes configuration information for one or more of the following operator combinations:
[0144] Logical operations, arithmetic operations, shift operations, table lookup operations, and substitution operations.
[0145] Specifically, logical operations include: XOR, NOT, OR, and AND. Arithmetic operations include: addition, modulo addition, and modulo subtraction. Bit shift operations include: left shift, circular left shift, right shift, and circular right shift. Table lookup operations include: multi-way parallel table lookup. Permutation operations include: arbitrary permutation of multi-bit data.
[0146] The embodiments of the present invention propose a rational operator design that comprehensively considers various national cryptographic algorithms without favoring any particular algorithm.
[0147] Furthermore, reconfigurable processing modules (i.e., reconfigurable processors) in related technologies often suffer from excessive storage and transmission volumes of configuration information, leading to significant latency in the configuration process. Therefore, reducing the size of the configuration information itself and generating high-quality configuration information are crucial for improving data processing efficiency. This invention proposes a hierarchical design, generation, and loading method for configuration information, as detailed below.
[0148] For some specific implementation methods, please refer to Figure 4The reconfigurable processing module comprises a four-tiered structure: a reconfigurable processing unit group, a reconfigurable processing unit, a reconfigurable computing array, and a reconfigurable unit.
[0149] Please see Figure 5 The target configuration information is a multi-level configuration information, which includes:
[0150] The first-level configuration information is used to schedule the reconfigurable processing units in the reconfigurable processing unit group;
[0151] The second layer of configuration information includes the configuration information of the reconfigurable processing unit, the data interaction information within the reconfigurable processing unit, the configuration information of the input data of the reconfigurable processing unit, and the configuration information of the output data of the reconfigurable processing unit.
[0152] The third layer of configuration information includes the configuration information of the reconfigurable computing array, the data interaction information between the reconfigurable computing arrays, the configuration information of the input data of the reconfigurable computing array, and the configuration information of the output data of the reconfigurable computing array.
[0153] The fourth layer of configuration information includes the configuration information of the reconfigurable unit.
[0154] Specifically, there is a hierarchical relationship between Reconfigurable Processing Units (RPUs), Reconfigurable Processing Units (RPUs), Reconfigurable Arrays of Assembled Arrays (PEAs), and Reconfigurable Arrays (PEs). A Reconfigurable Processing Unit group includes multiple (e.g., 4) Reconfigurable Processing Units, a Reconfigurable Processing Unit includes multiple (e.g., 4) Reconfigurable Arrays, and a Reconfigurable Array includes multiple (e.g., 8x8) Reconfigurable Arrays. This layered design and layered allocation of hardware enables real-time data authentication and encryption / decryption operations.
[0155] The first layer of configuration information is the scheduling configuration information for the reconfigurable processing unit group, which schedules the reconfigurable processing unit group and specifies which reconfigurable processing unit in the reconfigurable processing unit group will perform the operation.
[0156] The configuration information of the reconfigurable computing array includes the selection information of the reconfigurable cell rows, the initial idle period, the number of iterations, and the interconnection information between the reconfigurable cells.
[0157] The configuration information of the reconfigurable unit includes the selection information of the arithmetic logic unit, the input information of the multiplexer, the selection information of the lookup table unit, the selection information of the interconnection unit, the timing constraint information, the configuration information of the input data, and the configuration information of the output data. It is used to clarify the implementation area and physical connection of each module (specifically, the algorithm mapping task or the computation task, etc.) on the programmable logic array.
[0158] The hierarchical configuration information includes configuration scheduling information and specific configuration information. Configuration scheduling information involves the first-level configuration information, which obtains one or more sequence numbers of reconfigurable processing units during task scheduling. Specific configuration information (used to map computational tasks to operators) involves the second to fourth levels of configuration information, and is determined progressively based on the size of the task node, determining whether multiple reconfigurable processing units are needed within a single task node.
[0159] In this embodiment of the invention, the multi-level configuration information combination storage method based on operator combination can reduce the configuration information of network security protocols and national cryptographic algorithms, optimize storage space and capacity, and realize flexible scheduling and parsing of operator combination.
[0160] In some specific implementations, the configuration information of operators in the pre-stored configuration information is stored using an index; if the configuration information of operators is the same, the index used for storage is the same, and the index is stored in association with the corresponding configuration information.
[0161] In this embodiment of the invention, the configuration information of all operators is stored using an index. When storing the configuration information of operators with the same configuration information, the same index is used. The configuration information of different operators is stored in association with the corresponding index, thereby further reducing the storage space and capacity required for storing configuration information.
[0162] Specifically, operators involved in various network security protocols and national cryptographic algorithms can be categorized, with operators of the same category having identical configuration information. For example, they can be categorized based on the similarity and reusability between different operators:
[0163] Arithmetic Logic Unit: Handles logical operations and modular arithmetic;
[0164] Interconnection unit: handles shift and permutation operations;
[0165] Lookup table unit: handles S-box permutation operations in the SM3 and SM4 algorithms.
[0166] Therefore, an index (also called an index number) can be assigned to each type of operator, allowing operators of the same type in the configuration information to be compressed and stored using the index. The actual configuration information for each type of operator can be stored separately according to the index.
[0167] In some specific implementations, before retrieving the target configuration information required to complete the task node from the pre-stored configuration information, the method further includes:
[0168] The business processes of various network security protocols and the software implementation processes of various national cryptographic algorithms are obtained respectively, and the core of each algorithm is analyzed to form the final software code that can be directly mapped.
[0169] The software code is converted into a directed data flow graph, such that each operator in the data flow graph can be mapped to a reconfigurable cell of the reconfigurable computing array; specifically, the data flow graph can be optimized so that each operator in the data flow graph can be mapped to a reconfigurable cell of the reconfigurable computing array.
[0170] The mapping algorithm for the data flow graph is determined to obtain the configuration information.
[0171] In this embodiment, some overall control information (such as network interconnection and data access source and data output information) of the algorithm running on the array is determined based on the data flow graph.
[0172] In some specific implementations, the analysis of the algorithm core includes:
[0173] Unroll the loop body in the algorithm;
[0174] The branching operations in the algorithm can be rewritten, for example, by using loop rearrangement, scalar substitution, and affine transformation.
[0175] In this embodiment of the invention, by analyzing the business process of network security protocols and the software implementation process of national cryptographic algorithms, the core of the algorithm is dissected, including effectively expanding the loop body and rewriting the branch operations. The main methods used are loop rearrangement, scalar replacement, and affine transformation, to form the final software code that can be directly mapped, thereby achieving algorithm software optimization.
[0176] In some specific implementations, the mapping algorithm for the data flow graph is as follows:
[0177] If the number of reconfigurable units required for the data flow graph mapping is less than or equal to the number of reconfigurable units in a reconfigurable computing array, then the data flow graph is directly mapped to a reconfigurable computing array.
[0178] If the number of reconfigurable units required for the data flow graph mapping is greater than the number of reconfigurable units in a reconfigurable computing array, then the data flow graph is divided and interleaved through the algorithm's pipeline.
[0179] In this embodiment of the invention, based on practical and limited reconfigurable processing units, an operator mapping algorithm is proposed: for the number of operators less than the reconfigurable computing array, direct mapping is performed; for the number of operators greater than the reconfigurable computing array, the data flow graph needs to be divided, such as decomposing the repetitive process in a loop into several sub-processes, which can be divided into initialization, value retrieval, addition, assignment, storage, etc., and then interleaved through the algorithm pipeline.
[0180] In some specific implementations, parsing the target configuration information includes:
[0181] The fourth-level configuration information is filled with values based on the index of the operator's configuration information;
[0182] Based on the fourth-layer configuration information after assignment and filling, the third-layer configuration information and the second-layer configuration information are obtained sequentially.
[0183] In this embodiment of the invention, during configuration scheduling, i.e., when generating target configuration information, reconfigurable processing units can be allocated according to task division (the specific division method can be found above) to obtain the first-level configuration information and the second-level configuration information to be executed. When parsing the target configuration information, configuration information based on the reconfigurable computing array can be formed by assigning values one by one according to the index of the operator's configuration information.
[0184] This invention proposes a cluster-based adaptive task priority ranking scheduling algorithm based on the relevance of tasks to be processed. By dynamically partitioning and managing the hardware acceleration tasks to be executed, it retrieves configuration data stored in the storage module, loads and organizes the corresponding configuration information into the reconfigurable processing modules, and realizes configuration scheduling and switching of different tasks on the reconfigurable processing modules, thereby achieving hardware acceleration of tasks. Furthermore, it maximizes the current mapping of the reconfigurable computing array, enhancing the dynamic change capability and performance of the hardware.
[0185] For any additional pending tasks, schedule, configure, and process them according to the above process.
[0186] Please see Figure 6 This invention also provides a data processing system based on reconfigurable computing, the system comprising:
[0187] The system includes a configuration information storage module, a configuration information generation module, a control and management module, and a reconfigurable processing module.
[0188] The configuration information storage module is used to store the pre-stored configuration information described in the above embodiments. For details, please refer to the above embodiments of the data processing method based on reconfigurable computing, which will not be described in detail here.
[0189] The configuration information generation module is used in the pre-storage configuration information stage to construct a reconfigurable computing array operator based on national cryptographic algorithms, design a multi-level configuration information structure based on operator combinations, and design a configuration information storage method based on operator combinations; in the configuration scheduling stage, it is used to parse and generate the retrieved target configuration information by assigning values one by one according to the index of the operator's configuration information.
[0190] The control and management module is used to propose an adaptive task priority scheduling algorithm based on clustering according to the correlation of the tasks to be processed. By dynamically dividing and managing the hardware acceleration tasks to be executed, the module retrieves the configuration data stored in the storage module, loads and organizes the corresponding configuration information into the reconfigurable processing module, and realizes the configuration scheduling and switching of different tasks on the reconfigurable processing module.
[0191] A reconfigurable processing module is used to implement hardware acceleration for the tasks to be processed.
[0192] In addition, the data processing system based on reconfigurable computing may also include a data receiving module and a data sending module. The data receiving module is used to receive communication data from the Ethernet interface or data from other processing units, and the data sending module is used to send the processed data out, for example, to a designated data unit.
[0193] Accordingly, please refer to Figure 7 This invention provides a data processing apparatus based on reconfigurable computing, the apparatus comprising:
[0194] The table creation module 701 is used to add the task nodes of the currently pending tasks to the task node table to be scheduled.
[0195] The partitioning module 702 is used to perform clustering on the task nodes in the task node table to be scheduled, resulting in K clusters, where K is a positive integer.
[0196] The mapping module 703 is used to map the K clusters to reconfigurable processing units respectively, so as to process the current task to be processed in parallel.
[0197] In some specific implementations, the mapping module 703 is used to directly map one-to-one when K≤N; when K>N, it first maps N clusters, and then maps the other KN clusters one by one according to the running state of the reconfigurable processing unit until the processing is completed.
[0198] Where N is the number of the reconfigurable processing units.
[0199] In some specific implementations, the mapping module 703 includes:
[0200] The sorting unit is used to prioritize multiple task nodes for each cluster, if the cluster includes multiple task nodes, based on the relevance of the multiple task nodes, the estimated execution time, and the estimated data transmission time.
[0201] The mapping unit is used to load the data to be processed of the plurality of task nodes into different reconfigurable computing arrays in the reconfigurable processing unit of the cluster mapping according to the priority, and to perform pipelined processing until the plurality of task nodes in the cluster have been processed.
[0202] In some specific implementations, the partitioning module 702 includes:
[0203] The original cluster acquisition unit is used to acquire K0 original clusters of the task node and the center of the original clusters;
[0204] A distance calculation unit is used to calculate the distance between each of the task nodes and the center of each of the original clusters;
[0205] A partitioning unit is used to place the task node into the original cluster with the smallest distance;
[0206] The cluster center update unit is used to determine a new center of the original cluster based on the mode of the task nodes in the original cluster in a two-dimensional attribute; the two-dimensional attribute includes the target configuration information required to complete the task node and the data to be processed by the task node;
[0207] The first control unit is used to control the distance calculation unit, the partitioning unit and the cluster center update unit to execute repeatedly until the task nodes in the original clusters no longer change, and to determine the K original clusters with the task nodes among the K0 original clusters as the final clusters.
[0208] In some specific implementations, the original cluster acquisition unit includes:
[0209] The first center determination subunit is used to determine the center of the first original cluster based on the mode of the task node in the task node table in the two-dimensional attribute.
[0210] A computational subunit is used to calculate the distance between each first task node and the center of the determined original cluster; the first task node is the task node that has not yet been designated as the center of the original cluster.
[0211] The second center determination subunit is used to select the task node with the largest average distance from the first task node as the center of a new original cluster; the average distance refers to the average distance from a first task node to the center of each original cluster.
[0212] The second control subunit is used to control the computation subunit and the second center determination subunit to execute repeatedly until the centers of K0 original clusters are obtained.
[0213] In some specific implementations, the original cluster acquisition unit includes:
[0214] A sub-unit is selected to select a portion of the task nodes from the task nodes in the task node table as a second task node.
[0215] Define a sub-unit to define an original cluster; each time the original cluster is defined, it is different.
[0216] The selection sub-unit is used to arbitrarily select one of the second task nodes that is not currently clustered as the starting node;
[0217] Cluster partitioning subunits are used to place the starting node into the original cluster;
[0218] The judgment subunit is used to determine whether there is a third task node among the second task nodes that are not currently clustered. The third task node is a second task node whose distance from the fourth task node in the original cluster is less than or equal to a preset threshold. The fourth task node is the second task node that was most recently added to the original cluster.
[0219] The third control subunit is configured to, if the third task node exists, place the third task node into the original cluster, update the preset threshold according to the average dissimilarity of the second task nodes currently existing in the original cluster, obtain a new preset threshold, and control the transfer to the judgment subunit; if the third task node does not exist, control the transfer to the definition subunit until all the second task nodes are added to the corresponding original clusters, resulting in K0 original clusters.
[0220] In some specific embodiments, the apparatus further includes:
[0221] The data acquisition module is used to acquire the data to be processed.
[0222] The data parsing module is used to parse the data to be processed;
[0223] The data type determination module is used to determine whether the parsed data to be processed is business data based on network security protocols, and to determine the type of national cryptographic algorithm used in the parsed data to be processed, or the type of national cryptographic algorithm to be used, and to obtain the determination result.
[0224] The task determination module is used to determine the task to be processed based on the judgment result.
[0225] In some specific implementations, the mapping module 703 includes:
[0226] The configuration information scheduling unit is used to retrieve the target configuration information required to complete the task node from the pre-stored configuration information for each task node in each cluster.
[0227] The configuration information parsing and mapping unit is used to parse the target configuration information and map it to the reconfigurable processing unit.
[0228] In some specific implementations, the pre-stored configuration information includes configuration information for national cryptographic algorithms and configuration information for non-national cryptographic algorithms for network data, wherein the network data is business data based on network security protocols.
[0229] In some specific implementations, the reconfigurable processing module includes the following four-level structure: reconfigurable processing unit group, reconfigurable processing unit, reconfigurable computing array, and reconfigurable unit;
[0230] The target configuration information is a multi-level configuration information, which includes:
[0231] The first-level configuration information is used to schedule the reconfigurable processing units in the reconfigurable processing unit group;
[0232] The second layer of configuration information includes the configuration information of the reconfigurable processing unit, the data interaction information within the reconfigurable processing unit, the configuration information of the input data of the reconfigurable processing unit, and the configuration information of the output data of the reconfigurable processing unit.
[0233] The third layer of configuration information includes the configuration information of the reconfigurable computing array, the data interaction information between the reconfigurable computing arrays, the configuration information of the input data of the reconfigurable computing array, and the configuration information of the output data of the reconfigurable computing array.
[0234] The fourth layer of configuration information includes the configuration information of the reconfigurable unit.
[0235] In some specific implementations, the configuration information of operators in the pre-stored configuration information is stored using an index; if the configuration information of operators is the same, the index used for storage is the same, and the index is stored in association with the corresponding configuration information.
[0236] In some specific embodiments, the apparatus further includes:
[0237] The algorithm analysis module is used to obtain the business processes of various network security protocols and the software implementation processes of various national cryptographic algorithms, and to analyze the core of each algorithm to form the final software code that can be directly mapped.
[0238] A conversion module is used to convert the software code into a directed data flow graph, and to make each operator in the data flow graph map to a reconfigurable cell of the reconfigurable computing array.
[0239] The configuration information determination module is used to determine the mapping algorithm of the data flow graph and obtain the configuration information.
[0240] In some specific implementations, the algorithm analysis module includes:
[0241] Unrolling units are used to unroll the loop body in the algorithm;
[0242] The rewrite unit is used to rewrite the branch operations in the algorithm.
[0243] In some specific implementations, the mapping algorithm for the data flow graph is as follows:
[0244] If the number of reconfigurable units required for the data flow graph mapping is less than or equal to the number of reconfigurable units in a reconfigurable computing array, then the data flow graph is directly mapped to a reconfigurable computing array.
[0245] If the number of reconfigurable units required for the data flow graph mapping is greater than the number of reconfigurable units in a reconfigurable computing array, then the data flow graph is divided and interleaved through the algorithm's pipeline.
[0246] In some specific implementations, the configuration information parsing and mapping unit includes:
[0247] The assignment and filling subunit is used to assign and fill the fourth-layer configuration information according to the index of the configuration information of the operator; based on the fourth-layer configuration information after assignment and filling, the third-layer configuration information and the second-layer configuration information are obtained in sequence.
[0248] The embodiments of the present invention are device embodiments based on the same inventive concept as the method embodiments described above. Therefore, for specific technical details and corresponding technical effects, please refer to the method embodiments described above, and they will not be repeated here.
[0249] This invention also provides an electronic device, such as... Figure 8 As shown, the electronic device may include a processor 81 and a memory 82, wherein the processor 81 and the memory 82 can be connected to each other via a bus or other means. Figure 8 Taking the example of a connection between China and Israel via a bus.
[0250] Processor 81 can be a central processing unit (CPU). Processor 81 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0251] Memory 82, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the data processing method based on reconfigurable computing in this embodiment of the invention (e.g., Figure 7 (The table creation module 701, partitioning module 702, and mapping module 703 are shown). The processor 81 executes various functional applications and data processing by running non-transitory software programs, instructions, and modules stored in the memory 82, thereby implementing the data processing method based on reconfigurable computing in the above method embodiments.
[0252] The memory 82 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor 81, etc. Furthermore, the memory 82 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 82 may optionally include memory remotely located relative to the processor 81, and these remote memories may be connected to the processor 81 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0253] The one or more modules are stored in the memory 82, and when executed by the processor 81, they perform the following: Figure 1-6 The data processing method based on reconfigurable computation in the illustrated embodiment.
[0254] For specific details regarding the aforementioned electronic devices, please refer to the relevant documentation. Figures 1 to 6 The relevant descriptions and effects in the illustrated embodiments are for understanding purposes only and will not be repeated here.
[0255] Accordingly, this embodiment of the invention also provides a computer-readable storage medium for storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described data processing method embodiment based on reconfigurable computing and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0256] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0257] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0258] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A data processing method based on reconfigurable computation, characterized in that, The method includes: Add the task node of the currently pending task to the task node table to be scheduled; The task nodes in the task node table to be scheduled are clustered to obtain K clusters, where K is a positive integer; The K clusters are mapped to reconfigurable processing units to process the current task in parallel; The step of mapping the K clusters to reconfigurable processing units includes: For each task node in each cluster, the target configuration information required to complete the task node is retrieved from the pre-stored configuration information. The target configuration information is parsed and mapped to the reconfigurable processing unit; The target configuration information is a multi-level configuration information, which includes: The first layer of configuration information is used to schedule the reconfigurable processing units in the reconfigurable processing unit group; The second layer of configuration information includes the configuration information of the reconfigurable processing unit, the data interaction information within the reconfigurable processing unit, the configuration information of the input data of the reconfigurable processing unit, and the configuration information of the output data of the reconfigurable processing unit. The third layer of configuration information includes configuration information of the reconfigurable computing array, data interaction information between the reconfigurable computing arrays, configuration information of the input data of the reconfigurable computing array, and configuration information of the output data of the reconfigurable computing array. The fourth layer of configuration information includes the configuration information of the reconfigurable units.
2. The method according to claim 1, characterized in that, The step of mapping the K clusters to reconfigurable processing units includes: If K≤N, then a one-to-one mapping is directly applied; If K>N, then first map N clusters, and then map the other KN clusters one by one according to the running state of the reconfigurable processing unit until the processing is completed. Where N is the number of the reconfigurable processing units.
3. The method according to claim 1, characterized in that, The step of mapping the K clusters to reconfigurable processing units includes: For each cluster, if the cluster includes multiple task nodes, the multiple task nodes are prioritized according to their relevance, estimated execution time, and estimated data transmission time. According to the priority, the data to be processed of the multiple task nodes are sequentially loaded into different reconfigurable computing arrays in the reconfigurable processing unit of the cluster for pipelined processing until the multiple task nodes in the cluster have been processed.
4. The method according to claim 1, characterized in that, The task nodes in the task node table to be scheduled are clustered to obtain K clusters, including: S201: Obtain the K0 original clusters of the task node and the center of the original clusters; S202: Calculate the distance between each of the task nodes and the center of each of the original clusters; S203: Place the task node into the original cluster with the smallest distance; S204: Determine a new center of the original cluster based on the mode of the task nodes in the original cluster in the two-dimensional attributes; the two-dimensional attributes include the target configuration information required to complete the task node and the data to be processed by the task node; Repeat steps S202-S204 until the task nodes in the original clusters no longer change, and determine the K original clusters containing the task nodes from the K0 original clusters as the final clusters.
5. The method according to claim 4, characterized in that, The step of obtaining the K0 original clusters of the task node and the center of the original clusters includes: S301: Determine the center of the first original cluster based on the mode of the task node in the task node table in the two-dimensional attribute; S302: Calculate the distance between each first task node and the center of the determined original cluster; the first task node is the task node that has not yet been the center of the original cluster; S303: Select the task node with the largest average distance from the first task nodes as the center of a new original cluster; the average distance refers to the average distance from a first task node to the center of each original cluster; Repeat steps S302-S303 until K0 centers of the original clusters are obtained.
6. The method according to claim 4, characterized in that, The step of obtaining the K0 original clusters of the task node and the center of the original clusters includes: S401: Select a portion of the task nodes from the task node table as the second task nodes; S402: Define a primitive cluster, and the primitive cluster is different each time it is defined; S403: Randomly select one of the second task nodes that is not currently clustered as the starting node; S404: Place the starting node into the original cluster; S405: Determine whether there is a third task node among the second task nodes that are not currently clustered, wherein the third task node is a second task node whose distance from the fourth task node in the original cluster is less than or equal to a preset threshold; wherein the fourth task node is the second task node that was most recently added to the original cluster. S406: If the third task node exists, the third task node is placed into the original cluster. The preset threshold is updated according to the average dissimilarity of the second task nodes currently existing in the original cluster to obtain a new preset threshold, and then proceeds to step S405. If the third task node does not exist, proceeds to step S402 until all the second task nodes are added to the corresponding original clusters to obtain K0 original clusters.
7. The method according to claim 1, characterized in that, Before adding the task node of the currently pending task to the task node table to be scheduled, the process also includes: Obtain the data to be processed; The data to be processed is parsed; Determine whether the parsed data to be processed is business data based on network security protocols, and determine the type of national cryptographic algorithm used in the parsed data to be processed, or the type of national cryptographic algorithm to be used, to obtain the determination result; The task to be processed is determined based on the judgment result.
8. The method according to claim 1, characterized in that, The pre-stored configuration information includes configuration information for national cryptographic algorithms and configuration information for non-national cryptographic algorithms for network data, wherein the network data is business data based on network security protocols.
9. The method according to claim 1, characterized in that, In the pre-stored configuration information, the configuration information of the operators is stored using an index; if the configuration information of the operators is the same, the index used for storage is the same, and the index is stored in association with the corresponding configuration information.
10. The method according to claim 1, characterized in that, Before retrieving the target configuration information required to complete the task node from the pre-stored configuration information, the method further includes: The business processes of various network security protocols and the software implementation processes of various national cryptographic algorithms are obtained respectively, and the core of each algorithm is analyzed to form the final software code that can be directly mapped. The software code is converted into a directed data flow graph, such that each operator in the data flow graph can be mapped to a reconfigurable cell of the reconfigurable computing array. The mapping algorithm for the data flow graph is determined to obtain the configuration information.
11. The method according to claim 10, characterized in that, The analysis of the core algorithm includes: Unroll the loop body in the algorithm; Rewrite the branching operations in the algorithm.
12. The method according to claim 10, characterized in that, The mapping algorithm for the data flow graph is as follows: If the number of reconfigurable units required for the data flow graph mapping is less than or equal to the number of reconfigurable units in a reconfigurable computing array, then the data flow graph is directly mapped to a reconfigurable computing array. If the number of reconfigurable units required for the data flow graph mapping is greater than the number of reconfigurable units in a reconfigurable computing array, then the data flow graph is divided and interleaved through the algorithm's pipeline.
13. The method according to claim 9, characterized in that, The parsing of the target configuration information includes: The fourth-level configuration information is filled with values based on the index of the operator's configuration information; Based on the fourth-layer configuration information after assignment and filling, the third-layer configuration information and the second-layer configuration information are obtained sequentially.
14. A data processing device based on reconfigurable computing, characterized in that, The device includes: The table creation module is used to add the task nodes of the currently pending tasks to the task node table to be scheduled. The partitioning module is used to perform clustering on the task nodes in the task node table to be scheduled, resulting in K clusters, where K is a positive integer. The mapping module is used to map the K clusters to reconfigurable processing units respectively, so as to process the current task in parallel. The mapping module includes: The configuration information scheduling unit is used to retrieve the target configuration information required to complete the task node from the pre-stored configuration information for each task node in each cluster. A configuration information parsing and mapping unit is used to parse the target configuration information and map it to the reconfigurable processing unit; The target configuration information is a multi-level configuration information, which includes: The first layer of configuration information is used to schedule the reconfigurable processing units in the reconfigurable processing unit group; The second layer of configuration information includes the configuration information of the reconfigurable processing unit, the data interaction information within the reconfigurable processing unit, the configuration information of the input data of the reconfigurable processing unit, and the configuration information of the output data of the reconfigurable processing unit. The third layer of configuration information includes configuration information of the reconfigurable computing array, data interaction information between the reconfigurable computing arrays, configuration information of the input data of the reconfigurable computing array, and configuration information of the output data of the reconfigurable computing array. The fourth layer of configuration information includes the configuration information of the reconfigurable units.
15. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory being used to store a computer program, which, when executed by the processor, implements the data processing method based on reconfigurable computing as described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, which, when executed by a processor, implements the data processing method based on reconfigurable computing as described in any one of claims 1 to 13.
Citation Information
Patent Citations
Edge computing task classification scheduling method based on K-means clustering and queuing theory
CN114356531A
Hardware / software co-synthesis of dynamically reconfigurable embedded systems
US6415384B1