Image processing method and related equipment

By generating a task scheduling policy based on image processing task information and acceleration processing engine running information, and allocating image processing tasks to the acceleration processing engine, the problem of low resource utilization in the existing technology is solved, and more efficient image processing is achieved.

CN117311941BActive Publication Date: 2024-09-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311290316.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2024-09-10
Estimated Expiration
2043-09-28

AI Technical Summary

Technical Problem

In the existing image processing technology, the task priority control method cannot effectively ensure the resource utilization of the computing unit, resulting in a waste of resources of the computing unit.

Method used

By obtaining the task information of the image processing task, including the connected area labeling results in the image, combined with the number and operating information of the acceleration processing engine, a task scheduling strategy is generated, and the image processing task is assigned to the acceleration processing engine for hardware acceleration processing.

Benefits of technology

It improves the utilization rate of the acceleration processing engine, maximizes the resource utilization rate of the computing unit, and avoids resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117311941B
    Figure CN117311941B
Patent Text Reader

Abstract

The embodiment of the present application provides an image processing method and related equipment. The embodiment of the present application relates to an integrated chip, which can be used to perform: obtaining task information corresponding to an image processing task; the image processing task is a computing task associated with an image, and the task information includes the marking results carried by N connected areas in the image, where N is a positive integer; generating a task scheduling strategy corresponding to the image processing task according to the marking results in the task information, the number of acceleration processing engines, and the operation information of the acceleration processing engine; according to the task scheduling strategy, the image processing task is assigned to the acceleration processing engine, and the image processing task is hardware accelerated by the acceleration processing engine. Through the embodiment of the present application, the utilization rate of the acceleration processing engine can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to an image processing method and related equipment, and specifically to an image processing method, an integrated chip, and a computer device. Background Art

[0002] With the development of image processing technology, the related algorithm tasks involved in computer vision, pattern recognition and image analysis and processing are becoming more and more diverse; for example, license plate recognition, text recognition, subtitle recognition, target segmentation and extraction, region of interest extraction and other tasks.

[0003] Currently, the execution order of each task can be determined by setting the priority of the task. For example, the idle computing units in the multiple computing units with corresponding functions can be controlled to execute the corresponding tasks in order of the priority of each task in the scheduling queue from high to low. Then the tasks with higher priority can obtain the idle computing units faster and execute the tasks. This method cannot guarantee the execution efficiency of the computing units for a period of time. Since the load of high-priority tasks and other tasks with lower priority are not balanced, the resources of the computing units are wasted. Summary of the invention

[0004] The embodiments of the present application provide an image processing method and related devices, which can improve the utilization rate of the acceleration processing engine.

[0005] An embodiment of the present application provides an image processing method, including:

[0006] Obtain task information corresponding to an image processing task; an image processing task is a computing task associated with an image, and the task information includes the labeling results carried by N connected regions in the image, where N is a positive integer;

[0007] Generate a task scheduling strategy corresponding to the image processing task according to the marking results in the task information, the number of acceleration processing engines, and the operation information of the acceleration processing engines;

[0008] According to the task scheduling strategy, the image processing task is assigned to the acceleration processing engine, and the image processing task is hardware accelerated by the acceleration processing engine.

[0009] On the one hand, an embodiment of the present application provides an integrated chip, which includes a task scheduling management engine and an acceleration processing engine:

[0010] The task scheduling management engine is used to obtain task information corresponding to the image processing task; the image processing task is a computing task associated with the image, and the task information includes the labeling results carried by N connected regions in the image, where N is a positive integer;

[0011] The task scheduling management engine is also used to generate a task scheduling strategy corresponding to the image processing task according to the marking result in the task information, the number of acceleration processing engines, and the operation information of the acceleration processing engines;

[0012] The task scheduling management engine is also used to assign the image processing task to the acceleration processing engine according to the task scheduling strategy;

[0013] The acceleration processing engine is used to perform hardware acceleration processing on image processing tasks.

[0014] Among them, the integrated chip also includes a tag processing engine;

[0015] The labeling processing engine is used to perform connected region labeling processing on the image to obtain label information of N connected regions contained in the image; the label information of each connected region is used to uniquely identify the corresponding connected region; and,

[0016] It is also used to create an index for the label information of each connected area, determine the label information of each connected area and the index created for each label information as a marking result, and write the marking result into a storage area; the storage area includes any one of a host memory, an on-chip storage unit, and an external storage device; and,

[0017] It is also used to determine the marking result and the storage location corresponding to the marked image as the task information of the image processing task, and generate a configuration command carrying the task information.

[0018] The tag processing engine is specifically used for:

[0019] Scan the pixels in the image, form connected regions with pixels having the same pixel value and adjacent positions in the image, mark the connected regions contained in the image, and obtain label information corresponding to the connected regions contained in the image.

[0020] Wherein, the integrated chip also includes a bus unit;

[0021] The bus unit is used to send configuration commands carrying task information to the task scheduling management engine.

[0022] The task scheduling management engine is specifically used for:

[0023] Counting the number of acceleration processing engines, and obtaining performance indicators and resource utilization rates of the acceleration processing engines, and determining the performance indicators and resource utilization rates as operation information of the acceleration processing engines;

[0024] The number of label information in the labeling result is counted to obtain the number of connected regions in the image; the number of connected regions in the image is N;

[0025] A task scheduling strategy is generated for the image processing task according to the number of connected regions in the image, the number of acceleration processing engines, and the operation information of the acceleration processing engines.

[0026] The task scheduling management engine includes a task scheduling strategy generation unit, a command encapsulation unit and an arbitration management unit. The number of acceleration processing engines in the integrated chip is M, where M is an integer greater than 1.

[0027] The task scheduling strategy generation unit is used to configure the execution order for each connected area in the image according to the dependency relationship between each connected area in the image;

[0028] The task scheduling strategy generation unit is also used to perform load balancing according to the execution order, the number of connected areas in the image, the number of acceleration processing engines, and the operation information of the acceleration processing engines, and determine the scheduling granularity for the image processing task;

[0029] The task scheduling strategy generating unit is further used to combine the execution order and the scheduling granularity into a task scheduling strategy corresponding to the image processing task, and transmit the task scheduling strategy to the command encapsulation unit;

[0030] The command encapsulation unit is used to split the image processing task into N subtasks according to the label information in the marking result, and encapsulate the N subtasks according to the task scheduling strategy to obtain the task execution command; the N subtasks correspond to the N connected areas in the image one by one;

[0031] The arbitration management unit is used to distribute the task execution command to the M acceleration processing engines.

[0032] The arbitration management unit is specifically used for:

[0033] Performing format conversion on the task execution command to obtain the task execution command after format conversion, and distributing the task execution command after format conversion to M acceleration processing engines; the task execution command after format conversion is in a configuration format supported by the acceleration processing engine;

