Calculation method and system based on multilayer data flow fusion execution model

By constructing a data flow fusion execution model at the application layer, thread layer, function layer and instruction layer, the problem that the multi-level advantages of the data flow execution model in the existing technology have not been fully utilized is solved, and efficient execution of the computer system is achieved.

CN120704741APending Publication Date: 2025-09-26INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510744787.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the existing technology, the data flow execution model is only implemented at a single level, failing to fully utilize its multi-level advantages in the computer architecture, resulting in insufficient execution efficiency.

Method used

A multi-layer data flow fusion execution method is proposed, which includes data flow execution models of application layer, thread layer, function layer and instruction layer. By constructing a multi-layer data flow fusion execution model, data flow control and activation execution at each layer are realized.

Benefits of technology

Through the fusion execution of multi-level data flows, the execution advantages of data flows at multiple levels are fully utilized, thereby improving the execution efficiency of the computer system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704741A_ABST
    Figure CN120704741A_ABST
Patent Text Reader

Abstract

The invention discloses a calculation method based on a multi-layer data flow fusion execution model, and the method comprises the steps: receiving a multi-layer data flow fusion processing execution request, analyzing a multi-layer data execution control flow, building a multi-layer data flow fusion execution model based on the control flow, and enabling the multi-layer data flow fusion execution model to fuse a plurality of layers of sub-models, the sub-model comprises data flow execution sub-models of an application layer, a thread layer, a function layer and an instruction layer; and based on the multi-layer data flow fusion execution model, respectively generating execution control flow of each layer, and executing the data flow of each layer according to the control flow to realize multi-layer data flow fusion calculation. According to the method, a multi-level data flow and fusion execution mode is provided, the execution advantages of the multi-level data flow are fully exerted, and the execution efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data flow execution models and computing systems based on data flow execution models, and in particular to a computing method and system based on a multi-layer data flow fusion execution model. Background Art

[0002] Dataflow theory was proposed by MIT Professor Jack B. Dennis in the 1970s. It was subsequently used primarily to control the flow of data between multiple machines in supercomputers and mainframes, essentially implementing a dataflow execution model across multiple machines or processor chips. Since the early 2000s, the dataflow execution model has been implemented in numerous processor chips, including the TRIPS processor at UT Austin and the DPU dataflow processor at the Institute of Computing Technology, Chinese Academy of Sciences.

[0003] In existing data flow execution mechanisms and implementation cases, the data flow execution mechanism is only implemented at a single level, such as at the multi-machine level, at the chip internal level, etc., and the advantages of data flow at multiple levels in computer architecture are not fully exploited.

[0004] Therefore, in response to the technical problems existing in the existing technology, it is urgent to propose an execution strategy that comprehensively realizes multi-level data flow fusion from the perspective of the entire computer architecture stack, from the underlying hardware to the upper application level, including the application layer, thread layer, function layer, and instruction layer, to give full play to the execution advantages of data flow at multiple levels and further improve execution efficiency. Summary of the Invention

[0005] In order to solve the problem in the prior art that the advantages of the data flow execution model are not fully utilized, the present invention proposes a multi-layer fusion data flow execution method and system of application layer, thread layer, function layer and instruction layer.

[0006] In a first aspect, an embodiment of the present application provides a computing method based on a multi-layer data flow fusion execution model, which is applied to the application layer, thread layer, function layer, instruction layer, and underlying hardware layer in a multi-layer computer architecture. The method includes:

[0007] Receive multi-layer data flow fusion processing execution requests, analyze multi-layer data execution control flows, and build a multi-layer data flow fusion execution model based on the control flows. The multi-layer data flow fusion execution model integrates sub-models at multiple levels, including data flow execution sub-models at the application layer, thread layer, function layer, and instruction layer.

[0008] Based on the multi-layer data flow fusion execution model, the execution control flow of each layer is generated respectively, and the data flow of each layer is executed according to the control flow to realize the multi-layer data flow fusion calculation.

[0009] In the embodiment of the present invention, the step of constructing a multi-layer data flow fusion execution model based on the control flow includes:

[0010] Receive application layer data flow fusion processing execution request, analyze application layer data execution control flow, and build application layer data flow execution sub-model;

