Multi-channel data processing method, device, equipment and storage medium

By using context cache and two-level cache in a multi-channel hybrid hardware and software pipeline architecture, data isolation and parallel execution of hardware configuration and hardware calculations are achieved, which solves the problem of channel abnormality and improves processing efficiency and stability.

CN113965534BActive Publication Date: 2024-09-10ALIBABA GROUP HOLDING LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202010605433.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-29
Publication Date
2024-09-10
Estimated Expiration
2040-06-29

AI Technical Summary

Technical Problem

In a multi-channel hardware and software hybrid pipeline architecture, once data enters the pipeline, any channel anomaly will affect all channels, resulting in unstable processing and making it difficult to hide hardware configuration delays.

Method used

By recording the data to be processed and intermediate results in the context cache, and setting up a two-level cache in the hardware pipeline unit to achieve parallel execution of hardware configuration and hardware calculation, it ensures that data from different channels can be processed using different pipeline architectures to improve processing efficiency. and stability.

Benefits of technology

It realizes the improvement of data isolation and processing efficiency, avoids the mutual influence between channels, and ensures the stability and efficient processing of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113965534B
    Figure CN113965534B
Patent Text Reader

Abstract

The embodiment of the present application provides a method, device, equipment and storage medium for processing multi-channel data. The method includes: selecting a channel, obtaining the data to be processed from the context cache; the first-level software pipeline unit processes the data to be processed to obtain the corresponding processing result; writing the intermediate result back to the context cache; the next-level pipeline unit is a software pipeline unit, which obtains the intermediate result from the context cache and performs processing, and writes the corresponding processed intermediate result back to the context cache; the next-level pipeline unit is a hardware pipeline unit, which stores the hardware configuration information in the processing result in the first cache of the hardware pipeline unit, so as to migrate to the second cache of the hardware pipeline unit for processing in the next time slice, and writes the corresponding intermediate result obtained by the processing back to the context cache; until each level of pipeline units completes the pipeline level processing, obtains the corresponding processing result from the context cache, and outputs it to the corresponding channel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for processing multi-channel data, a method and device for pipeline processing of data, an electronic device and a storage medium. Background Art

[0002] With the rapid development of heterogeneous computing, pipeline computing has also been widely used in systems with mixed software and hardware processing. In such systems, some pipeline-level calculations originally processed by software are offloaded to proprietary hardware for acceleration, which greatly improves the performance of the system, but also brings challenges such as software and hardware synchronization.

[0003] In pure software pipeline systems, a large amount of parallel (multi-process / multi-thread) processing is usually used to support parallel processing of multiple pipelines, the so-called multi-channel. Multi-channel pipeline parallelism can, on the one hand, fill the pipeline pause that may be caused by insufficient input data of a single pipeline, and on the other hand, it can also allow multiple pipelines to share processing time slices in time-sharing, thereby reducing the delay of each processing channel. However, the multi-channel software and hardware hybrid pipeline architecture has higher requirements for channel scheduling, software and hardware synchronization, etc.

[0004] like Figure 1 A hardware architecture diagram supporting multi-channel pipelines is shown in FIG. In this architecture, including channels 0 to n, a channel scheduler (Channel Scheduling) and a channel multiplexer (ChannelMux) are set at the head of the pipeline to multiplex the data of each channel into the same set of pipeline processing logic. When the data passes through each pipeline stage, it is processed accordingly. At the end of the entire pipeline, there is a channel demultiplexer (Channel De-Mux) to demultiplex the output data to each channel. Under this architecture, the data to be processed is generally transmitted between pipelines. Among them, in order to hide the delay caused by the hardware configuration, buffers are set at the input and output of the hardware pipeline unit to cache the input data and the output results.

[0005] This architecture is simple and intuitive, and can eliminate the idle time of pipeline stages during pipeline establishment and termination to a certain extent. However, this architecture also has some problems. Once data enters the pipeline, it must go through all the processing. If the data in any channel is abnormal, it will affect all channels, making it impossible to process the data normally. Summary of the invention

[0006] The embodiment of the present application provides a method for processing multi-channel data, which improves the stability of multi-channel software and hardware hybrid pipeline processing.

[0007] Correspondingly, the embodiments of the present application also provide a multi-channel data processing device, a data pipeline processing method and device, an electronic device and a storage medium to ensure the implementation and application of the above method.

[0008] In order to solve the above problems, an embodiment of the present application discloses a method for processing multi-channel data, the method comprising: selecting a channel based on a channel scheduler, obtaining the data to be processed of the channel from the context cache; the first-level software pipeline unit processes the data to be processed to obtain a corresponding processing result, the processing result including an intermediate result; writing the intermediate result back to the context cache; if the next-level pipeline unit is a software pipeline unit, obtaining the intermediate result from the context cache and performing processing, and writing the corresponding processed intermediate result back to the context cache; if the next-level pipeline unit is a hardware pipeline unit, storing the hardware configuration information in the processing result in the first cache of the hardware pipeline unit, so as to migrate to the second cache of the hardware pipeline unit for processing in the next time slice, and writing the corresponding intermediate result obtained by the processing back to the context cache; until each level of pipeline units completes the pipeline level processing, obtains the corresponding processing result from the context cache, and outputs it to the corresponding channel.

[0009] An embodiment of the present application also discloses a pipeline-level processing method for data, the method comprising: a current-level software pipeline unit processes data to obtain a corresponding processing result, wherein the processing result includes an intermediate result; the intermediate result is written back to the context cache; if the next-level pipeline unit is a software pipeline unit, the intermediate result is obtained from the context cache and processed, and the corresponding processed intermediate result is written back to the context cache; if the next-level pipeline unit is a hardware pipeline unit, the hardware configuration information in the processing result is stored in the first cache of the hardware pipeline unit, so as to be migrated to the second cache of the hardware pipeline unit for processing in the next time slice, and the intermediate result obtained by the corresponding processing is written back to the context cache; until each level of pipeline units completes the pipeline-level processing, the corresponding processing result is written back to the context cache.

[0010] An embodiment of the present application also discloses a pipeline-level processing method for data, the method comprising: selecting a channel based on a channel scheduler, and obtaining data of the channel from the context cache; during the pipeline-level processing, software pipeline units at each level obtain data from the context cache and perform processing, and write back the corresponding processed data to the context cache; hardware pipeline units at each level migrate hardware configuration information of a first cache to a second cache for processing, and write back the corresponding processed data to the context cache, the hardware configuration information of the first cache being written by the software pipeline unit at the previous level; until pipeline units at each level complete pipeline-level processing, obtain corresponding processing results from the context cache, and output them to corresponding channels.

[0011] The embodiment of the present application also discloses a multi-channel data processing device, including: a channel selector, used to select a channel and obtain the data to be processed of the channel from the context cache; a pipeline processing module, used for the first-level software pipeline unit to process the data to be processed to obtain a corresponding processing result, and the processing result includes an intermediate result; the intermediate result is written back to the context cache; if the next-level pipeline unit is a software pipeline unit, the intermediate result is obtained from the context cache and processed, and the corresponding processed intermediate result is written back to the context cache; if the next-level pipeline unit is a hardware pipeline unit, the hardware configuration information in the processing result is stored in the first cache of the hardware pipeline unit, so as to migrate to the second cache of the hardware pipeline unit for processing in the next time slice, and the intermediate result obtained by the corresponding processing is written back to the context cache; until each level of pipeline units completes the pipeline level processing; a channel demultiplexer, used to obtain the corresponding processing result from the context cache and output it to the corresponding channel.