[0034] The N subtasks are assigned to the M acceleration processing engines through the task execution command after the format conversion, and the M acceleration processing engines are controlled to execute the assigned subtasks respectively;

[0035] Receive the subtask processing results returned by each of the M acceleration processing engines.

[0036] Among them, the integrated chip also includes a post-processing engine;

[0037] The post-processing engine is used to merge the sub-task processing results of the M acceleration processing engines to obtain the task processing result corresponding to the image processing task.

[0038] On one hand, an embodiment of the present application provides a computer device, including the integrated chip provided in the above-mentioned aspect of the embodiment of the present application, so that the computer device executes the method provided in the above-mentioned aspect of the embodiment of the present application.

[0039] In an embodiment of the present application, task information corresponding to an image processing task is obtained. The image processing task is a computing task associated with an image. The task information includes the marking results carried by N connected regions in the image, where N is a positive integer. A task scheduling strategy corresponding to the image processing task is generated based on the marking results in the task information, the number of acceleration processing engines, and the operation information of the acceleration processing engines. This can make full use of the characteristics of the connected region marking algorithm, and combine the operation information and number of the acceleration processing engines to quickly generate a task scheduling strategy. According to the task scheduling strategy, the image processing task is assigned to the acceleration processing engine, and the image processing task is hardware accelerated by the acceleration processing engine. By flexibly assigning the acceleration processing engine to the image processing task through the task scheduling strategy, the utilization rate of the acceleration processing engine can be maximized. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 It is a schematic diagram of the structure of an integrated chip provided in an embodiment of the present application;

[0042] Figure 2 It is a schematic diagram of the interaction between multiple engines in a visual / image algorithm engine system provided by an embodiment of the present application;

[0043] Figure 3 This is a schematic diagram of an image processing method provided in an embodiment of the present application. Figure 1 ;

[0044] Figure 4 It is a structural diagram of a task scheduling management engine provided in an embodiment of the present application;

[0045] Figure 5 This is a schematic diagram of an image processing method provided in an embodiment of the present application. Figure 2 ;

[0046] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] For ease of understanding, the basic concepts involved in the embodiments of the present application are described below:

[0049] Connected component: A connected component refers to an image region composed of pixels with the same pixel value and adjacent positions in the image. For example, if two pixels in an image have the same pixel value and the two pixels have adjacent positions in the image, the two pixels can be considered to be connected, and the two pixels can be divided into the same connected region. In an embodiment of the present application, the connected region in the image can be obtained by performing a connected region analysis on the image. The connected region analysis here refers to the process of finding and marking the connected region in the image. The connected region analysis can also be called connected region marking. Pixels belonging to the same connected region have the same label information, and pixels belonging to different connected regions have different label information.

[0050] Computer Vision (CV): Computer vision technology, as a subordinate technology of artificial intelligence technology, is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further processing graphics so that computer processing becomes an image more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.

[0051] The embodiments of the present application can be used to process related algorithms involved in tasks such as computer vision and image processing, such as character segmentation and extraction in OCR recognition (such as license plate recognition, text recognition, subtitle recognition, etc.), motion foreground target segmentation and extraction in visual positioning (such as pedestrian detection, vision-based vehicle detection and positioning, etc.), medical image processing (such as region of interest extraction), and other tasks.

[0052] See also Figure 1 , Figure 1 Schematic diagram of the structure of an integrated chip provided in an embodiment of the present application. Figure 1 As shown, the integrated chip may include a processor unit, a bus unit, a vision / image task engine, a vision / image algorithm engine, an I / O (input / output) device unit, an on-chip memory unit, etc. Among them:

[0053] The processor unit may include one or more processors, for example, Figure 1 The processor unit shown may include processor 1, processor 2, ..., processor D, where D represents the number of processors included in the processor unit, and D is a positive integer, such as D can be 1, 2, ..., and the embodiment of the present application does not limit the number of processors included in the processor unit. The processor unit is responsible for executing instructions and performing data processing, and the performance and function of the processor unit depend on its design and implementation. Different processor units can have different architectures and instruction sets to adapt to different application requirements and performance requirements, which is not limited in the embodiment of the present application.

[0054] The bus unit can be used to handle bus interfaces and data transmission. For example, the data transmission between the processor unit, on-chip storage unit, I / O device unit and various engines (e.g., vision / image task engine, vision / image algorithm engine) in the integrated chip needs to be implemented through the bus unit.

[0055] On-chip memory cells are memory cells in integrated chips, used to store and access data inside the integrated chip. On-chip memory cells can be divided into several different levels: ① Registers are the fastest and lowest latency on-chip memory cells, used to store operation instructions and data. ② Cache is a storage hierarchy located between the processor core and main memory, used to speed up access to main memory. ③ High-speed cache is a larger capacity fast memory cell located above the cache, which can be used to provide higher capacity and lower access latency.

[0056] The I / O device unit is a bridge for communication between the integrated chip and external devices, such as Figure 1 As shown, the I / O device unit can serve as a bridge for the integrated chip to communicate with the storage device and the host device, that is, the I / O device unit can be connected to the external storage device and the host device. The I / O device unit may include one or more I / O device controllers, such as the I / O device unit may include I / O device controller 1, I / O device controller 2, ..., I / O device controller L, where L represents the number of I / O device controllers included in the I / O device unit, and L is a positive integer, such as L can be 1, 2, ..., and the embodiment of the present application does not limit the number of I / O device controllers included in the I / O device unit.

[0057] The integrated chip may include multiple engines, which may be used to process various tasks in the integrated chip, where the tasks may be various types of computing tasks involved in technical fields such as computer vision, image recognition, and image processing. Figure 1 As shown, the engine in the integrated chip may include a vision / image task engine and a vision / image algorithm engine, wherein the number of the vision / image task engine and the vision / image algorithm engine in the integrated chip may be one or more, and the embodiments of the present application do not limit them herein.

[0058] The vision / image task engine is used to perform various vision / image-related tasks, which may include but are not limited to image classification, target detection, face recognition, object segmentation, etc. The vision / image task engine can usually use pre-trained deep learning models or machine learning algorithms to solve specific vision problems and provide a simple and easy-to-use interface for developers to call.

[0059] The vision / image algorithm engine can be used to implement and optimize the vision / image processing algorithm; the vision / image algorithm engine can usually provide the underlying image processing and computing capabilities, such as image filtering, edge detection, feature extraction, etc.

[0060] It is understandable that in actual applications, the vision / image task engine and the vision / image algorithm engine will interact with each other. For example, the vision / image task engine usually sends a request to the vision / image algorithm engine to perform a specific vision / image task; the vision / image algorithm engine will use the corresponding algorithm and model to process the image data according to the request and return the processing results to the vision / image task engine; this interaction can achieve more efficient and flexible image processing and analysis.