[0011] Receive thread-layer data flow fusion processing execution requests, analyze thread-layer data execution control flow, and build thread-layer data flow execution sub-model;

[0012] Receive function layer data flow fusion processing execution request, analyze function layer data execution control flow, and build function layer data flow execution sub-model;

[0013] Receive instruction layer data flow fusion processing execution request, analyze instruction layer data execution control flow, and build instruction layer data flow execution sub-model.

[0014] In the embodiment of the present invention, the above-mentioned multi-layer data flow fusion execution model generates execution control flows at each level respectively, and executes the data flow steps at each level according to the control flows, including:

[0015] According to the application layer data flow execution sub-model, the data flow execution control flow between applications is analyzed, and an application layer data flow execution control table is constructed for each application. The application layer data flow control table includes: the number of the previous application and the number of the subsequent application of each current application;

[0016] According to the application layer data flow execution control table, each application in the application layer data flow is controlled to be activated and executed according to the data dependency relationship.

[0017] In the embodiment of the present invention, the above-mentioned multi-layer data flow fusion execution model generates execution control flows at each level respectively, and executes the data flow steps at each level according to the control flows, including:

[0018] According to the thread-level data flow execution sub-model, the data flow execution control flow between each thread is analyzed, and a thread-level data flow execution control table is constructed for each thread. The thread-level data flow control table includes: the predecessor application number and the successor thread number of each current thread;

[0019] According to the thread layer data flow execution control table, each thread in the thread layer data flow is controlled to be activated and executed according to the data dependency relationship.

[0020] In the embodiment of the present invention, the above-mentioned multi-layer data flow fusion execution model generates execution control flows at each level respectively, and executes the data flow steps at each level according to the control flows, including:

[0021] According to the function layer data flow execution sub-model, the data flow execution control flow between each function is analyzed, and a function layer data flow execution control table is constructed for each function. The function layer data flow control table includes: the predecessor application number of each current function and the number of the successor function;

[0022] According to the function layer data flow execution control table, each function in the function layer data flow is activated and executed according to the data dependency relationship.

[0023] In the embodiment of the present invention, the above-mentioned multi-layer data flow fusion execution model generates execution control flows at each level respectively, and executes the data flow steps at each level according to the control flows, including:

[0024] According to the instruction layer data flow execution sub-model, the data flow execution control flow between each instruction is analyzed, and an instruction layer data flow execution control table is constructed for each instruction, wherein the instruction layer data flow control table includes: the predecessor application number of each current instruction and the number of the subsequent instruction;

[0025] According to the instruction layer data flow execution control table, each instruction in the instruction layer data flow is controlled to be activated and executed according to the data dependency relationship.

[0026] In an embodiment of the present invention, the above-mentioned steps of generating execution control flows at each level based on a multi-layer data flow fusion execution model and executing data flows at each level according to the control flows further include:

[0027] Each layer executes the control table according to the data flow of each layer to initialize each application, thread, function and instruction;

[0028] During execution, the activation start condition of each current application, thread, function and instruction is to receive the execution result of the previous task and start activating and executing each current application, thread, function and instruction;

[0029] Each current application, thread, function, and instruction sends a feedback signal to the previous task, notifying it that the data sent by the previous task has been received.

[0030] The current applications, threads, functions and instructions recorded in the successor task table of the previous task are deleted.

[0031] In a second aspect, an embodiment of the present invention provides a computing system based on a multi-layer data flow fusion execution model, which is applied to the application layer, thread layer, function layer, instruction layer, and underlying hardware layer in a multi-layer computer architecture. The system includes:

[0032] Model construction module: receives multi-layer data flow fusion processing execution requests, analyzes multi-layer data execution control flows, and builds a multi-layer data flow fusion execution model based on the control flows. The multi-layer data flow fusion execution model integrates sub-models at multiple levels, including data flow execution sub-models at the application layer, thread layer, function layer, and instruction layer.

[0033] Fusion computing module: Based on the multi-layer data flow fusion execution model, it generates execution control flows at each level respectively, and executes data flows at each level according to the control flows to realize multi-layer data flow fusion computing.

[0034] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a calculation method based on a multi-layer data stream fusion execution model.