[0012] The embodiment of the present application also discloses a data pipeline processing device, which includes: a processing module, which is used for the current-level software pipeline unit to process data to obtain corresponding processing results, and the processing results include intermediate results; and when the next-level pipeline unit is a software pipeline unit, the intermediate results are obtained from the context cache and processed; a write-back module, which is used to write the intermediate results obtained by processing back to the context cache; and when the pipeline units at each level complete the pipeline processing, the corresponding processing results are written back to the context cache; a hardware configuration module, which is used to store the hardware configuration information in the processing results in the first cache of the hardware pipeline unit when the next-level pipeline unit is a hardware pipeline unit, so as to migrate to the second cache of the hardware pipeline unit for processing in the next time slice, and write the corresponding intermediate results obtained by processing back to the context cache.

[0013] An embodiment of the present application further discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes one or more methods described in the embodiments of the present application.

[0014] The embodiments of the present application also disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes one or more methods described in the embodiments of the present application.

[0015] Compared with the prior art, the embodiments of the present application have the following advantages:

[0016] In an embodiment of the present application, after selecting a channel based on the channel scheduler, the data to be processed of the channel can be obtained from the context cache and then input into the software pipeline unit for processing. The intermediate result obtained can be written back to the context cache. If the next-level pipeline unit is a software pipeline unit, the intermediate result is obtained from the context cache and processed, and the corresponding intermediate result is written back to the context cache. If the next-level pipeline unit is a hardware pipeline unit, the hardware configuration information in the processing result is stored in the first cache of the hardware pipeline unit so that it can be migrated to the second cache of the hardware pipeline unit for processing in the next time slice, and the intermediate result obtained by the corresponding processing is written back to the context cache, so that the first cache and the second cache can realize the parallel execution of hardware configuration and hardware calculation processing, thereby improving processing efficiency. The processing process of each level of pipeline units is similar to the above, until each level of pipeline units completes the pipeline level processing, obtains the corresponding processing result from the context cache, and outputs it to the corresponding channel. In this process, data isolation is realized through the context cache, thereby improving processing efficiency and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a hardware architecture diagram supporting multi-channel pipelines in the background technology;

[0018] Figure 2 This is a hardware architecture diagram supporting a multi-channel pipeline according to an embodiment of the present application;

[0019] Figure 3 It is a flowchart of a multi-channel data processing method embodiment of the present application;

[0020] Figure 4 is a flowchart of another embodiment of a multi-channel data processing method of the present application;

[0021] Figure 5 It is a timing diagram of a multi-channel pipeline processing according to an embodiment of the present application;

[0022] Figure 6 It is a flowchart of the steps of an embodiment of a pipeline processing method of data of the present application;

[0023] Figure 7 It is a flowchart of another embodiment of a pipeline processing method for data of the present application;

[0024] Figure 8 It is a structural block diagram of an embodiment of a multi-channel data processing device of the present application;

[0025] Fig. 9 It is a structural block diagram of an embodiment of a pipeline processing device for data of the present application;

[0026] Fig.10 It is a schematic diagram of the structure of a device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0028] The embodiments of the present application can be applied to a multi-channel hardware and software hybrid pipeline scenario. Figure 2 As shown:

[0029] The multi-channel data processing system includes: multi-channel input / output, channel multiplexer, channel scheduler, context cache, software pipeline unit, hardware pipeline unit, channel demultiplexer. Among them, the input / output channel may include channel 0 (CH 0)-channel x (CH n), x>1; the software pipeline unit includes software pipeline unit 1-software pipeline unit i, i>1; the hardware pipeline unit includes hardware pipeline unit 1-hardware pipeline unit j, j>1; the channel multiplexer is used to multiplex the data of each channel into the same set of pipeline architecture; the channel scheduler is used to schedule the channel processed in the pipeline architecture and the data of the channel; the channel demultiplexer is used to demultiplex the output data to each channel, and the corresponding multi-channel output.

[0030] The context cache is used to record the data to be processed and in the process in the pipeline architecture. The data can be created before entering the pipeline and released after the pipeline processing is completed. The multi-channel software and hardware hybrid pipeline architecture can include a software pipeline processing stage and a hardware pipeline processing stage, wherein in the software pipeline processing stage, each software pipeline unit executes the corresponding software processing logic, and in the hardware pipeline processing stage, the hardware pipeline unit executes the corresponding processing, and after the hardware processing, it is also processed by the software pipeline unit and transmitted to the channel demultiplexer. In an embodiment of the present application, the software pipeline unit includes multiple software pipeline units, and based on the logical information corresponding to the corresponding channel data processing, the software and hardware pipeline processing processes corresponding to the data of different channels may be different, which can be specifically determined according to the processing requirements of the channel.

[0031] Among them, the pipeline architecture is regarded as processing and transmission of one pipeline at a time, and the corresponding software pipeline unit can also be called the software pipeline stage (Software Pipeline Stage), and the hardware pipeline unit can also be called the hardware pipeline stage (Hardware Pipeline Stage). Correspondingly, for data from different channels, the pipelines they pass through may be different. For example, the data of some channels will continue to be processed by the hardware pipeline unit after each processing by the software pipeline unit; while the data of some channels does not need to be processed by the hardware pipeline unit in some processes, so after a software pipeline unit completes processing, it will continue to be processed by the next software pipeline unit, etc.

[0032] Combined with the embodiments of this application Figure 2 Example, and background technology Figure 1 Compared with the example, a context cache is added in the embodiment of the present application to maintain the data context, which can record context information such as the data to be processed and the data in the process in the pipeline architecture, wherein the context information of the data to be processed is created and stored before the data to be processed enters the pipeline processing, and the context information may include information such as the channel to which the data to be processed belongs, and may also include time and other information, which can be determined specifically according to needs. In the data processing process, the intermediate data after the processing of the data to be processed and its context information can also be stored, such as the software processing results and its context information obtained in the software processing stage, as well as the data processing results and its context information before the output pipeline. Due to the existence of the context cache, data from different channels can also be processed using different pipeline architectures, that is, the pipeline units through which data from different channels pass may be different. Figure 1 In the example pipeline architecture, each software pipeline unit and hardware pipeline unit needs to go through, which is inflexible and may waste some resources.

[0033] Furthermore, in the hardware design of the embodiment of the present application, in order to hide the delay of the hardware configuration and realize accurate channel switching, a two-level cache is set on the hardware pipeline unit (i.e., the hardware pipeline level), the first cache is used for the configuration of data calculation for the next time slice, and the second cache is used for the calculation of the current data, wherein the cache can be a register. Therefore, in the current time slice (also referred to as the current moment), the hardware pipeline processing stage will use the data in the hardware configuration information in the second cache for calculation, and the hardware configuration information of the next time slice is stored in the first cache. When the current moment ends and the next moment arrives, the hardware configuration information of the first cache will be migrated to the second cache, so as to continue to perform the corresponding processing. In the embodiment of the present application, the hardware pipeline unit is shared by multiple channels, so the data stored in the two-level cache may come from different channels. Different from Figure 1 Input and output caches, in the embodiment of the present application, the hardware pipeline unit is implemented through two-level caches, the first cache stores the hardware configuration information of the next time slice, and the second cache stores the hardware configuration information of the current time slice, so that when the software pipeline unit processes data in the current time slice, the hardware pipeline unit can also process the hardware configuration information in the second cache in parallel, and the results of data processing are directly stored in the context cache.