[0061] like Figure 1In the integrated chip shown, the vision / image task engine can receive the image processing task issued by the processor unit (the image processing task here can be a vision / image task, specifically a computing task), and the image processing task can be sent to the vision / image algorithm engine through the bus unit (specifically through the routing of the bus unit), and the vision / image algorithm engine is called to start the corresponding task and complete the corresponding work.

[0062] Optionally, the vision / image task engine can also receive image processing tasks issued by the host device. At this time, the image processing tasks can be received by the I / O device controller in the integrated chip, and then sent to the vision / image algorithm engine through the bus unit, calling the vision / image algorithm engine to start the corresponding task and complete the corresponding work.

[0063] Among them, the calculation data contained in the image processing task can be stored in an on-chip storage unit inside the integrated chip, or can be stored in a storage device outside the integrated chip, or can also be stored in a storage unit running on a host device, which is not limited in the embodiments of the present application.

[0064] It should be noted that Figure 1 The integrated chip shown can be set in a server or in a terminal device, and this application does not limit this. Among them, the terminal device may include a smart phone, a tablet computer, a laptop computer, a PDA, a mobile internet device (MID), a wearable device (such as a smart watch, a smart bracelet, etc.), an intelligent voice interaction device, a smart home appliance (such as a smart TV, etc.), a vehicle-mounted device, an aircraft and other electronic devices. This application does not limit the type of terminal device. The server can be an independent physical server or a server cluster or a distributed system composed of multiple physical servers. This application does not limit the type of server.

[0065] Understandably, Figure 1 Each engine in the integrated chip shown can be considered as a system. A system can also include multiple engines. For example, a vision / image algorithm engine system can include multiple engines. Figure 2 , Figure 2 Schematic diagram of the interaction between multiple engines in a visual / image algorithm engine system provided by an embodiment of the present application. Figure 2 As shown, the visual / image algorithm engine system may include a marking processing engine, a task scheduling management engine, an acceleration processing engine, and a post-processing engine. The embodiment of the present application does not limit the number of marking processing engines, task scheduling management engines, acceleration processing engines, and post-processing engines. For example, the number of acceleration processing engines may be M, and M may be a positive integer. Among them:

[0066] The marking processing engine is used to perform connected area marking processing on the input image to obtain the marking results of the connected areas contained in the image; that is, the marking processing engine can search for each connected area in the image, mark each connected area, and obtain the marking results corresponding to each connected area. The marking processing engine can also be called a connected area marking engine. It can be understood that any image can include at least one connected area. For ease of understanding, the embodiment of the present application can record the number of connected areas contained in the image as N, and N can be a positive integer, such as N can take the value of 1, 2, ...

[0067] The task scheduling management engine is used to obtain task information corresponding to the image processing task, which may refer to the computing task associated with the image received by the visual / image algorithm engine. The task information may include the marking results carried by the N connected regions in the image; then, based on the marking results in the task information, the number of acceleration processing engines, and the operation information of the acceleration processing engines, the task scheduling strategy corresponding to the image processing task is generated; the image processing task is split and allocated based on the task scheduling strategy. Among them, the task scheduling strategy may refer to the rules for allocating and scheduling image processing tasks, such as how to split the image processing task, in what order the split tasks are executed, and how the split tasks are allocated to the acceleration processing engines.

[0068] The acceleration processing engine is used to perform hardware acceleration processing on the tasks assigned to it. The hardware acceleration processing here may include but is not limited to: image size and format conversion, image filtering and enhancement, image binarization, edge extraction, matrix operation, affine transformation, histogram, obtaining and calculating the angle and area of ​​graphics, etc. For example, the acceleration processing engine may specifically be a binarization engine, a contour search engine, etc. Obviously, the binarization engine can be used to perform image binarization processing on the tasks assigned to it, and the contour search engine can be used to perform contour search processing on the tasks assigned to it, etc. Among them, the number of acceleration processing engines can be M, and each acceleration processing engine can process the tasks assigned to it in parallel, and then perform parallel hardware acceleration on the image processing tasks. It can be understood that the value of M can be set according to the needs of the actual application scenario. For example, it can be set according to the performance indicators of the integrated chip. If the throughput requirement is high, the value of M can be relatively large; conversely, if the throughput requirement is low, the value of M can be relatively small.

[0069] The post-processing engine can be used to perform a series of operations such as screening, merging, sorting, and packaging the results of each acceleration processing engine.

[0070] Below Figure 2 The interaction between the engines shown in the figure is described in Figure 3 , Figure 3 This is a schematic diagram of an image processing method provided in an embodiment of the present application. Figure 1 It is understandable that the image processing method can be executed by a computer device, and the computer device can be provided with Figure 1 The integrated chip shown, the computer device may be a terminal device, or may be a server, which is not limited in the embodiment of the present application; wherein the image processing method may include the following steps S101 to S103:

[0071] Step S101, obtaining task information corresponding to an image processing task; an image processing task is a computing task associated with an image, and the task information includes labeling results carried by N connected regions in the image, where N is a positive integer.

[0072] In the present application embodiment, Figure 1 As shown, after the visual / image task engine in the integrated chip receives the image processing task sent by the processor unit or the host device, the visual / image task engine can send it to the visual / image algorithm engine through the bus unit. Among them, the image processing task can be a computing task associated with the image, and the image processing task here can also be called a visual / image task. For example, the image processing task can include but is not limited to image filtering, edge detection, feature extraction, etc. The image can be an image collected in real time by a camera device (which can be a camera integrated in a computer device, or an external camera device), or it can be an image directly downloaded from the Internet, or it can be an image resource pre-stored in the local map library, etc. The image can be a static image, or it can be a dynamic image, or it can be any video frame in the video data, and the number of images can be one or more, which is not limited in the embodiments of the present application.

[0073] The visual / image algorithm engine system may include a marking processing engine. After receiving an image processing task, the visual / image algorithm engine may call the marking processing engine to perform connected area marking processing on the image associated with the image processing task to obtain a marking result corresponding to the image. The marking result includes label information corresponding to each connected area contained in the image, and index information created for each connected area. The label information of each connected area can be used to uniquely identify the corresponding connected area; that is, a connected area in the image can correspond to one label information and one index information, different connected areas can correspond to different label information, and different label information can correspond to different index information. In the embodiment of the present application, the number of connected areas contained in the image can be recorded as N, where N is a positive integer.

[0074] After calling the marking processing engine to obtain the marking results of each connected area in the image, the marking results can be written into a storage area through a bus unit. The storage area can be any one of an on-chip storage unit in an integrated chip, a storage unit running in a host device (or can be called a host memory), and an external storage device, etc. The embodiments of the present application are not limited to this.