[0035] In a fourth aspect, an embodiment of the present application provides an electronic device comprising at least one processor CPU, at least one memory, at least one communication bus, at least one input device, at least one output device, and a computer program stored in the memory and runnable on the processor. When the processor executes the program, the steps of the above-mentioned method for calculating the execution model based on the multi-layer data stream fusion execution are implemented. The electronic device is a multi-core system or a distributed computing system including a heterogeneous SoC chip or a plurality of chips.

[0036] Compared with the related existing technologies, it has the following outstanding beneficial effects:

[0037] (1) The present invention proposes a multi-layer data flow fusion execution model, including the fusion execution of application-level, thread-level, function-level, and instruction-level data flow execution models; fully leveraging the advantages of data flow execution at multiple levels to improve execution efficiency;

[0038] (2) The present invention proposes a flow control method for the data flow execution model at the application, thread, function, and instruction levels; and realizes multiple levels of data flow and fusion execution methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0040] Figure 1 Schematic diagram of a calculation method based on a multi-layer data stream fusion execution model of the present invention;

[0041] Figure 2 Schematic diagram of a calculation method based on a multi-layer data stream fusion execution model according to an embodiment of the present invention;

[0042] Figure 3 This is a schematic diagram comparing the control flow and data flow execution according to an embodiment of the present invention;

[0043] Figure 4 Schematic diagram of a multi-layer data stream fusion execution model according to an embodiment of the present invention;

[0044] Figure 5 Schematic diagram of the application layer data flow execution control mechanism according to an embodiment of the present invention;

[0045] Figure 6 Schematic diagram of the thread-layer data flow execution control mechanism according to an embodiment of the present invention;

[0046] Figure 7 Schematic diagram of the function layer data flow execution control mechanism according to an embodiment of the present invention;

[0047] Figure 8 Schematic diagram of the instruction layer data flow execution control mechanism according to an embodiment of the present invention;

[0048] Figure 9 This is a schematic diagram of a multi-domain fusion processing scenario according to an embodiment of the present invention;

[0049] Figure 10 Schematic diagram of a computing system based on a multi-layer data stream fusion execution model of the present invention;

[0050] Figure 11 Schematic diagram of computer hardware of the present invention. DETAILED DESCRIPTION

[0051] In this disclosure, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, "at least one of a, b, or c" can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0052] It should also be understood that the term "and / or" in this document simply describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " in this document generally indicates an "or" relationship between the related objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.

[0053] It should also be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0054] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of the device or unit, which can be electrical, mechanical or other forms.

[0055] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0056] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0057] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0058] To illustrate the above-mentioned features and effects of the present invention more clearly and easily, the following embodiments are specifically described below with reference to the accompanying drawings. This specification discloses one or more embodiments incorporating the features of the present invention. The disclosed embodiments are for illustrative purposes only. The scope of protection of the present invention is not limited to the disclosed embodiments; the present invention is defined by the appended claims.

[0059] The following is a system embodiment corresponding to the above method embodiment. This embodiment can be implemented in conjunction with the above embodiment. The relevant technical details mentioned in the above embodiment are still valid in this embodiment and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above embodiment.

[0060] The present invention aims to fully implement a multi-level data flow fusion execution strategy from the perspective of the entire computer architecture stack, from the underlying hardware to the upper application level, including the application layer, thread layer, function layer, and instruction layer, to give full play to the execution advantages of data flow at multiple levels and further improve execution efficiency.

[0061] When conducting research on the optimization design of data flow software and hardware system architecture, the present invention found that the existing technology did not fully utilize the optimization of the data flow execution mechanism. This is because the existing technology only completed the data flow mechanism at a single level, and did not deeply explore the advantages of the integrated execution of the data flow mechanism at multiple levels and break through the difficulties of the integrated technology. After studying the multi-level data flow execution mechanism, the present invention found that the data flow control mechanism can be implemented at the application layer, thread layer, function layer and instruction layer, and a more efficient execution method can be achieved through the integrated execution of data flows at each layer.

[0062] The following describes the method of the embodiment of the present application in detail with reference to specific embodiments:

[0063] Example 1

[0064] like Figure 1 and Figure 2 As shown, the embodiment of the present application proposes a computing method based on a multi-layer data flow fusion execution model, which is applied to the application layer, thread layer, function layer, instruction layer and underlying hardware layer in a multi-layer computer architecture. The method includes:

[0065] Step 101: Receive a multi-layer data flow fusion processing execution request, analyze the multi-layer data execution control flow, and build a multi-layer data flow fusion execution model based on the control flow. The multi-layer data flow fusion execution model integrates sub-models at multiple levels, including data flow execution sub-models at the application layer, thread layer, function layer, and instruction layer.

[0066] Step 102: Based on the multi-layer data flow fusion execution model, generate execution control flows of each layer respectively, and execute data flows of each layer according to the control flows to realize multi-layer data flow fusion calculation.

[0067] Specifically, in the embodiment of the present invention, Figure 3 and Figure 4 As shown, the multi-layer data flow fusion execution model includes:

[0068] The top layer is the application layer data flow. Multi-domain fusion scenarios typically involve processing and data interaction across multiple applications. For example, in drone scenarios, external information is perceived through video cameras, infrared, radar, and synthetic aperture radar (SAR). After pre-processing through audio and video encoding and decoding, digital signal processing, and other methods, the data is transformed into an image for AI-powered target recognition. This is followed by target calibration and decision-making. Another example is intelligent transportation, which integrates radar and vision. Different steps and stages involve application algorithms from different fields, and their data needs to flow among these algorithms. This step requires programmers to control the flow of data between different application algorithms, implementing the application layer data flow execution model.

[0069] Below the application layer is the thread layer data flow. For each application algorithm, multi-threading is usually used for concurrent execution to improve processing efficiency. If there is no data dependency between threads, they can be executed in parallel, such as Figure 3 and Figure 4 Threads 3 and 4 can execute in parallel without dependencies. If there are data dependencies between threads, such as threads 4, 5, and 6 in the figure, flow control is required through the data flow execution model to achieve efficient processing between multiple threads.

[0070] Below that is the function-level data flow. Each thread task is composed of a combination of function calls, with different data flow directions and data dependencies between functions. During compilation, a function-level data flow graph is generated based on the dependencies between functions. During program execution within a thread, each function is activated and executed according to the data flow execution model based on the function-level data flow graph.

[0071] The lowest level is the instruction-level data flow. Each function implements a relatively independent code segment. When the compiler compiles the code, it generates instructions one by one, and there are data dependencies between instructions. At this point, the compiler generates an instruction-level data flow graph, enabling the instructions to be activated and executed according to the data flow execution model.

[0072] The data flows at each layer above are ultimately executed on the underlying hardware. The underlying hardware can be a heterogeneous SoC chip, a multi-core system composed of multiple chips, or a distributed computing system. It is important to note that for instruction-level data flows, the underlying chip must support the data flow execution model. If the underlying chip does not support the data flow execution model, only application-level data flows, thread-level data flows, and function-level data flows can be implemented. The instructions compiled within each function must implement the corresponding binary file based on the underlying chip type, such as X86, ARM, MIPS, etc.

[0073] In the embodiment of the present invention, the above step 101, in which a multi-layer data flow fusion execution model is constructed based on the control flow, includes:

[0074] Receive application layer data flow fusion processing execution request, analyze application layer data execution control flow, and build application layer data flow execution sub-model;

[0075] Receive thread-layer data flow fusion processing execution requests, analyze thread-layer data execution control flow, and build thread-layer data flow execution sub-model;

[0076] Receive function layer data flow fusion processing execution request, analyze function layer data execution control flow, and build function layer data flow execution sub-model;

[0077] Receive instruction layer data flow fusion processing execution request, analyze instruction layer data execution control flow, and build instruction layer data flow execution sub-model.

[0078] In the embodiment of the present invention, the above step 102 generates execution control flows at each level based on the multi-layer data flow fusion execution model, and executes the data flows at each level according to the control flows, including:

[0079] According to the application layer data flow execution sub-model, the data flow execution control flow between applications is analyzed, and an application layer data flow execution control table is constructed for each application. The application layer data flow control table includes: the number of the previous application and the number of the subsequent application of each current application;

[0080] According to the application layer data flow execution control table, each application in the application layer data flow is controlled to be activated and executed according to the data dependency relationship.