[0034] Based on the above multi-channel hardware and software hybrid pipeline architecture, a multi-channel data processing method is provided, such as Figure 3 shown.

[0035] Step 302: Select a channel based on the channel scheduler, and obtain the to-be-processed data of the channel from the context cache.

[0036] The data to be processed input by each channel can be stored in the context cache first. After the channel scheduler determines to select a channel, it can scan the context cache to obtain the data to be processed, and then multiplex the data of each channel through the channel multiplexer, so as to transmit the data to be processed of the channel selected by the multiplexer to the pipeline of the pipeline architecture for pipeline-level processing. The pipeline-level processing will first be processed by the software pipeline unit.

[0037] In an optional embodiment of the present application, the context cache includes: a context storage unit, and the context storage unit corresponds to a channel. A context storage unit can be set for each channel, so that if there are x channels, the context cache includes: x context storage units. Therefore, the data of different channels can be stored in the context storage unit of the channel, and the isolation of data for different channels can also be achieved. Determine the channel selected by the channel scheduler, scan the context storage unit corresponding to the channel, and obtain the data to be processed. After the channel scheduler determines the selected channel, it can scan the context storage unit corresponding to the channel, and then obtain the data to be processed of the channel from the context storage unit. The data to be processed of the channel is then sent to the first software pipeline unit to execute the processing of the pipeline stage.

[0038] In an embodiment of the present application, the processing order of the corresponding pipeline unit can also be pre-configured, and the corresponding pipeline processing file can be generated and added to the context storage unit corresponding to the channel, so that the pipeline processing order for the corresponding data of the channel can be set based on demand to meet the needs of various scenarios.

[0039] In an optional embodiment, the processing order of the pipeline units corresponding to the channel is configured, and a pipeline processing file is generated; the pipeline processing file is added to the context cache. For each channel, the processing order of the pipeline units corresponding to the channel can be configured based on various information such as the level and attributes corresponding to the channel. The processing order may include the processing order of alternating processing of software pipeline units and hardware pipeline units, for example, the first-level pipeline unit is a software pipeline unit, followed by a hardware pipeline unit, and then processed by two software pipeline units, and then processed by a hardware pipeline unit, etc. The execution order of the data corresponding to the channel in the pipeline unit, and the obtained pipeline processing file can be added to the context cache, such as the context storage unit corresponding to the channel, so that the processing order can be determined while obtaining data from the context storage unit corresponding to the channel, thereby determining the current pipeline unit, the next-level pipeline unit, and the subsequent pipeline unit, etc. Among them, the processing order of the pipeline units can be determined based on multiple parameters such as the channel level, attributes, data level, etc. For example, if the channel and data level are higher (or higher priority), more hardware pipeline units can be configured to increase the processing speed, while if the level is relatively low, more software pipeline units can be configured to reduce hardware consumption. It can also be determined based on other attributes, specifically according to needs and application scenarios.

[0040] In another optional embodiment, a configuration page is provided; a selection instruction is received according to the configuration page, a processing order of the pipeline unit is selected according to the selection instruction, and a pipeline processing file is generated; and the pipeline processing file is added to the context cache. In order to configure the software and hardware pipeline processing of multiple channels more flexibly, the embodiment of the present application also provides a configuration page, which is used to configure the software and hardware pipeline of multiple channels, including setting the context storage unit corresponding to the channel, the processing order of the pipeline unit corresponding to the channel, and the cleaning and recovery of the pipeline unit. For the processing order of the pipeline unit, each pipeline unit can be displayed for the user to choose, so that the user can select the order of the pipeline unit and generate a selection instruction. Based on the selection instruction, the processing order of the pipeline unit can be determined, for example, the first-level pipeline unit is a software pipeline unit, followed by a hardware pipeline unit, and then processed by three software pipeline units, and then processed by a hardware pipeline unit, etc., and each level of software pipeline unit is set to be followed by a hardware pipeline unit, that is, the processing order of software and hardware alternating processing, so as to obtain the execution order of the data corresponding to the channel in the pipeline unit, and the obtained pipeline processing file can be added to the context cache. For the configuration of other projects, the configuration page can also provide corresponding controls to facilitate users to adjust according to needs and application scenarios to achieve greater flexibility.

[0041] In the embodiment of the present application, the execution ratio of the software and hardware pipeline units can also be set, and the execution order of the software and hardware pipeline units can be adjusted according to the default or setting or automatically under the execution ratio. Therefore, in an optional embodiment, the execution ratio of the software pipeline unit and the hardware pipeline unit corresponding to the channel is set; the execution ratio is added to the context cache. The execution ratio of the software pipeline unit and the hardware pipeline unit corresponding to the channel can be set based on the application scenario, demand, and the state corresponding to the device. For example, if the current setting load is increased, the execution ratio can be adjusted to the processing of the software pipeline unit more than the processing of the hardware pipeline unit. For example, if the level of the current channel is high, the execution ratio of the software pipeline unit: the hardware pipeline unit can be set to be no more than 1:1, etc., and then the execution ratio can be added to the context cache, such as added to the context storage unit corresponding to the channel. Among them, the configuration page can also provide a configuration for the execution ratio, and the execution ratio can be combined with the processing order of the pipeline unit. For example, when configuring the processing order of the pipeline unit, the execution ratio is used for verification to determine whether the processing order of the selected pipeline unit meets the requirements of the execution ratio.

[0042] Step 304: The first-level software pipeline unit processes the data to be processed to obtain corresponding processing results, which include intermediate results.

[0043] Step 306: write the intermediate result back to the context cache.

[0044] In the pipeline processing stage, the data to be processed is first transmitted to the first-level software pipeline unit of the pipeline architecture for processing. The processing may be performed by calling the corresponding software processing logic, executing the required processing operations, and obtaining the corresponding processing results after the processing is completed. The processing results include intermediate results, which are intermediate values ​​in the pipeline processing stage. The intermediate results can be written into the context cache.

[0045] Wherein, when each channel in the context cache corresponds to a context storage unit, the intermediate result can be written back to the context storage unit corresponding to the channel.

[0046] Step 308, determine the next level of pipeline unit.

[0047] Then, the next level of pipeline processing can be performed, wherein the next level of pipeline processing can be software pipeline processing or hardware pipeline processing. If the next level of pipeline unit is a software pipeline unit, step 310 is performed; if the next level of pipeline unit is a hardware pipeline unit, step 312 is performed.

[0048] like Figure 2 In the architecture, after the software pipeline unit 1 obtains the data to be processed and processes it, the intermediate result can be written back to the context cache. If the next-level pipeline unit is the software pipeline unit 2, step 310 is executed; if the next-level pipeline unit is the hardware pipeline unit, step 312 is executed.

[0049] Step 310: Obtain the intermediate result from the context cache and perform processing, and write the corresponding processed intermediate result back to the context cache.