[0075] In a feasible implementation, the visual / image algorithm engine system of the integrated chip may also include a bus unit and a task scheduling management engine. The marking results of each connected area contained in the image and the storage location corresponding to the marked image may be used as the task information of the image processing task, and a configuration command carrying the task information may be generated, and the configuration command may be generated by the marking processing engine in the integrated chip; and then the bus unit in the integrated chip may be called to send the configuration command carrying the task information to the task scheduling management engine. Among them, the storage location corresponding to the marking result may refer to the address storage space of the marking result in the storage area.

[0076] After receiving the configuration command, the task scheduling management engine can obtain the task information carried by the configuration command, and read the marked image from the storage area according to the storage location contained in the task information. The marked image may refer to the image after the connected area marking process is completed; then, the position of each connected area can be determined from the marked image based on the marking result in the task information, and the position of each connected area is used to locate each connected area contained in the image.

[0077] Step S102: Generate a task scheduling strategy corresponding to the image processing task according to the marking result in the task information, the number of acceleration processing engines, and the operation information of the acceleration processing engines.

[0078] For details, see Figure 4 , Figure 4 Schematic diagram of a task scheduling management engine provided by an embodiment of the present application. Figure 4 As shown, the task scheduling management engine may include a scheduling strategy generation unit, a command encapsulation unit, and an arbitration management unit. Among them, the scheduling strategy generation unit in the task scheduling management engine may receive a configuration command sent by the bus unit, and the configuration command may carry task information corresponding to the image processing task, and the task information may include but is not limited to the marking results of each connected area in the image, the image storage location after the connected area marking is completed (for example, the storage location corresponding to the marked image) and supporting parameters, etc.

[0079] Optionally, the task scheduling management engine can be called (specifically, the scheduling policy generation unit in the task scheduling management engine can be called) to count the number of acceleration processing engines, and obtain the performance indicators and resource utilization of the acceleration processing engines, and determine the performance indicators and resource utilization as the operation information of the acceleration processing engines.

[0080] Among them, in the embodiment of the present application, the number of acceleration processing engines can be recorded as M, where M is a positive integer; the performance indicators of the acceleration processing engine can include indicators such as the processing speed, throughput, and delay of the acceleration processing engine. Optionally, the performance indicators of the acceleration processing engine can also include accuracy indicators, such as error rate, distortion, etc.; the resource utilization of the acceleration processing engine can refer to the utilization of system resources by the acceleration processing engine, such as the CPU (Central Processing Unit / Processor) occupancy rate, memory occupancy rate, I / O load, etc. during the operation of the acceleration processing engine. Based on the operation information of the acceleration processing engine, a task scheduling strategy is generated in real time (the task scheduling strategy at this time can be a dynamic strategy), which can improve the utilization of system resources and avoid excessive occupation of system resources.

[0081] The scheduling strategy generation unit in the task scheduling management engine is called to count the number of label information in the marking result to obtain the number of connected areas in the image, where the number of connected areas in the image can be recorded as N; the scheduling strategy generation unit in the task scheduling management engine is called to configure the execution order for each connected area in the image according to the dependency relationship between the connected areas in the image; load balancing is performed according to the execution order, the number of connected areas in the image, the number of acceleration processing engines, and the operation information of the acceleration processing engines to determine the scheduling granularity for the image processing task; the execution order and the scheduling granularity can then be combined into a task scheduling strategy corresponding to the image processing task, and the task scheduling strategy is transmitted to the command encapsulation unit.

[0082] In a feasible implementation, in order to improve flexibility, the task scheduling strategy may include but is not limited to various combinations of configuration mode, scheduling granularity, execution order, load balancing, etc. Among them:

[0083] ① The configuration method can support static configuration or dynamic configuration. Static configuration means allowing the software to program and control the scheduling strategy of each image processing task; dynamic configuration refers to the task scheduling strategy generated in real time based on the running information of the acceleration processing engine. Compared with static configuration, dynamic configuration is more flexible and intelligent, and can be adjusted according to the real-time running information of the acceleration processing engine to improve the efficiency and performance of the acceleration processing engine. It can be understood that the embodiments of the present application can generate the task scheduling strategy corresponding to the image processing task in a static configuration or dynamic configuration manner, and the present application does not limit this.

[0084] ② Scheduling granularity may refer to the unit size of the image processing task to be scheduled for execution, and the scheduling granularity may be flexibly configured according to different application scenarios and requirements. Scheduling granularity supports but is not limited to multiple scenarios such as single instruction, multiple instructions, compound instructions, mixed instructions, etc. It is understandable that the embodiments of the present application may select any of multiple scenarios such as single instruction, multiple instructions, compound instructions, mixed instructions, etc. according to specific application scenarios and requirements to generate a task scheduling strategy corresponding to the image processing task.

[0085] Among them, in the single instruction scheduling granularity scenario, the task scheduling management engine uses the smallest task unit as the basic unit, such as a single instruction; this granularity can realize the execution of data-intensive tasks and is suitable for tasks with large data volumes and long processing times, such as vector instruction operations.

[0086] In the scenario of multiple instruction scheduling granularity, the task scheduling management engine schedules with multiple instructions as the basic unit, such as a set of related instruction sequences or multiple tasks submitted at one time; this granularity can improve the efficiency and parallelism of task scheduling and is suitable for multi-threaded, multi-core computing environments.

[0087] In the scenario of compound instruction scheduling granularity, the task scheduling management engine merges multiple related instructions into a compound instruction for task scheduling; this granularity can reduce the dependencies and communication overhead between instructions, improve instruction-level parallelism, and is suitable for instruction-level parallel computing and specific application areas.

[0088] In the mixed instruction scheduling granularity scenario, the task scheduling management engine can flexibly select different scheduling granularities according to the characteristics and requirements of the task. For example, single instruction scheduling granularity is used in some tasks, while compound instruction scheduling granularity is used in other tasks; this flexible scheduling granularity can better balance the efficiency of task execution and resource utilization.

[0089] ③The task scheduling strategy can also be determined according to different execution orders; for example, a parallel execution strategy can be selected to execute multiple tasks simultaneously; a serial execution strategy can also be selected to execute individual tasks in sequence; a mixed execution strategy can also be selected to determine the execution order according to the dependencies of the tasks, etc. Optionally, the execution order can also support multiple application scenarios such as sequential execution and sequence return, out-of-order execution and out-of-order return, sequential execution and out-of-order return, and out-of-order execution and sequence return. It can be understood that the embodiments of the present application can select any of the above execution orders to generate a task scheduling strategy corresponding to the image processing task.

[0090] For example, assuming that the order of multiple tasks is Task 1, Task 2, and Task 3, in the sequential execution and sequential return scenario, Task 1, Task 2, and Task 3 are executed in sequence, and the order of return of the execution results of the above tasks is still Task 1, Task 2, and Task 3. In the out-of-order execution and out-of-order return scenario, there is no restriction on the execution order of Task 1, Task 2, and Task 3 and the order of return of the execution results.