[0081] In the embodiment of the present invention, the above-mentioned multi-layer data flow fusion execution model generates execution control flows at each level respectively, and executes the data flow steps at each level according to the control flows, including:

[0082] According to the thread-level data flow execution sub-model, the data flow execution control flow between each thread is analyzed, and a thread-level data flow execution control table is constructed for each thread. The thread-level data flow control table includes: the predecessor application number and the successor thread number of each current thread;

[0083] According to the thread layer data flow execution control table, each thread in the thread layer data flow is controlled to be activated and executed according to the data dependency relationship.

[0084] In the embodiment of the present invention, the above-mentioned multi-layer data flow fusion execution model generates execution control flows at each level respectively, and executes the data flow steps at each level according to the control flows, including:

[0085] According to the function layer data flow execution sub-model, the data flow execution control flow between each function is analyzed, and a function layer data flow execution control table is constructed for each function. The function layer data flow control table includes: the predecessor application number of each current function and the number of the successor function;

[0086] According to the function layer data flow execution control table, each function in the function layer data flow is activated and executed according to the data dependency relationship.

[0087] In the embodiment of the present invention, the above-mentioned multi-layer data flow fusion execution model generates execution control flows at each level respectively, and executes the data flow steps at each level according to the control flows, including:

[0088] According to the instruction layer data flow execution sub-model, the data flow execution control flow between each instruction is analyzed, and an instruction layer data flow execution control table is constructed for each instruction, wherein the instruction layer data flow control table includes: the predecessor application number of each current instruction and the number of the subsequent instruction;

[0089] According to the instruction layer data flow execution control table, each instruction in the instruction layer data flow is controlled to be activated and executed according to the data dependency relationship.

[0090] In an embodiment of the present invention, the above-mentioned steps of generating execution control flows at each level based on a multi-layer data flow fusion execution model and executing data flows at each level according to the control flows further include:

[0091] Each layer executes the control table according to the data flow of each layer to initialize each application, thread, function and instruction;

[0092] During execution, the activation start condition of each current application, thread, function and instruction is to receive the execution result of the previous task and start activating and executing each current application, thread, function and instruction;

[0093] Each current application, thread, function, and instruction sends a feedback signal to the previous task, notifying it that the data sent by the previous task has been received.

[0094] The current applications, threads, functions and instructions recorded in the successor task table of the previous task are deleted.

[0095] Specifically, in the embodiment of the present invention, Figure 5 、 6 As shown in Figures 7 and 8, the specific execution control mechanism of each data flow layer performs the following steps:

[0096] Figure 5 The figure shows the data flow at the application layer. Application-layer data flow requires user programming or automated machine analysis to control the execution of data flows between applications. As shown in the figure, to implement data flow between applications, each application must maintain a data flow execution control table. This control table records the numbers of the predecessor and successor applications of the current application. For example, Application 2 has its predecessor task as Application 1 and its successor task as Application 4. Therefore, in its data flow execution control table, the predecessor task is initialized to 1 and the successor task is Application 4. During execution, Application 2's activation condition is that the predecessor task 1 transmits its execution results to Application 2. This indicates that the execution conditions for Application 2 are met and Application 2 can begin executing at any time. Simultaneously, Application 2 sends an ACK signal to Application 1, notifying Application 1 that the data sent by Application 1 has been received by Application 2. At this point, the "2" in Application 1's successor task table is deleted, indicating that the data sent to Application 2 has been successfully transmitted. This data flow execution mechanism controls the activation and execution of each application in the data flow diagram according to data dependencies, thus implementing a data flow execution model.

[0097] Figure 6 Figure 2 shows the data flow at the thread level. This is similar to the data flow execution control mechanism at the application level, with the main difference being that the compiler automatically analyzes the application program to generate thread-level data flow control information. During thread execution, each thread task is activated based on the control information about inter-thread data dependencies, thus achieving thread-level data flow.

[0098] Figure 7 Figure 2 shows the data flow at the function level. Similar to the thread-level data flow execution control mechanism, the compiler automatically analyzes all function programs in a thread and generates data flow control information for the function level. During function execution, each function task is activated based on the control information about inter-function data dependencies, thus implementing the function-level data flow.