[0050] If the next-level pipeline unit is a software pipeline unit, the software pipeline unit can obtain the intermediate result from the context cache and perform corresponding processing to obtain the corresponding processing result, and write the intermediate result of the processing result back to the context cache.

[0051] The intermediate result may also record the corresponding channel information, time and other context information. In the case where each channel in the context cache corresponds to a context storage unit, the intermediate result may be written back to the context storage unit corresponding to the channel to record the corresponding data, time and other context information.

[0052] In an embodiment of the present application, when the channel scheduler schedules to a certain channel, the software pipeline unit executes the software pipeline level processing logic, reads the data and context information stored in the context storage unit, and resumes the pipeline processing. After the processing is completed, the software processing result is written back to the corresponding context storage unit, and the pipeline status is updated, such as continuing to process the data of the next time slice.

[0053] like Figure 2 In the architecture, the next-level pipeline unit of the software pipeline unit 1 is the software pipeline unit 2, or the next-level pipeline unit after the hardware pipeline unit is processed is the software pipeline unit 2. The software pipeline unit 2 obtains data from the context cache, such as the intermediate result obtained by the previous level processing, processes the data, and caches the processed results in the context cache unit, which is similar to the processing process of the above-mentioned software pipeline unit 1.

[0054] Step 312, storing the hardware configuration information in the processing result into the first cache of the hardware pipeline unit, so as to migrate it to the second cache of the hardware pipeline unit for processing in the next time slice, and writing the intermediate result obtained by the corresponding processing back to the context cache.

[0055] If the next-level pipeline unit is a hardware pipeline unit, the processing result of the previous-level software pipeline unit includes hardware configuration information, which is used for configuration and calculation of the hardware pipeline stage, and may include data calculated by the hardware, as well as necessary hardware control information. The previous-level software pipeline unit stores the hardware configuration information in the first cache of the hardware pipeline unit. Due to the delay of the hardware configuration, the hardware pipeline level processing will be one time slice later than the software pipeline level processing, that is, after the software processing result is transmitted to the hardware, it will be processed in the next time slice, so it is stored in the first cache.

[0056] In the current time slice, if the hardware pipeline unit is executing processing, it is based on the hardware configuration information in the second cache of the hardware pipeline unit, and the hardware configuration information in the first cache is the information required for the next time slice. Therefore, when the current time slice ends and the next time slice arrives, in order to make the context of the hardware calculation data correspond to the hardware configuration one by one, the hardware configuration information in the first cache can be migrated to the second cache, so as to perform hardware configuration and calculation processing, and the intermediate results obtained by processing can be written back to the context cache. It can realize the parallel execution of hardware configuration and hardware calculation processing.

[0057] The hardware pipeline unit includes an output cache, and the intermediate results can be cached in the output cache first, and then the intermediate results in the output cache are written back to the context cache for processing by the next level of pipeline.

[0058] In an optional embodiment, if the hardware configuration is detected when the pipeline processing starts, that is, when the time slice starts, the hardware pipeline unit detects that there is hardware configuration information in the cache, it can process based on the hardware configuration information to obtain an intermediate result. If the hardware configuration information is in the second cache, the processing can be performed directly; if the hardware configuration information is in the first cache, it can be migrated to the second cache for post-processing.

[0059] like Figure 2 In the architecture, the next-level pipeline unit of the software pipeline unit 1 is a hardware pipeline unit, or the next-level pipeline unit of any software pipeline unit is a hardware pipeline unit, then the software pipeline unit can write the processed hardware configuration information into the first cache of the hardware pipeline unit, so that in the next time slice, the hardware configuration information can be migrated to the second cache to perform hardware configuration and calculation and other processing.

[0060] The pipeline processing process can be executed according to the above process, and the intermediate results processed by the previous pipeline unit are written back to the context cache, such as the context storage unit corresponding to the channel, so that the next pipeline unit can obtain data and perform processing. If the next pipeline unit is a hardware pipeline unit, the corresponding hardware configuration information is written into the first cache of the hardware pipeline unit, so that in the next time slice, the hardware configuration information is migrated to the second cache to perform hardware configuration and calculation and other processing.

[0061] In an embodiment of the present application, data isolation is achieved through a context cache, which can store the data to be processed and the processing results of the processing stage, context information, etc. Therefore, when an abnormality occurs in a certain channel, channel switching can be performed, and the data in the context cache pointed to by the pointer can be adjusted accordingly, so as not to affect the processing of other channels. The data of the abnormal channel can be cleared.

[0062] In an optional embodiment, when an abnormality is detected in a target channel, the pipeline units at all levels corresponding to the target channel are cleared, and the pipeline units include software pipeline units and / or hardware pipeline units. When each channel corresponds to a context storage unit, when an abnormality is detected in the target channel, the pipeline units at all levels in the pipeline processing can be cleared, the processing of the channel data can be stopped, and the channel can be switched through the channel scheduler to switch to the processing of data of other channels, which will not affect the processing of other channels.

[0063] Step 314, determine whether the processing of each level of pipeline units is completed; if so, execute step 316; if not, return to step 308.

[0064] Step 316, obtaining the corresponding processing result from the context cache, and outputting it to the corresponding channel.

[0065] The pipeline processing process can be executed according to the above process, and the intermediate results processed by the previous level pipeline unit are written back to the context cache, such as written back to the context storage unit corresponding to the channel, until the pipeline units at each level complete the pipeline level processing and store the corresponding processing results in the context cache, such as the context storage unit corresponding to the channel.

[0066] In an optional embodiment, obtaining the corresponding processing result from the context cache and outputting it to the corresponding channel includes: a demultiplexer obtaining the corresponding processing result from the context storage unit corresponding to the channel, and outputting it to the corresponding channel after processing; and clearing the processing result in the context storage unit corresponding to the channel.

[0067] After the pipeline processing is completed, the demultiplexer can demultiplex the processing results and then input them into the corresponding channels to complete the pipeline processing of the data. Afterwards, the data processing results in the context cache can be cleared, such as clearing the context information corresponding to the data in the context storage unit corresponding to the channel.

[0068] In the embodiment of the present application, the pipeline processing order of the pipeline unit is related to the channel. In the pipeline processing process, the software and hardware pipeline units required to be used, as well as the pipeline processing order of each pipeline unit are related to the corresponding channel, and the order of pipeline units corresponding to different channels is different. For example, in the pipeline processing of a certain channel data, each level of software pipeline unit is followed by a hardware pipeline unit, while in the pipeline processing of another channel data, after several software pipeline units are processed, a level of hardware pipeline unit processing is required, which can be determined according to the specific needs.

[0069] by Figure 2 For example, assuming that the channel scheduler selects the data of channel 0, its pipeline processing is as follows: the data of channel 0 is input to the software pipeline unit 1 through the multiplexer for processing, and the intermediate result is cached in the context storage unit of channel 0; the next level of pipeline unit is hardware pipeline unit 1, and software pipeline unit 1 writes the hardware configuration information to the first cache of hardware pipeline unit 1; in the next time slice, hardware pipeline unit 1 migrates the hardware configuration information of the first cache to the second cache, and performs corresponding processing, and the intermediate result obtained by processing is written back to the context storage unit of channel 0; the next level of pipeline unit is Software pipeline unit 2, software pipeline unit 2 obtains data from the context storage unit of channel 0 and processes it, and the intermediate result is cached in the context storage unit of channel 0; the next level pipeline unit is a hardware pipeline unit, and the processing process is similar to the above process, then the software pipeline units and hardware pipeline units at each level are processed as above, until the software pipeline unit i (the last level pipeline unit) is processed, and the processing result is cached in the context storage unit of channel 0; then the demultiplexer obtains the processing result of the data from the context storage unit of channel 0, and after demultiplexing, it is input into channel 0.