[0091] In the sequential execution and out-of-order return scenario, Task 1, Task 2, and Task 3 need to be executed in sequence, but the order in which the task execution results are returned can be random. For example, the task execution result of the task that is completed first will be returned first.

[0092] In the out-of-order execution order return scenario, Task 1, Task 2, and Task 3 can be executed in any order, but after the task execution is completed, the task execution results need to be returned in the order of Task 1, Task 2, and Task 3; if the execution time of Task 2 is earlier than the execution time of Task 1, the task execution result of Task 2 needs to wait until Task 1 is completed and returns its corresponding task execution result before the task execution of Task 2 can be returned. That is, the order of returning the task execution results needs to be in the order of Task 1, Task 2, and Task 3.

[0093] ④ Load balancing is a technology that evenly distributes tasks on multiple resources (for example, M acceleration processing engines) to improve the performance, scalability and reliability of the system; the purpose of load balancing is to make full use of each acceleration processing engine to avoid resource overload or resource idleness. For example, the current load of each acceleration processing engine can be obtained, and based on the current load of each acceleration processing engine, the image processing task can be evenly distributed to the M acceleration processing engines; wherein the current load can be the number of tasks waiting to be processed by each acceleration processing engine, or can be the length of time required for the tasks waiting to be processed, etc., which is not limited in the embodiments of the present application. It should be understood that when generating a task scheduling strategy for an image processing task according to the principle of load balancing, it is necessary to consider not only the current load of each acceleration search engine, but also the number of connected areas contained in the image (which can also be understood as the workload of the image processing task).

[0094] It can be understood that the embodiments of the present application can select one or more combinations of the aforementioned configuration methods, scheduling granularity, execution order, and load balancing as the task scheduling strategy corresponding to the image processing task, which can improve the flexibility of the task scheduling strategy and make it simple and efficient.

[0095] Step S103: according to the task scheduling strategy, the image processing task is assigned to the acceleration processing engine, and the acceleration processing engine performs hardware acceleration processing on the image processing task.

[0096] Specifically, Figure 4 As shown, after calling the command encapsulation unit in the task scheduling management engine to transmit the generated task scheduling strategy to the command encapsulation unit, the command encapsulation unit in the task scheduling management engine can be called to split the image processing task into N subtasks according to the label information in the marking result, and the N subtasks correspond one-to-one to the N connected areas in the image.

[0097] It can be understood that, since the label information can be used to uniquely identify the corresponding connected area, the number of label information in the marking result can be understood as the number of connected areas contained in the image (which can be denoted as N). The image area composed of pixels with the same label information in the image is a connected area, and a connected area can correspond to a subtask; the image processing task is for the entire image, that is, the image processing task includes the processing of all connected areas in the image. When the image processing task is split according to the number of connected areas, the image processing task can be split into N subtasks, and one subtask includes the processing of one connected area.

[0098] The command encapsulation unit in the task scheduling management engine is called to evaluate the complexity of the image processing task according to the generated task scheduling strategy, and then the command encapsulation of the N subtasks is performed according to the task scheduling strategy to obtain the task execution command. The command encapsulation here may include but is not limited to the encapsulation of batch or single instructions of the N subtasks, and the task execution command is a series of commands for the N subtasks.

[0099] For example, if the task scheduling strategy includes a single instruction scheduling granularity, each of the N subtasks can be individually command-encapsulated. At this time, the task execution command can include execution commands corresponding to the N subtasks, and the number of these commands can be recorded as N.

[0100] If the task scheduling strategy includes multi-instruction scheduling granularity, then N subtasks can be encapsulated as batch instructions. At this time, the number of task execution commands is less than N. For example, the image processing task is divided into 9 subtasks. According to the multi-instruction scheduling granularity, 3 subtasks can be encapsulated as batch instructions at one time. Then the task execution command can include 3 execution commands, that is, the number is 3.

[0101] It is understandable that when the task scheduling strategy includes various combinations of configuration mode, load balancing, scheduling granularity, and execution order, in the process of calling the command encapsulation unit in the task scheduling management engine to encapsulate the N subtasks, it is necessary to refer to the configuration mode, load balancing, scheduling granularity, and execution order in the task scheduling strategy at the same time to obtain the task execution command for the N subtasks. The encapsulation format of the task execution command and the number of commands contained in the task execution command are not limited here, and can be determined by the task scheduling strategy, or set by specific application scenarios and requirements.

[0102] Furthermore, the arbitration management unit in the task scheduling management engine can be called to distribute the task execution command to the M acceleration processing engines; through the task execution command, the N subtasks are assigned to the M acceleration processing engines, and the M acceleration processing engines are controlled to execute their assigned subtasks. Optionally, when the task execution command does not meet the configuration format supported by the acceleration processing engine, the arbitration management unit in the task scheduling management engine can be called to convert the format of the task execution command to obtain the task execution command after the format conversion; the task execution command after the format conversion is in the configuration format supported by the acceleration processing engine; and then the task execution command after the format conversion can be distributed to the M acceleration processing engines.

[0103] like Figure 4 As shown, the arbitration management unit can parse the task execution command, obtain the valid content in the task execution command (for example, the subtasks contained in each task execution command, that is, the corresponding connected area), and then convert the obtained valid content to generate a task execution command after format conversion. The command format of the task execution command after format conversion is the configuration format supported by the acceleration processing engine. The arbitration management unit can submit the task execution command after format conversion to M acceleration processing engines through the bus unit. After receiving their respective task execution commands, the M acceleration processing engines start to start and calculate the corresponding subtasks. When the subtasks are executed, the command response results (which can be called subtask processing results) can be returned to the arbitration management unit through the bus unit. It can be understood that the arbitration management unit can be responsible for managing, allocating, scheduling and recycling tasks, receiving and processing command responses, etc. for M acceleration processing engines at the same time. For example, when the number N of connected areas contained in the image is a positive integer, the arbitration management unit in the task scheduling management engine can schedule the subtask task (i) to Engine j according to the task scheduling strategy, where i∈[1,N], j∈[1,M]. Task(i) represents the i-th subtask among N subtasks, Engine j represents the j-th acceleration processing engine among M acceleration processing engines, and j is a positive integer less than or equal to M.

[0104] Alternatively, if Figure 4 As shown, the task scheduling management engine can also include a post-processing engine, which calls the arbitration management unit to receive the sub-task processing results (command response results) returned by each of the M acceleration processing engines; calls the post-processing engine to merge the sub-task processing results of the M acceleration processing engines to obtain the task processing results corresponding to the image processing task.