[0099] Figure 8Figure 2 shows the data flow at the instruction level. Similar to the data flow execution control mechanism at the function level, the compiler automatically analyzes all instructions in a function to generate instruction-level data flow control information. During instruction execution, each instruction is activated based on the control information about inter-instruction data dependencies, thus achieving instruction-level data flow.

[0100] like Figure 9 As shown in the scenario diagram, taking the radar-visual fusion vehicle identification of road video surveillance as an example, the present invention dynamically generates a logical structure based on the address and a corresponding memory access structure. According to this structure and the execution characteristics of the actual application program, a specific program execution process is implemented in the embodiment of the present invention. In complex fusion application scenarios, the data comes from perception devices such as optical cameras (video), SAR radars (radar imaging) and lidars (dot matrix images). It is necessary to preprocess the video, radar imaging and dot matrix images, and perform target recognition in the image after the preprocessing is completed. After recognition, the target is marked.

[0101] Taking the radar-based fusion vehicle recognition of road video surveillance as an example, it is necessary to perform fusion processing based on multiple recognitions to improve recognition accuracy. For such multi-domain fusion application scenarios, the multi-application processing flow will be aggregated and then distributed. At this time, the data flow control in multiple applications plays an important role in execution efficiency. The specific processing steps of the present invention for such scenarios are as follows: Figure 2 The execution flow chart is shown below:

[0102] Step 1: Based on the application characteristics of multi-domain fusion processing scenarios, when programming, users determine the data processing requirements and data flow of multiple application scenarios, and implement the data flow execution model of the application layer. For example, in video processing and intelligent recognition, the results of radar imaging and intelligent recognition need to be summarized and compared and proofread, and the proofreading results should be fed back to re-optimize video image recognition and radar image recognition to improve the accuracy of target recognition. Compared with previous programming methods, users need to display the data flow sequence between specified applications when programming. The specific flow sequence control is as follows: Figure 4 shown.

[0103] Step 2: Within each application, data flow control needs to be implemented between the multiple threads generated by the compiler during compilation. On the one hand, compared to the traditional execution method, the present invention divides the compilation of the application algorithm into multi-threaded task processing according to the characteristics of the program algorithm. For example, for video processing and target recognition, video preprocessing, video decoding, video image generation, and image scaling can all be processed by separate threads. Moreover, the same thread can process multiple video stream data at the same time. At this time, the flow direction of data between threads requires the use of a data flow control mechanism to improve execution efficiency. Each thread maintains the activation table of the predecessor task and successor task of this thread. The thread triggers activation execution or sends the execution result to the subsequent thread according to the activation table, and modifies the content of the successor task activation table to indicate that the predecessor task of the next thread is completed and the data transmission is completed. The specific flow control execution diagram is shown as follows Figure 5 shown.

[0104] Step 3: Each thread usually contains multiple functions combined into a target function. In the present invention, compared with traditional function compilation, a function task activation table is generated between the functions in the present invention, and the data flow control between the functions is controlled by the activation table. Figure 6 For example, in the neural network recognition stage, convolution operators, activation operators, and pooling operators of different scales are independent functions, and the data flow relationship between the functions is maintained by the activation table.

[0105] Step 4: Each function is compiled by the compiler to generate a corresponding instruction set. In the present invention, the instructions are separated by the following sequence: Figure 2 The data flow model shown in the figure is used to improve the execution concurrency between instructions. Instruction task activation tables are also configured between instructions to record the predecessor and successor tasks of this instruction.

[0106] Step 5: Execute the compiled binary file on a data flow processor or in a distributed system. Note that function- and instruction-level data flows require support from the underlying data flow processor chip. Thread- and application-level data flows can run in a distributed system built on a common, existing processor architecture.

[0107] As described above, the method of the present invention can be better implemented.

[0108] In general, compared with the existing technology, the above-mentioned scheme conceived by the present invention uses the data flow execution mechanism at multiple levels, which can give full play to the natural concurrency and execution advantages of data execution at different granularities, and integrate the data flow execution models at multiple levels for execution, further enhance the advantages of the data flow execution model, give full play to its role, and improve the execution efficiency of the entire computer system.

[0109] Example 2