[0070] Assume that the channel scheduler switches to channel 1, and its pipeline processing is as follows: the data of channel 0 is input to the software pipeline unit 1 for processing through the multiplexer, and the intermediate result is cached in the context storage unit of channel 0; the next-level pipeline unit is a software pipeline unit, which obtains data from the context storage unit of channel 1 and processes it, and the intermediate result is cached in the context storage unit of channel 1; the next-level pipeline unit is a hardware pipeline unit, and the software pipeline unit writes the hardware configuration information into the first cache of the hardware pipeline unit; in the next time slice, the hardware pipeline unit migrates the hardware configuration information of the first cache to the second cache, and performs corresponding processing to obtain the intermediate result. The result is written back to the context storage unit of channel 1; the next level of pipeline unit is a software pipeline unit, which obtains data from the context storage unit of channel 1 and processes it, and the intermediate result is cached in the context storage unit of channel 1; then the processing of the next level of pipeline unit is executed, and the processing process is similar to the above process. The processing of software pipeline units and hardware pipeline units at all levels is as above until the software pipeline unit i (the last level of pipeline unit) is processed, and the processing result is cached in the context storage unit of channel 1; then the demultiplexer obtains the processing result of the data from the context storage unit of channel 1, and after demultiplexing, it is input into channel 1.

[0071] Therefore, in the process of processing based on the pipeline architecture, the channel scheduler can switch channels. When the channel scheduler switches channels, the data to be processed is obtained from the context storage unit corresponding to the switched channel. Therefore, data and context information such as intermediate results are cached based on the context storage unit of the channel to achieve isolation of data from different channels. Channels can be switched conveniently, and the pipeline processing of data from different channels can be adjusted based on demand without having to pass through each level of pipeline units in the architecture. The processing order of pipeline units can be adjusted, thereby improving processing efficiency.

[0072] In summary, after selecting a channel based on the channel scheduler, the data to be processed of the channel can be obtained from the context cache, and then input into the software pipeline unit for processing, and the intermediate result obtained can be written back to the context cache. If the next-level pipeline unit is a software pipeline unit, the intermediate result is obtained from the context cache and processed, and the corresponding intermediate result is written back to the context cache. If the next-level pipeline unit is a hardware pipeline unit, the hardware configuration information in the processing result is stored in the first cache of the hardware pipeline unit, so that it can be migrated to the second cache of the hardware pipeline unit for processing in the next time slice, and the intermediate result obtained by the corresponding processing is written back to the context cache, so that the first cache and the second cache can realize the parallel execution of hardware configuration and hardware calculation processing, thereby improving processing efficiency. The processing process of each level of pipeline units is similar to the above, until each level of pipeline units completes the pipeline level processing, obtains the corresponding processing result from the context cache, and outputs it to the corresponding channel. In this process, data isolation is realized through the context cache, thereby improving processing efficiency and stability.

[0073] On the basis of the above embodiments, the embodiments of the present application also provide a method for processing multi-channel data, configuring a context storage unit for each channel, so as to achieve strong isolation between channels, and the channels will not affect each other. The context storage unit can record the result of the pipeline processing of the data at the end of the scheduling time slice of the channel. The data and its context information are created before the data enters the pipeline and are released after the pipeline processing is completed.

[0074] Reference Figure 4 , showing a step flow chart of another embodiment of a multi-channel data processing method of the present application.

[0075] Step 402: The channel scheduler selects a channel, and the channel multiplexer obtains the data to be processed from the context storage unit corresponding to the channel.

[0076] The channel selected by the channel scheduler is determined, and the channel multiplexer can scan the context storage unit corresponding to the channel to obtain the data to be processed. The data stored in the context storage unit can be obtained through a pointer.

[0077] The processing order of the pipeline units corresponding to the channels can be preconfigured, and a pipeline processing file can be generated; and the pipeline processing file can be added to the context cache.

[0078] Providing a configuration page; receiving a selection instruction according to the configuration page, selecting a processing order of pipeline units according to the selection instruction, and generating a pipeline processing file; adding the pipeline processing file to the context cache.

[0079] The execution ratio of the software pipeline unit and the hardware pipeline unit corresponding to the channel may also be set; and the execution ratio is added to the context cache.

[0080] Step 404: Send the data to be processed to the first-level software pipeline unit to process the data to be processed and obtain corresponding processing results.

[0081] The processing result includes an intermediate result. If the next-level pipeline unit is a hardware pipeline unit, the processing result also includes hardware configuration information.

[0082] Step 406: write the intermediate result back to the context storage unit corresponding to the channel.

[0083] Step 408, determine the next level of pipeline unit; if it is a software pipeline unit, execute step 410; if it is a hardware pipeline unit, execute step 412.

[0084] Step 410: Obtain the intermediate result from the context cache and perform processing, and write the corresponding processed intermediate result back to the context storage unit corresponding to the channel.

[0085] Step 412, storing the hardware configuration information in the processing result into the first cache of the hardware pipeline unit, so as to migrate it to the second cache of the hardware pipeline unit for processing in the next time slice, and writing the intermediate result obtained by the corresponding processing back to the context storage unit corresponding to the channel.

[0086] Step 414, determine whether the processing of each level of pipeline units is completed; if so, execute step 416; if not, return to step 408.

[0087] In order to make the hardware processing correspond to the hardware configuration, a shift operation needs to be performed on the cache at the end of the time slice so that the result of the hardware processing can be correctly saved to the context storage unit corresponding to the channel in the next time slice.

[0088] Step 416: The demultiplexer obtains the corresponding processing result from the context storage unit corresponding to the channel, and outputs it to the corresponding channel after processing.

[0089] Step 418: clear the processing result in the context storage unit corresponding to the channel.

[0090] Step 420: when an abnormality is detected in the target channel, clear the pipeline units at all levels corresponding to the target channel. Then, step 402 may be executed, and the channel scheduler switches the channel.

[0091] Based on the above embodiments, combined with the channel switching software and hardware processing, such as Figure 5The timing processing diagram shown is:

[0092] The tasks of the pipeline architecture are divided into four levels, AD, among which A and C are completed in software, and B and D are completed in hardware. In each execution time slice, both software and hardware need to complete the current data processing of the responsible pipeline level and cache the corresponding processing results for the next level of pipeline processing or other subsequent processing.

[0093] like Figure 5 , taking the first time slice (Slot 1) as an example, the scheduler selects channel 0, then software pipeline stage A processes the pending data 0 of channel 0, while other pipeline stages B, C, and D are all idle at this time. After software pipeline stage A completes the processing and determines that hardware processing is required, the processing result can be stored in the context storage unit of channel 0 and sent to the first cache of hardware pipeline stage B for hardware configuration.