[0105] In the embodiment of the present application, the task information corresponding to the image processing task is obtained. The image processing task is a computing task associated with the image. The task information includes the marking results carried by N connected regions in the image, where N is a positive integer. The task scheduling strategy corresponding to the image processing task is generated based on the marking results in the task information, the number of acceleration processing engines, and the running information of the acceleration processing engines. This can make full use of the characteristics of the connected region marking algorithm, and combine the running information and number of the acceleration processing engines to quickly generate the task scheduling strategy. According to the task scheduling strategy, the image processing task is assigned to the acceleration processing engine, and the image processing task is hardware accelerated by the acceleration processing engine. The acceleration processing engine is flexibly assigned to the image processing task through the task scheduling strategy, without adding additional computing resources to determine the task priority, and the image task processing can be simply and efficiently scheduled to maximize the utilization of the acceleration processing engine, thereby improving the throughput and performance of the integrated chip overall system.

[0106] See also Figure 5 , Figure 5 This is a schematic diagram of an image processing method provided in an embodiment of the present application. Figure 2 It can be understood that the image processing method can be executed by a computer device, and the computer device can be provided with Figure 1 The integrated chip shown, the computer device may be a terminal device, or may be a server, which is not limited in the embodiment of the present application; wherein the image processing method may include steps S201 to S205:

[0107] Step S201, performing connected region labeling processing on the input image.

[0108] Specifically, an image processing task associated with an image can be obtained, and a marking processing engine in a visual / image algorithm engine of an integrated chip is called to perform connected region marking processing on the image to obtain label information of N connected regions contained in the image; the label information of each connected region is used to uniquely identify the corresponding connected region; an index is created for the label information of each connected region, and the label information of each connected region and the index created for each label information are determined as a marking result, and the marking result is written into a storage area; the storage area includes any one of a host memory, an on-chip storage unit, and an external storage device. The determination process of the label information of each connected region may include: calling the marking processing engine to scan pixels in the image, and forming connected regions with pixels having the same pixel value and adjacent positions in the image; calling the marking processing engine to perform label processing on the connected regions contained in the image to obtain label information corresponding to the connected regions contained in the image.

[0109] In a feasible implementation, in the process of performing connected region labeling processing on an image, the process of determining the connected region may include but is not limited to: ① performing binarization processing on the image to obtain a binary image; ② using a connected region labeling algorithm to perform connected region labeling processing on the binary image. In a specific implementation, a connected region labeling algorithm is used to determine pixels in the image that have the same pixel value and are adjacent in position, and based on the pixels that have the same pixel value and are adjacent in position, a connected region in the image is obtained.

[0110] The connected region marking algorithm here may include but is not limited to: 4-adjacent algorithm and 8-adjacent algorithm. Where 4 and 8 refer to directions; taking the 4-adjacent algorithm as an example, the 4-adjacent algorithm means: if there are white pixels in the adjacent upper, adjacent lower, adjacent right, and adjacent left directions (a total of 4 directions) of the target white pixel X in the binary image, then the white pixels corresponding to the adjacent upper, adjacent lower, adjacent right, and adjacent left directions are determined to be adjacent to the target white pixel X, and the white pixels corresponding to the adjacent upper, adjacent lower, adjacent right, and adjacent left directions are marked with the same label as the target white pixel X. Continue to determine the white pixels adjacent to the white pixel corresponding to the adjacent upper direction, so that the white pixels adjacent to the white pixel corresponding to the adjacent upper direction are marked with the same label as the target white pixel X, and so on, and the connected regions in the image are formed according to the pixels with the same label. Similar to the 4-adjacent algorithm, the 8-adjacent algorithm determines the connected region by searching in the binary image whether there are white pixels in the diagonal directions (a total of 8 directions) of the target white pixel X, which will not be repeated here.

[0111] Step S202, determine whether all connected areas in the image have been marked. If all connected areas in the image have been marked, execute step S203. If there are connected areas in the image that have not been marked, continue to execute step S201 until the marking results of each connected area in the image are obtained.

[0112] Step S203: If all connected regions in the image are marked, the marking result is obtained.

[0113] Specifically, the labeling result includes the label information marked for each connected area in the image, and the index information created for each label information; the label information of each connected area is used to uniquely identify the corresponding connected area. For example, the number of connected areas contained in the image is N, N is an integer greater than 1, and the label information marked for each connected area can be expressed as label1, label2, ...labelN. The index information created for each label information can be recorded as LabelValue, and the corresponding pseudo code is:

[0114] for(i=1;i <N+1;i=i+1)

[0115] label_value(i)=get_label_val(i).

[0116] Among them, i represents the i-th label information, get_label_val(i) represents creating index information for the i-th label information by obtaining the number value of the i-th label information, and label_value(i) represents the index information created for the i-th label information.

[0117] Step S204: Generate a task scheduling strategy corresponding to the image processing task according to the marking result in the task information, the number of acceleration processing engines, and the operation information of the acceleration processing engines.

[0118] Step S205: according to the task scheduling strategy, the image processing task is assigned to the acceleration processing engine, and the acceleration processing engine performs hardware acceleration processing on the image processing task.

[0119] The specific implementation process of step S204 and step S205 can be found in the above Figure 3 Step S102 and step S103 in the corresponding embodiment will not be described in detail here.

[0120] In the embodiment of the present application, the task information corresponding to the image processing task is obtained. The image processing task is a computing task associated with the image. The task information includes the marking results carried by N connected regions in the image, where N is a positive integer. The task scheduling strategy corresponding to the image processing task is generated based on the marking results in the task information, the number of acceleration processing engines, and the running information of the acceleration processing engines. This can make full use of the characteristics of the connected region marking algorithm, and combine the running information and number of the acceleration processing engines to quickly generate the task scheduling strategy. According to the task scheduling strategy, the image processing task is assigned to the acceleration processing engine, and the image processing task is hardware accelerated by the acceleration processing engine. The acceleration processing engine is flexibly assigned to the image processing task through the task scheduling strategy, without adding additional computing resources to determine the task priority, and the image task processing can be simply and efficiently scheduled to maximize the utilization of the acceleration processing engine, thereby improving the throughput and performance of the integrated chip overall system.

[0121] See also Figure 6 , Figure 6 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 6 As shown, the computer device 1000 can be a server or a terminal device, which will not be limited here. For ease of understanding, the embodiment of the present application takes the terminal device as an example, and the computer device 1000 may include: an integrated chip 1001, a network interface 1004 and a memory 1005. In addition, the computer device 1000 may also include a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and optionally, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned integrated chip 1001. As Figure 6 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0122] Among them, Figure 6In the computer device 1000 shown, the network interface 1004 can also provide a network communication function, and the user interface 1003 is mainly used to provide an input interface for the user; and the integrated chip 1001 can be used to call the device control application stored in the memory 1005, and the integrated chip 1001 may include a task scheduling management engine and an acceleration processing engine:

[0123] The task scheduling management engine is used to obtain task information corresponding to the image processing task; the image processing task is a computing task associated with the image, and the task information includes the labeling results carried by N connected regions in the image, where N is a positive integer;

[0124] The task scheduling management engine is also used to generate a task scheduling strategy corresponding to the image processing task according to the marking result in the task information, the number of acceleration processing engines, and the operation information of the acceleration processing engines;

[0125] The task scheduling management engine is also used to assign the image processing task to the acceleration processing engine according to the task scheduling strategy;

[0126] The acceleration processing engine is used to perform hardware acceleration processing on image processing tasks.

[0127] In a feasible embodiment, the integrated chip 1001 further includes a tag processing engine;

[0128] The labeling processing engine is used to perform connected region labeling processing on the image to obtain label information of N connected regions contained in the image; the label information of each connected region is used to uniquely identify the corresponding connected region; and,

[0129] It is also used to create an index for the label information of each connected area, determine the label information of each connected area and the index created for each label information as a marking result, and write the marking result into a storage area; the storage area includes any one of a host memory, an on-chip storage unit, and an external storage device; and,

[0130] It is also used to determine the marking result and the storage location corresponding to the marked image as the task information of the image processing task, and generate a configuration command carrying the task information.

[0131] In a feasible embodiment, the tag processing engine is specifically used for:

[0132] Scan the pixels in the image, form connected regions with pixels having the same pixel value and adjacent positions in the image, mark the connected regions contained in the image, and obtain label information corresponding to the connected regions contained in the image.

[0133] In a feasible embodiment, the integrated chip 1001 further includes a bus unit;

[0134] The bus unit is used to send configuration commands carrying task information to the task scheduling management engine.

[0135] In a feasible embodiment, the task scheduling management engine is specifically used for:

[0136] Counting the number of acceleration processing engines, and obtaining performance indicators and resource utilization rates of the acceleration processing engines, and determining the performance indicators and resource utilization rates as operation information of the acceleration processing engines;

[0137] The number of label information in the labeling result is counted to obtain the number of connected regions in the image; the number of connected regions in the image is N;

[0138] A task scheduling strategy is generated for the image processing task according to the number of connected regions in the image, the number of acceleration processing engines, and the operation information of the acceleration processing engines.

[0139] In a feasible embodiment, the task scheduling management engine includes a task scheduling strategy generation unit, a command encapsulation unit and an arbitration management unit. The number of acceleration processing engines in the integrated chip 1001 is M, where M is an integer greater than 1.

[0140] The task scheduling strategy generation unit is used to configure the execution order for each connected area in the image according to the dependency relationship between each connected area in the image;

[0141] The task scheduling strategy generation unit is also used to perform load balancing according to the execution order, the number of connected areas in the image, the number of acceleration processing engines, and the operation information of the acceleration processing engines, and determine the scheduling granularity for the image processing task;

[0142] The task scheduling strategy generating unit is further used to combine the execution order and the scheduling granularity into a task scheduling strategy corresponding to the image processing task, and transmit the task scheduling strategy to the command encapsulation unit;

[0143] The command encapsulation unit is used to split the image processing task into N subtasks according to the label information in the marking result, and encapsulate the N subtasks according to the task scheduling strategy to obtain the task execution command; the N subtasks correspond to the N connected areas in the image one by one;

[0144] The arbitration management unit is used to distribute the task execution command to the M acceleration processing engines.

[0145] In a feasible embodiment, the arbitration management unit is specifically used for:

[0146] Performing format conversion on the task execution command to obtain the task execution command after format conversion, and distributing the task execution command after format conversion to M acceleration processing engines; the task execution command after format conversion is in a configuration format supported by the acceleration processing engine;

[0147] The N subtasks are assigned to the M acceleration processing engines through the task execution command after the format conversion, and the M acceleration processing engines are controlled to execute the assigned subtasks respectively;

[0148] Receive the subtask processing results returned by each of the M acceleration processing engines.

[0149] In a feasible embodiment, the integrated chip 1001 further includes a post-processing engine;

[0150] The post-processing engine is used to merge the sub-task processing results of the M acceleration processing engines to obtain the task processing result corresponding to the image processing task.

[0151] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3 and Figure 5 The description of the image processing method in any corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here.

[0152] It should be noted that, for the above-mentioned various method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some 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 and modules involved are not necessarily required by this application.

[0153] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0154] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0155] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. An image processing method, characterized in that: include: Get the task information corresponding to the image processing task; The image processing task is a computing task associated with an image, and the task information includes labeling results carried by N connected regions in the image, where N is a positive integer; Generate a task scheduling strategy corresponding to the image processing task according to the marking result in the task information, the number of acceleration processing engines, and the operation information of the acceleration processing engines; According to the task scheduling strategy, the image processing task is assigned to the acceleration processing engine, and the image processing task is subjected to hardware acceleration processing by the acceleration processing engine; The method is executed by calling an integrated chip, the integrated chip includes the acceleration processing engine and the task scheduling management engine; the task scheduling strategy corresponding to the image processing task is generated according to the marking result in the task information, the number of acceleration processing engines, and the operation information of the acceleration processing engine, including: Calling the task scheduling management engine to count the number of the acceleration processing engines, and obtaining the performance index and resource utilization rate of the acceleration processing engine, and determining the performance index and the resource utilization rate as the operation information of the acceleration processing engine; Calling the task scheduling management engine to count the number of label information in the marking result to obtain the number of connected areas in the image; the number of connected areas in the image is N; The task scheduling management engine is called to generate a task scheduling strategy for the image processing task according to the number of connected areas in the image, the number of the acceleration processing engines, and the operation information of the acceleration processing engines.

2. The method according to claim 1, characterized in that The integrated chip also includes a tag processing engine; The method further comprises: Calling the labeling processing engine to perform connected region labeling processing on the image to obtain label information of N connected regions contained in the image; the label information of each connected region is used to uniquely identify the corresponding connected region; Create an index for the label information of each connected area, determine the label information of each connected area and the index created for each label information as a marking result, and write the marking result into a storage area; the storage area includes any one of a host memory, an on-chip storage unit, and an external storage device.

3. The method according to claim 2, characterized in that The calling of the labeling processing engine to perform connected region labeling processing on the image to obtain label information of N connected regions contained in the image includes: Calling the marking processing engine to scan pixels in the image, and forming connected regions with pixels in the image that have the same pixel value and are adjacent in position; The marking processing engine is called to perform marking processing on the connected areas contained in the image to obtain label information corresponding to the connected areas contained in the image.

4. The method according to claim 1, characterized in that: The integrated chip also includes a tag processing engine and a bus unit; The method further comprises: Calling the marking processing engine to determine the marking result and the storage location corresponding to the marked image as task information of the image processing task, and generating a configuration command carrying the task information; The bus unit is called to send a configuration command carrying the task information to the task scheduling management engine.