[0110] like Figure 10 As shown, the embodiment of the present application provides a computing system based on a multi-layer data flow fusion execution model, which is applied to the application layer, thread layer, function layer, instruction layer and underlying hardware layer in a multi-layer computer architecture. The system includes:

[0111] Model construction module 201: receives a multi-layer data flow fusion processing execution request, analyzes the multi-layer data execution control flow, and constructs a multi-layer data flow fusion execution model based on the control flow. The multi-layer data flow fusion execution model integrates sub-models at multiple levels, including data flow execution sub-models at the application layer, thread layer, function layer, and instruction layer.

[0112] Fusion calculation module 202: Based on the multi-layer data flow fusion execution model, it generates execution control flows of each layer respectively, and executes data flows of each layer according to the control flows to realize multi-layer data flow fusion calculation.

[0113] Example 3

[0114] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the method for calculating the model based on the fusion of multi-layer data streams are implemented.

[0115] Example 4

[0116] An embodiment of the present application provides an electronic device, comprising at least one processor CPU, at least one memory, at least one communication bus, at least one input device, at least one output device, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method based on the multi-layer data flow fusion execution model when executing the program, wherein the electronic device is a multi-core system or distributed computing system including a heterogeneous SoC chip or a plurality of chips.

[0117] In addition, combined Figure 1 The multi-layer data stream fusion execution model method described in the embodiment of the present application can be implemented by an electronic device, such as a computer device. Figure 11 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present application.

[0118] The data flows at each layer above are ultimately executed on the underlying hardware. The underlying hardware can be a heterogeneous SoC chip, a multi-core system composed of multiple chips, or a distributed computing system. It is important to note that for instruction-level data flows, the underlying chip must support the data flow execution model. If the underlying chip does not support the data flow execution model, only application-level data flows, thread-level data flows, and function-level data flows can be implemented. The instructions compiled within each function must implement the corresponding binary file based on the underlying chip type, such as X86, ARM, MIPS, etc.

[0119] In some embodiments, the CPU includes an arithmetic logic unit (ALU) and a control unit. The ALU is primarily responsible for program operations and logical judgment, while the control unit primarily coordinates the operations between peripheral components and units. The CPU performs corresponding functions or processes data by executing non-volatile programs, instructions, or modules stored in memory.

[0120] The memory is a memory component used to store programs and various data information. It can store program instructions and data corresponding to the sparse neural network optimization method in the example of the present invention. The memory can include volatile memory, such as high-speed random access memory (RAM), and can also include non-volatile memory, such as a hard disk, flash memory or other non-volatile solid-state storage device.

[0121] The communication bus is used to realize the connection and data communication between these components, including the data bus, address bus and control bus, which are used to transmit data, data address and control signals respectively.

[0122] Input devices can receive numbers, characters, etc. input by the user, and can also obtain input control signals or function setting information, etc., and can include a mouse, keyboard, etc.

[0123] The output device can display the output information of the device and may include a display device such as a display screen.

[0124] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0125] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A calculation method based on a multi-layer data flow fusion execution model, characterized in that: Applied to the application layer, thread layer, function layer, instruction layer and underlying hardware layer in a multi-layer computer architecture, the method includes: Receive a multi-layer data flow fusion processing execution request, analyze the multi-layer data execution control flow, and build a multi-layer data flow fusion execution model based on the control flow, wherein the multi-layer data flow fusion execution model integrates sub-models at multiple levels, wherein the sub-models include: data flow execution sub-models of application layer, thread layer, function layer, and instruction layer; Based on the multi-layer data flow fusion execution model, execution control flows of each layer are generated respectively, and according to the control flows, data flows of each layer are executed to realize multi-layer data flow fusion calculation.

2. The calculation method based on the multi-layer data flow fusion execution model according to claim 1 is characterized in that: The step of constructing a multi-layer data flow fusion execution model based on the control flow includes: Receive application layer data flow fusion processing execution request, analyze application layer data execution control flow, and build application layer data flow execution sub-model; Receive thread-layer data flow fusion processing execution requests, analyze thread-layer data execution control flow, and build thread-layer data flow execution sub-model; Receive function layer data flow fusion processing execution request, analyze function layer data execution control flow, and build function layer data flow execution sub-model; Receive instruction layer data flow fusion processing execution request, analyze instruction layer data execution control flow, and build instruction layer data flow execution sub-model.