[0094] In the second time slice (Slot 2), the hardware pipeline stage B migrates the data of the first cache to the second cache, thereby processing the data of the second cache, that is, performing hardware processing on the software processing result corresponding to the data to be processed 0 of channel 0, obtaining the corresponding data processing result, and storing the data processing result in the output cache; obtaining the data processing result from the output cache and storing it in the context storage unit corresponding to the channel. And, in the second time slice, the pipeline stage A processes the data to be processed 1 of channel 0, and so on. Among them, at the moment of channel switching, this level of pipeline and each subsequent level of pipeline work on the same channel (Channel) in the next time slice.

[0095] like Figure 5 In the fourth time slice (Slot 4), the scheduler chooses to switch to channel 1. The channel corresponding to the software pipeline stage has been switched to channel 1 in this time slice, but due to the delay of the hardware configuration, the hardware pipeline stage still stays in channel 0 and switches to channel 1 in the next time slice. Pipeline stages C and D complete the channel switching by delaying one time slice in turn. Similarly, channel switching also occurs in Slot 7 and Slot 10, and the channel switching corresponding to the hardware pipeline stage is always performed one time slice later than the channel switching of the software pipeline stage.

[0096] On the basis of the above-mentioned embodiments, the embodiments of the present application further provide a pipeline-level processing method for data. During the pipeline architecture processing, the processing results of each level of pipeline units can be stored in the upper context cache.

[0097] Reference Figure 6 , showing a step flow chart of an embodiment of a pipeline processing method for data of the present application.

[0098] Step 602: The current-level software pipeline unit processes the data to obtain corresponding processing results, which include intermediate results.

[0099] After the channel scheduler selects a channel, the channel multiplexer can scan the context storage unit corresponding to the channel, obtain the data to be processed, and perform pipeline processing. When the processing of any level of software pipeline unit is executed, the software pipeline unit of this level obtains data from the context storage unit corresponding to the channel for processing.

[0100] Step 604: write the intermediate result back to the context cache.

[0101] The intermediate result is written back to the context storage unit corresponding to the channel.

[0102] Step 606, determine the next level of pipeline unit; if it is a software pipeline unit, execute step 608; if it is a hardware pipeline unit, execute step 610.

[0103] Step 608: Obtain the intermediate result from the context cache and perform processing, and write the corresponding processed intermediate result back to the context cache.

[0104] Similar to the above process, the software pipeline unit at this level obtains data from the context storage unit corresponding to the channel for processing, and writes the intermediate results back to the context storage unit corresponding to the channel.

[0105] Step 610, storing the hardware configuration information in the processing result into the first cache of the hardware pipeline unit, so as to migrate it to the second cache of the hardware pipeline unit for processing in the next time slice, and writing the intermediate result obtained by the corresponding processing back to the context cache.

[0106] The intermediate result is written back to the context storage unit corresponding to the channel.

[0107] Step 612, determine whether the processing of each level of pipeline units is completed; if so, execute step 416; if not, end the process.

[0108] Until each level of pipeline units completes pipeline processing, the corresponding processing results are written back to the context cache, that is, the context storage unit corresponding to the channel. After that, the demultiplexer can obtain the processing results and input them into the corresponding channel after demultiplexing.

[0109] Therefore, in pipeline-level architecture processing, the corresponding software and hardware pipeline units can be selected based on the processing requirements and processing order of the pipeline level to perform pipeline processing, making the processing more flexible.

[0110] Based on the above embodiments, the embodiments of the present application also provide a pipeline-level processing method for data. During the pipeline architecture processing, the software and hardware pipeline units can cache data based on context cache, first cache, second cache, etc., to achieve data isolation and corresponding pipeline-level processing.

[0111] Reference Figure 7 , showing a step flow chart of an embodiment of a pipeline processing method for data of the present application.

[0112] Step 702: Select a channel based on the channel scheduler, and obtain data of the channel from the context cache.

[0113] The processing order of the pipeline units corresponding to the channels can be preconfigured, and a pipeline processing file can be generated; and the pipeline processing file can be added to the context cache.

[0114] Providing a configuration page; receiving a selection instruction according to the configuration page, selecting a processing order of pipeline units according to the selection instruction, and generating a pipeline processing file; adding the pipeline processing file to the context cache.

[0115] The execution ratio of the software pipeline unit and the hardware pipeline unit corresponding to the channel may also be set; and the execution ratio is added to the context cache.

[0116] Step 704 , during the pipeline processing, each software pipeline unit at each level obtains data from the context cache and performs processing, and writes the corresponding processed data back to the context cache.

[0117] Step 706, each level of hardware pipeline unit migrates the hardware configuration information of the first cache to the second cache for processing, and writes back the corresponding processed data to the context cache, where the hardware configuration information of the first cache is written by the previous level of software pipeline unit.

[0118] Step 708, until each level of pipeline units completes pipeline processing, the corresponding processing results are obtained from the context cache and output to the corresponding channels.

[0119] Thus, for the software pipeline unit of pipeline level processing, data is obtained from the context cache and processing is performed, and the corresponding processed data is written back to the context cache; for the hardware pipeline unit, the hardware configuration information of the first cache is migrated to the second cache for processing, and the corresponding processed data is written back to the context cache; for the data of each channel, it can be obtained from the context storage unit corresponding to the channel, and written back to the context storage unit corresponding to the channel.

[0120] Thus, through the two-level cache of the hardware part, the parallelism of hardware configuration and hardware processing can be achieved. In addition, based on the context storage unit, strong isolation between channels can be achieved. If an abnormality occurs in a channel, other channels can overwrite the data of the current abnormal pipeline through independently stored data and continue to execute. The system can also conveniently perform corresponding error processing on the abnormal channel, such as clearing the entire abnormal pipeline. The above embodiment also supports operations such as pausing / resuming the pipeline processing of a channel.

[0121] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0122] On the basis of the above embodiments, this embodiment further provides a data processing device, which is applied to electronic devices such as terminal devices and servers.

[0123] Reference Figure 8 , shows a structural block diagram of a data processing device embodiment of the present application, which may specifically include the following modules:

[0124] The channel selector 802 is used to select a channel and obtain the to-be-processed data of the channel from the context buffer.

[0125] The channel multiplexer 804 is used to multiplex the data of multiple channels, and send the data to be processed of the channels to the pipeline processing module to perform pipeline processing.

[0126] The pipeline processing module 806 is used for the first-level software pipeline unit to process the data to be processed and obtain the corresponding processing results, which include intermediate results; the intermediate results are written back to the context cache; if the next-level pipeline unit is a software pipeline unit, the intermediate results are obtained from the context cache and processed, and the corresponding intermediate results are written back to the context cache; if the next-level pipeline unit is a hardware pipeline unit, the hardware configuration information in the processing result is stored in the first cache of the hardware pipeline unit, so as to migrate to the second cache of the hardware pipeline unit for processing in the next time slice, and the intermediate results obtained by the corresponding processing are written back to the context cache; until the pipeline units at all levels complete the pipeline level processing

[0127] The channel demultiplexer 808 is used to obtain the corresponding processing result from the context buffer and output it to the corresponding channel.

[0128] The context cache includes: a context storage unit corresponding to a channel; and the channel selector 802 is used to scan the context storage unit corresponding to the channel to obtain corresponding data to be processed.