5. The method according to claim 1, characterized in that: The task scheduling management engine includes a task scheduling strategy generation unit and a command encapsulation unit; The calling of the task scheduling management engine to generate a task scheduling strategy for the image processing task according to the number of connected areas in the image, the number of the acceleration processing engines, and the operation information of the acceleration processing engines includes: Calling the task scheduling strategy generation unit to configure an execution order for each connected region in the image according to the dependency relationship between each connected region in the image; Calling the task scheduling strategy generation unit to perform load balancing according to the execution order, the number of connected areas in the image, the number of the acceleration processing engines, and the operation information of the acceleration processing engines, and determine the scheduling granularity for the image processing task; The task scheduling strategy generating unit is called to combine the execution order and the scheduling granularity into a task scheduling strategy corresponding to the image processing task, and the task scheduling strategy is transmitted to the command encapsulation unit.

6. The method according to claim 1, characterized in that The number of the acceleration processing engines is M, the task scheduling management engine includes a command encapsulation unit and an arbitration management unit, and M is an integer greater than 1; The step of allocating the image processing task to the acceleration processing engine according to the task scheduling strategy, and performing hardware acceleration processing on the image processing task by the acceleration processing engine, comprises: Calling a command encapsulation unit in the task scheduling management engine to split the image processing task into N subtasks according to the label information in the marking result; the N subtasks correspond one-to-one to the N connected areas in the image; Calling the command encapsulation unit to perform command encapsulation on the N subtasks according to the task scheduling strategy to obtain a task execution command; Invoke the arbitration management unit in the task scheduling management engine to distribute the task execution command to the M acceleration processing engines; The N subtasks are allocated to the M acceleration processing engines through the task execution command, and the M acceleration processing engines are controlled to execute the respectively allocated subtasks.

7. The method according to claim 6, characterized in that The calling of the arbitration management unit in the task scheduling management engine to distribute the task execution command to the M acceleration processing engines includes: calling the arbitration management unit in the task scheduling management engine to convert the format of the task execution command to obtain a task execution command after the format conversion; the task execution command after the format conversion is in a configuration format supported by the M acceleration processing engines; The arbitration management unit is called to distribute the task execution command after the format conversion to the M acceleration processing engines.

8. The method according to claim 6 or 7, characterized in that: The integrated chip also includes a post-processing engine; The method further comprises: Calling the arbitration management unit to receive the subtask processing results returned by each of the M acceleration processing engines; The post-processing engine is called to merge the sub-task processing results of the M acceleration processing engines to obtain the task processing result corresponding to the image processing task.

9. An integrated chip, characterized in that: The integrated chip includes a task scheduling management engine and an acceleration processing engine: The task scheduling management engine is used to obtain task information corresponding to an image processing task; the image processing task is a computing task associated with an image, and the task information includes labeling results carried by N connected regions in the image, where N is a positive integer; The task scheduling management engine is further used to generate a task scheduling strategy corresponding to the image processing task according to the marking result in the task information, the number of the acceleration processing engines, and the operation information of the acceleration processing engines; The task scheduling management engine is further used to assign the image processing task to the acceleration processing engine according to the task scheduling strategy; The acceleration processing engine is used to perform hardware acceleration processing on the image processing task; The task scheduling management engine is specifically used for: Counting the number of the accelerated processing engines, and obtaining performance indicators and resource utilization rates of the accelerated processing engines, and determining the performance indicators and resource utilization rates as operation information of the accelerated processing engines; Counting the number of label information in the marking result to obtain the number of connected regions in the image; the number of connected regions in the image is N; A task scheduling strategy is generated for the image processing task according to the number of connected areas in the image, the number of the acceleration processing engines, and the operation information of the acceleration processing engines.

10. The integrated chip according to claim 9, characterized in that: The integrated chip also includes a tag processing engine; The labeling processing engine is used to perform connected region labeling processing on the image to obtain label information of N connected regions contained in the image; the label information of each connected region is used to uniquely identify the corresponding connected region; as well as, It is also used to create an index for the label information of each connected area, determine the label information of each connected area and the index created for each label information as a marking result, and write the marking result into a storage area; the storage area includes any one of a host memory, an on-chip storage unit, and an external storage device; and, It is also used to determine the marking result and the storage location corresponding to the marked image as the task information of the image processing task, and generate a configuration command carrying the task information.

11. The integrated chip according to claim 10, characterized in that: The tag processing engine is specifically used for: Scan pixels in the image, group pixels in the image that have the same pixel value and are adjacent in position into connected areas, perform labeling processing on the connected areas contained in the image, and obtain label information corresponding to the connected areas contained in the image.

12. The integrated chip according to claim 10, characterized in that: The integrated chip also includes a bus unit; The bus unit is used to send a configuration command carrying the task information to the task scheduling management engine.

13. The integrated chip according to claim 9, characterized in that: The task scheduling management engine includes a task scheduling strategy generation unit, a command encapsulation unit and an arbitration management unit. The number of the acceleration processing engines in the integrated chip is M, where M is an integer greater than 1. The task scheduling strategy generating unit is used to configure the execution order for each connected area in the image according to the dependency relationship between each connected area in the image; The task scheduling strategy generating unit is further used to perform load balancing according to the execution order, the number of connected areas in the image, the number of the acceleration processing engines, and the operation information of the acceleration processing engines, and determine the scheduling granularity for the image processing task; The task scheduling strategy generating unit is further used to combine the execution order and the scheduling granularity into a task scheduling strategy corresponding to the image processing task, and transmit the task scheduling strategy to the command encapsulation unit; The command encapsulation unit is used to split the image processing task into N subtasks according to the label information in the marking result, and perform command encapsulation on the N subtasks according to the task scheduling strategy to obtain a task execution command; the N subtasks correspond one-to-one to the N connected areas in the image; The arbitration management unit is used to distribute the task execution command to M acceleration processing engines.

14. The integrated chip according to claim 13, characterized in that: The arbitration management unit is specifically used for: Performing format conversion on the task execution command to obtain a task execution command after format conversion, and distributing the task execution command after format conversion to the M acceleration processing engines; the task execution command after format conversion is in a configuration format supported by the acceleration processing engine; Allocating the N subtasks to the M acceleration processing engines through the task execution command after the format conversion, and controlling the M acceleration processing engines to execute the respectively allocated subtasks; Receive the subtask processing results returned by each of the M acceleration processing engines.

15. The integrated chip according to claim 13 or 14, characterized in that: The integrated chip also includes a post-processing engine; The post-processing engine is used to merge the sub-task processing results of the M acceleration processing engines to obtain the task processing result corresponding to the image processing task.

16. A computer device, characterized in that: The computer device comprises the integrated chip according to any one of claims 9 to 15, so that the computer device executes the method according to any one of claims 1 to 8.