3. The calculation method based on the multi-layer data flow fusion execution model according to claim 2 is characterized in that: The step of generating execution control flows at each level based on the multi-layer data flow fusion execution model and executing data flows at each level according to the control flows includes: Analyze the data flow execution control flow between applications according to the application layer data flow execution sub-model, and construct an application layer data flow execution control table for each application, wherein the application layer data flow control table includes: the number of the previous application and the number of the subsequent application of each current application; According to the application layer data flow execution control table, each application in the application layer data flow is controlled to be activated and executed according to the data dependency relationship.

4. The calculation method based on the multi-layer data flow fusion execution model according to claim 2 is characterized in that: The step of generating execution control flows at each level based on the multi-layer data flow fusion execution model and executing data flows at each level according to the control flows includes: Analyze the data flow execution control flow between each thread according to the thread-layer data flow execution sub-model, and construct a thread-layer data flow execution control table for each thread, wherein the thread-layer data flow control table includes: the predecessor application number and the successor thread number of each current thread; According to the thread layer data flow execution control table, each thread in the thread layer data flow is controlled to be activated and executed according to the data dependency relationship.

5. The calculation method based on the multi-layer data flow fusion execution model according to claim 2 is characterized in that: The step of generating execution control flows at each level based on the multi-layer data flow fusion execution model and executing data flows at each level according to the control flows includes: According to the function layer data flow execution sub-model, the data flow execution control flow between each function is analyzed, and a function layer data flow execution control table is constructed for each function, wherein the function layer data flow control table includes: the predecessor application number of each current function and the number of the successor function; According to the function layer data flow execution control table, each function in the function layer data flow is controlled to be activated and executed according to the data dependency relationship.

6. The calculation method based on the multi-layer data flow fusion execution model according to claim 2 is characterized in that: The step of generating execution control flows at each level based on the multi-layer data flow fusion execution model and executing data flows at each level according to the control flows includes: Analyze the data flow execution control flow between the various instructions according to the instruction layer data flow execution sub-model, and construct an instruction layer data flow execution control table for each instruction, wherein the instruction layer data flow control table includes: a preceding application number of each current instruction and a number of a subsequent instruction; According to the instruction layer data flow execution control table, each instruction in the instruction layer data flow is controlled to be activated and executed according to the data dependency relationship.

7. The calculation method based on the multi-layer data flow fusion execution model according to claims 3-6 is characterized in that: The step of generating execution control flows of each layer based on the multi-layer data flow fusion execution model, and executing data flows of each layer according to the control flows, further includes: Each layer executes the control table according to the data flow of each layer to initialize each application, thread, function and instruction; During execution, the activation start condition of each current application, thread, function and instruction is to receive the execution result of the previous task and start activating and executing each current application, thread, function and instruction; Each current application, thread, function, and instruction feeds back a signal to the predecessor task, notifying the predecessor task that the data sent by the predecessor task has been received; The current applications, threads, functions and instructions recorded in the successor task table of the preceding task are deleted.

8. A computing system based on a multi-layer data flow fusion execution model, characterized in that: Applied to the application layer, thread layer, function layer, instruction layer and underlying hardware layer in a multi-layer computer architecture, the system includes: Model construction module: receives a multi-layer data flow fusion processing execution request, analyzes the multi-layer data execution control flow, and constructs a multi-layer data flow fusion execution model based on the control flow. The multi-layer data flow fusion execution model integrates sub-models at multiple levels, wherein the sub-models include: data flow execution sub-models at the application layer, thread layer, function layer, and instruction layer; Fusion computing module: Based on the multi-layer data flow fusion execution model, it generates execution control flows of each layer respectively, and executes data flows of each layer according to the control flows to realize multi-layer data flow fusion computing.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the calculation method based on the multi-layer data stream fusion execution model described in any one of claims 1 to 7 are implemented.

10. An electronic device comprising at least one processor CPU, at least one memory, at least one communication bus, at least one input device, at least one output device, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the computing method based on the multi-layer data flow fusion execution model as described in any one of claims 1 to 7 are implemented, wherein the electronic device is a multi-core system or a distributed computing system including a heterogeneous SoC chip or composed of multiple chips.