[0129] The pipeline processing module 806 is used to write the intermediate result into the context storage unit corresponding to the channel; and obtain the intermediate result from the context storage unit corresponding to the channel.

[0130] The channel selector 802 is used to obtain the to-be-processed data from the context storage unit corresponding to the switched channel when the channel scheduler switches the channel.

[0131] In an optional embodiment of the present application, the pipeline processing order of the pipeline unit is related to the channel.

[0132] The channel selector 802 is used to switch the channel when an abnormality is detected in the target channel; the pipeline processing module 806 is used to clear the pipeline units at all levels corresponding to the target channel, and the pipeline units include software pipeline units and / or hardware pipeline units.

[0133] It also includes: a configuration module, which is used to configure the pipeline unit.

[0134] The configuration module is used to configure the processing order of the pipeline units corresponding to the channels and generate pipeline processing files; and add the pipeline processing files to the context cache.

[0135] The configuration module is used to provide a configuration page; receive a selection instruction according to the configuration page, select a processing order of pipeline units according to the selection instruction, and generate a pipeline processing file; and add the pipeline processing file to the context cache.

[0136] The configuration module is used to set the execution ratio of the software pipeline unit and the hardware pipeline unit corresponding to the channel; and add the execution ratio to the context cache.

[0137] In another optional embodiment, the pipeline processing module 806 is used to, during the pipeline level processing, each level of software pipeline units obtains data from the context cache and performs processing, and writes the corresponding processed data back to the context cache; each level of hardware pipeline units migrates the hardware configuration information of the first cache to the second cache for processing, and writes the corresponding processed data back to the context cache, and the hardware configuration information of the first cache is written by the previous level of software pipeline units; until each level of pipeline units completes the pipeline level processing.

[0138] Based on the above embodiments, the present application also provides a data pipeline processing device, such as Fig. 9 As shown, the device includes the following modules: a processing module 902, a write-back module 904 and a hardware configuration module 906, wherein:

[0139] Processing module 902, used for the current level software pipeline unit to process data and obtain corresponding processing results, which include intermediate results;

[0140] A write-back module 904, used for writing the intermediate result back to the context cache;

[0141] The processing module 902 is used to obtain the intermediate result from the context cache and perform processing when the next-level pipeline unit is a software pipeline unit; the write-back module is used to write the corresponding processed intermediate result back to the context cache;

[0142] The hardware configuration module 906 is used to store the hardware configuration information in the processing result into the first cache of the hardware pipeline unit when the next-level pipeline unit is a hardware pipeline unit, so as to migrate to the second cache of the hardware pipeline unit for processing in the next time slice, and write the intermediate result obtained by the corresponding processing back to the context cache;

[0143] The write-back module 904 is used to write the corresponding processing results back to the context cache when each level of pipeline units completes the pipeline level processing.

[0144] The context cache includes: a context storage unit, and the context storage unit corresponds to a channel; therefore, data can be obtained from and / or written into the context storage unit corresponding to each channel.

[0145] The pipeline processing device for data in the embodiment of the present application is similar to the pipeline processing module in the above embodiment, and the details can be referred to the above embodiment.

[0146] In summary, after selecting a channel based on the channel scheduler, the data to be processed of the channel can be obtained from the context cache, and then input into the software pipeline unit for processing, and the intermediate result obtained can be written back to the context cache. If the next-level pipeline unit is a software pipeline unit, the intermediate result is obtained from the context cache and processed, and the corresponding intermediate result is written back to the context cache. If the next-level pipeline unit is a hardware pipeline unit, the hardware configuration information in the processing result is stored in the first cache of the hardware pipeline unit, so that it can be migrated to the second cache of the hardware pipeline unit for processing in the next time slice, and the intermediate result obtained by the corresponding processing is written back to the context cache, so that the first cache and the second cache can realize the parallel execution of hardware configuration and hardware calculation processing, thereby improving processing efficiency. The processing process of each level of pipeline units is similar to the above, until each level of pipeline units completes the pipeline level processing, obtains the corresponding processing result from the context cache, and outputs it to the corresponding channel. In this process, data isolation is realized through the context cache, thereby improving processing efficiency and stability.

[0147] Through the two-level cache of the hardware part, the hardware configuration and hardware processing are parallelized. In addition, based on the context storage unit, strong isolation between channels can be achieved. If an abnormality occurs in a channel, other channels can overwrite the data of the current abnormal pipeline with independently stored data and continue to execute. The system can also conveniently perform corresponding error processing on the abnormal channel, such as clearing the entire abnormal pipeline. The above embodiment also supports operations such as pausing / resuming the pipeline processing of a channel.

[0148] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.

[0149] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, the electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes various types of devices such as terminal devices, servers (clusters), cloud devices, edge computing devices, etc.

[0150] The embodiments of the present disclosure may be implemented as an apparatus that uses any appropriate hardware, firmware, software, or any combination thereof to perform the desired configuration, and the apparatus may include electronic devices such as terminal devices, servers (clusters), cloud devices, edge computing devices, etc. Fig.10 An exemplary apparatus 1000 that can be used to implement various embodiments described in this application is schematically illustrated.

[0151] For one embodiment, Fig.10 An exemplary apparatus 1000 is shown having one or more processors 1002, a control module (chip set) 1004 coupled to at least one of the (one or more) processors 1002, a memory 1006 coupled to the control module 1004, a non-volatile memory (NVM) / storage device 1008 coupled to the control module 1004, one or more input / output devices 1010 coupled to the control module 1004, and a network interface 1012 coupled to the control module 1004.

[0152] The processor 1002 may include one or more single-core or multi-core processors, and the processor 1002 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 1000 can be used as a terminal device, server (cluster), cloud device, edge computing device, etc. described in the embodiments of the present application.

[0153] In some embodiments, the apparatus 1000 may include one or more computer-readable media (e.g., memory 1006 or NVM / storage device 1008) having instructions 1014 and one or more processors 1002 combined with the one or more computer-readable media and configured to execute the instructions 1014 to implement a module to perform the actions described in the present disclosure.

[0154] For one embodiment, the control module 1004 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1002 and / or any suitable device or component in communication with the control module 1004 .

[0155] The control module 1004 may include a memory controller module to provide an interface to the memory 1006. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0156] The memory 1006 may be used, for example, to load and store data and / or instructions 1014 for the device 1000. For one embodiment, the memory 1006 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 1006 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).

[0157] For one embodiment, control module 1004 may include one or more input / output controllers to provide an interface to NVM / storage device 1008 and input / output device(s) 1010 .

[0158] For example, NVM / storage 1008 may be used to store data and / or instructions 1014. NVM / storage 1008 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).

[0159] NVM / storage device 1008 may include storage resources that are physically part of the device on which apparatus 1000 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 1008 may be accessed via input / output device(s) 1010 over a network.

[0160] (One or more) input / output devices 1010 may provide an interface for the apparatus 1000 to communicate with any other appropriate device, and the input / output device 1010 may include a communication component, an audio component, a sensor component, etc. The network interface 1012 may provide an interface for the apparatus 1000 to communicate through one or more networks, and the apparatus 1000 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.

[0161] For one embodiment, at least one of the processor(s) 1002 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 1004. For one embodiment, at least one of the processor(s) 1002 may be packaged together with the logic of one or more controllers of the control module 1004 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 1002 may be integrated on the same die with the logic of one or more controllers of the control module 1004. For one embodiment, at least one of the processor(s) 1002 may be integrated on the same die with the logic of one or more controllers of the control module 1004 to form a system-on-chip (SoC).

[0162] In various embodiments, the apparatus 1000 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the apparatus 1000 may have more or fewer components and / or a different architecture. For example, in some embodiments, the apparatus 1000 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0163] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.

[0164] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0165] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0166] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0167] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0169] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0170] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0171] The above describes in detail a multi-channel data processing method and device, a data pipeline processing method and device, an electronic device and a storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for a person skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for processing multi-channel data, characterized in that: The method comprises: Selecting a channel based on the channel scheduler, and obtaining the to-be-processed data of the channel from the context cache; The first-level software pipeline unit processes the data to be processed to obtain corresponding processing results, which include intermediate results; Writing the intermediate result back to the context buffer; If the next-level pipeline unit is a software pipeline unit, the intermediate result is obtained from the context cache and processed, and the corresponding processed intermediate result is written back to the context cache; If the next-level pipeline unit is a hardware pipeline unit, the hardware configuration information in the processing result is stored in the first cache of the hardware pipeline unit, so as to be migrated to the second cache of the hardware pipeline unit for processing in the next time slice, and the intermediate result obtained by the corresponding processing is written back to the context cache; Until each level of pipeline units completes pipeline processing, the corresponding processing results are obtained from the context cache and output to the corresponding channels.

2. The method according to claim 1, characterized in that: The context cache includes: a context storage unit, and the context storage unit corresponds to a channel; and obtaining the to-be-processed data of the channel from the context cache includes: Scan the context storage unit corresponding to the channel to obtain corresponding data to be processed.

3. The method according to claim 2, characterized in that The step of writing the intermediate result back to the context cache includes: The intermediate result is written into the context storage unit corresponding to the channel.

4. The method according to claim 2, characterized in that: The step of obtaining the intermediate result from the context cache includes: The intermediate result is obtained from a context storage unit corresponding to the channel.

5. The method according to claim 2, characterized in that: Also includes: In the case where the channel scheduler switches channels, the data to be processed is obtained from the context storage unit corresponding to the switched channel.

6. The method according to any one of claims 1 to 5, characterized in that: The processing order of pipeline units is related to the channels.

7. The method according to claim 2, characterized in that Also includes: When an abnormality is detected in a target channel, pipeline units at all levels and context caches corresponding to the target channel are cleared, and the pipeline units include software pipeline units and / or hardware pipeline units.

8. The method according to claim 2, characterized in that: The obtaining the corresponding processing result from the context cache and outputting it to the corresponding channel includes: The demultiplexer obtains the corresponding processing result from the context storage unit corresponding to the channel, and outputs it to the corresponding channel after processing; Clear the processing result in the context storage unit corresponding to the channel.

9. The method according to claim 1, characterized in that: Also includes: Configure the processing order of the pipeline units corresponding to the channel and generate pipeline processing files; The pipeline processing file is added to the context cache.

10. The method according to claim 1, characterized in that Also includes: Provide configuration page; receiving a selection instruction according to the configuration page, selecting a processing order of pipeline units according to the selection instruction, and generating a pipeline processing file; The pipeline processing file is added to the context cache.

11. The method according to claim 1, characterized in that: Also includes: Setting the execution ratio of the software pipeline unit and the hardware pipeline unit corresponding to the channel; The execution ratio is added to the context cache.

12. A pipeline processing method for data, characterized in that: The method comprises: The current-level software pipeline unit processes the data to obtain corresponding processing results, which include intermediate results; Writing the intermediate result back to the context cache; If the next-level pipeline unit is a software pipeline unit, the intermediate result is obtained from the context cache and processed, and the corresponding processed intermediate result is written back to the context cache; If the next-level pipeline unit is a hardware pipeline unit, the hardware configuration information in the processing result is stored in the first cache of the hardware pipeline unit, so as to be migrated to the second cache of the hardware pipeline unit for processing in the next time slice, and the intermediate result obtained by the corresponding processing is written back to the context cache; Until each level of pipeline units completes pipeline processing, the corresponding processing results are written back to the context cache.

13. A pipeline processing method for data, characterized in that: The method comprises: Selecting a channel based on the channel scheduler, and obtaining data of the channel from a context cache; During the pipeline level processing, each level of software pipeline unit obtains data from the context cache and performs processing, and writes the corresponding processed data back to the context cache; Each level of hardware pipeline unit migrates the hardware configuration information of the first cache to the second cache for processing, and writes the corresponding processed data back to the context cache, wherein the hardware configuration information of the first cache is written by the previous level of software pipeline unit; Until each level of pipeline units completes pipeline processing, the corresponding processing results are obtained from the context cache and output to the corresponding channels.

14. A multi-channel data processing device, characterized in that: include: A channel selector, used to select a channel and obtain the to-be-processed data of the channel from the context cache; A pipeline processing module, used for the first-level software pipeline unit to process the data to be processed to obtain corresponding processing results, wherein the processing results include intermediate results; and write the intermediate results back to the context cache; If the next-level pipeline unit is a software pipeline unit, the intermediate result is obtained from the context cache and processed, and the corresponding processed intermediate result is written back to the context cache; If the next-level pipeline unit is a hardware pipeline unit, the hardware configuration information in the processing result is stored in the first cache of the hardware pipeline unit, so as to be migrated to the second cache of the hardware pipeline unit for processing in the next time slice, and the intermediate result obtained by the corresponding processing is written back to the context cache; Until each level of pipeline units completes pipeline processing; The channel demultiplexer is used to obtain the corresponding processing result from the context buffer and output it to the corresponding channel.

15. A pipeline processing device for data, characterized in that: include: A processing module, configured to process data at a current-level software pipeline unit to obtain corresponding processing results, wherein the processing results include intermediate results; and, when the next-level pipeline unit is a software pipeline unit, to obtain the intermediate results from a context cache and perform processing; A write-back module, used to write the intermediate results obtained by processing back to the context cache; and, when each level of pipeline units completes pipeline processing, write the corresponding processing results back to the context cache; A hardware configuration module is used to store the hardware configuration information in the processing result into the first cache of the hardware pipeline unit when the next-level pipeline unit is a hardware pipeline unit, so as to migrate it to the second cache of the hardware pipeline unit for processing in the next time slice, and write the intermediate results obtained by the corresponding processing back to the context cache.

16. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, cause the processor to perform the method according to one or more of claims 1-13.

17. One or more machine-readable media having executable codes stored thereon, which, when executed, cause a processor to perform the method of one or more of claims 1-13.

Citation Information

Patent Citations

  • Method for improving hardware-software interaction in SOPC (system on a programmable chip)

    CN102566969A

  • Multi-channel NAND FLASH controller

    CN105138470A

  • Parallel hardware and software block processing pipelines

    CN105684036A

  • AVS-2 video decoder structure based on separation of software and hardware areas

    CN107277505A

  • Circulating high-speed buffer memory of pipeline microprocessor and high-speed buffer memory controller

    CN1329302A