A GPU cluster-based image processing service method

By performing function calibration and independent value determination on the GPU cluster, and selecting an appropriate processing path, the problem of multiple preprocessing in GPU cluster image processing is solved and the processing efficiency is improved.

CN117934257BActive Publication Date: 2024-09-03中科云达(北京)科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311657619.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-05
Publication Date
2024-09-03
Estimated Expiration
2043-12-05

AI Technical Summary

Technical Problem

GPU clusters have the problem of multiple preprocessing during image processing, which affects processing efficiency.

Method used

By counting the image processing requirements, the GPU cluster is functionally calibrated, and the preset cache queue is used to receive the original image in real time, determine the independent value of the image, and select the processing path based on the independent value to optimize the image processing process.

Benefits of technology

Only one preprocessing process is required, which significantly improves image processing efficiency, especially when the number of images to be processed is large.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117934257B
    Figure CN117934257B
Patent Text Reader

Abstract

The present invention relates to the field of microprocessor management technology, and specifically discloses an image processing service method based on a GPU cluster. The method comprises counting processing requirements of all original images and calibrating functions of GPUs in the GPU cluster; receiving original images in real time based on a preset cache queue, traversing each original image in the cache queue at a regular interval, and determining independent values ​​of the original images; reading original images in the cache queue in sequence, and comparing the independent values ​​of the original images with a preset independent value threshold; when the independent value reaches the preset independent value threshold, selecting a processing path in the GPU cluster according to processing requirements; the present invention limits the functions of each GPU in the GPU cluster, so that each GPU is specially used to complete a specific task, optimizes the preprocessing process of the image processing process, and only needs to perform the preprocessing process once to perform the same processing on all images, which greatly improves the processing efficiency when the number of images to be processed is large.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of microprocessor management technology, in particular to an image processing service method based on a GPU cluster. Background Art

[0002] A GPU cluster is a collection of multiple GPU units, which is hardware for processing images; the function of a GPU is similar to that of a CPU, and most of them are not limited to completing certain specific processing processes, which means that the GPUs in a GPU cluster are the same; the logical architecture of this mode is relatively simple, which is equivalent to a combination of multiple GPUs. When receiving an image processing task, the image is processed together, which can greatly improve the processing speed. However, this processing method has certain shortcomings, that is, the pre-preparation process before image processing will be executed multiple times, which affects the processing efficiency to a certain extent. How to optimize the image processing process of a GPU cluster is a technical problem that the present invention wants to solve. Summary of the invention

[0003] The purpose of the present invention is to provide an image processing service method based on a GPU cluster to solve the problems raised in the above background technology.

[0004] To achieve the above object, the present invention provides the following technical solutions:

[0005] A GPU cluster-based image processing service method, the method comprising:

[0006] Count the processing requirements of all original images and perform functional calibration on the GPUs in the GPU cluster;

[0007] Receiving the original image in real time based on a preset cache queue, periodically traversing each original image in the cache queue, and determining an independent value of the original image; the independent value is used to characterize the similarity between the image and other images;

[0008] Reading original images in the cache queue in sequence, and comparing the independent values ​​of the original images with a preset independent value threshold;

[0009] When the independent value reaches the preset independent value threshold, a processing path is selected in the GPU cluster according to the processing requirements; when the independent value is less than the preset independent value threshold, the processing path of the previous image is selected as the processing path of the current image;

[0010] The processing path is the type of GPU that the image processing process passes through.

[0011] As a further solution of the present invention: the step of counting the processing requirements of all original images and performing functional calibration on the GPUs in the GPU cluster includes:

[0012] Traverse the image set uploaded by the user with the required tags and synchronously calculate the data volume of the image set;

[0013] Determine the demand quantity of each demand tag according to the data quantity;

[0014] The distribution density of each demand tag is determined according to the demand quantity, and the function of the GPU in the GPU cluster is limited based on the distribution density; wherein the reference point of the function limitation is randomly selected; during the function limitation process, the demand tag is inserted into the index of the corresponding GPU.

[0015] As a further solution of the present invention: the step of receiving the original image in real time based on the preset cache queue, periodically traversing each original image in the cache queue, and determining the independent value of the original image includes:

[0016] Receive original images in real time based on a preset cache queue;

[0017] Performing spatial transformation on the original image, extracting HSV components, and binarizing the components;

[0018] Taking the original image as the center, read the original images of the preset sequence span, compare the binary images corresponding to the two original images, and determine the similarity;

[0019] When the similarity reaches a preset similarity threshold, the sequence span is incremented and the process is executed cyclically; when the similarity is less than the preset similarity threshold, an independent value is calculated according to the current sequence span and the similarity generated during the cyclic execution;

[0020] The calculation process of the independent value is:

[0021] In the formula, D is N is the sequence span, S i is the similarity between the image with sequence span i and the current image.

[0022] As a further solution of the present invention, the steps of taking the original image as the center, reading the original images of a preset sequence span, comparing the binary images corresponding to the two original images, and determining the similarity include:

[0023] Taking the original image as the center, read another original image of a preset sequence span to obtain the two sides for comparison;

[0024] Read the binary images of both parties and perform a logical AND operation on the binary images to obtain a fitting image;

[0025] Perform a logical XOR operation on the fitted image and the current original image to obtain a difference image;

[0026] Analyze the difference images and determine the similarity;

[0027] The similarity calculation rule is as follows:

[0028] In the formula, S is the similarity, N and M are the sizes of the fitted images, and Z ij To fit the pixel value of point (i, j) in the image, f() is a decreasing function of the value in brackets.

[0029] As a further solution of the present invention: when the independent value reaches a preset independent value threshold, the step of selecting a processing path in the GPU cluster according to the processing requirements includes:

[0030] Comparing the independent value with a preset independent value threshold;

[0031] When the independence value reaches a preset independence value threshold, traverse the GPU cluster according to the processing requirements and mark the target GPU;

[0032] The occupancy rate of the target GPU is queried, and the target GPU is selected in sequence according to the occupancy rate as a processing path.

[0033] As a further solution of the present invention, the step of querying the occupancy rate of the target GPU and selecting the target GPU in sequence according to the occupancy rate as a processing path includes:

[0034] Query the occupancy rate of the target GPU, and determine the selection order of each GPU under different requirement tags according to the occupancy rate;

[0035] Based on the selection order, the GPUs under each requirement label are selected and combined in sequence to obtain a candidate path;

[0036] The path length of the candidate path is calculated, and a final path is selected according to the path length as the processing path.

[0037] The present invention also provides an image processing service system based on a GPU cluster, the system comprising:

[0038] Function calibration module, used to count the processing requirements of all original images and perform function calibration on GPUs in the GPU cluster;

[0039] An independent value determination module is used to receive the original image in real time based on a preset cache queue, periodically traverse each original image in the cache queue, and determine the independent value of the original image; the independent value is used to represent the similarity between the image and other images;

[0040] An independent value comparison module is used to read the original images in the cache queue in sequence and compare the independent values ​​of the original images with a preset independent value threshold;

[0041] A path selection module is used to select a processing path in the GPU cluster according to processing requirements when the independent value reaches a preset independent value threshold; when the independent value is less than the preset independent value threshold, select the processing path of the previous image as the processing path of the current image;

[0042] The processing path is the type of GPU that the image processing process passes through.

[0043] As a further solution of the present invention: the function calibration module includes:

[0044] A data volume calculation unit, used to traverse the image set uploaded by the user and containing the required tags, and synchronously calculate the data volume of the image set;

[0045] A demand quantity determination unit, used to determine the demand quantity of each demand tag according to the data quantity;

[0046] A limiting execution unit is used to determine the distribution density of each demand tag according to the demand quantity, and to limit the functions of the GPUs in the GPU cluster based on the distribution density; wherein the reference point of the function limitation is randomly selected; during the function limitation process, the demand tag is inserted into the index of the corresponding GPU.

[0047] As a further solution of the present invention: the independent value determination module includes:

[0048] An image receiving unit, used for receiving the original image in real time based on a preset cache queue;

[0049] An image processing unit, used for performing spatial transformation on the original image, extracting HSV components, and binarizing the components;

[0050] A similarity determination unit is used to read the original images of a preset sequence span with the original image as the center, compare the binary images corresponding to the two original images, and determine the similarity;

[0051] A loop execution unit, configured to, when the similarity reaches a preset similarity threshold, increment the sequence span and execute the loop, and when the similarity is less than the preset similarity threshold, calculate an independent value according to the current sequence span and the similarity generated during the loop execution;

[0052] The calculation process of the independent value is:

[0053] In the formula, D is N is the sequence span, S i is the similarity between the image with sequence span i and the current image.

[0054] As a further solution of the present invention: the similarity determination unit includes:

[0055] The two-party determination subunit is used to read another original image of a preset sequence span with the original image as the center to obtain the two parties to be compared;

[0056] The first operator unit is used to read the binary images of the two comparison parties, perform a logical AND operation on the binary images, and obtain a fitting image;

[0057] The second operator unit is used to perform a logical XOR operation on the fitted image and the current original image to obtain a difference image;

[0058] An image analysis subunit, used to analyze the difference images and determine the similarity;

[0059] The similarity calculation rule is as follows:

[0060] In the formula, S is the similarity, N and M are the sizes of the fitted images, and Z ij To fit the pixel value of point (i, j) in the image, f() is a decreasing function of the value in brackets.

[0061] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention limits the functions of each GPU in the GPU cluster so that each GPU is specifically used to complete a specific task, optimizes the preprocessing process of the image processing process, and only requires one preprocessing process to perform the same processing on all images. When the number of images to be processed is large, the processing efficiency is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention.

[0063] Figure 1 The flowchart of the image processing service method based on GPU cluster is shown in FIG.

[0064] Figure 2 The first sub-flow chart of the method for image processing service based on GPU cluster.

[0065] Figure 3 This is a second sub-flow chart of the GPU cluster-based image processing service method.

[0066] Figure 4 The third sub-process flowchart of the image processing service method based on GPU cluster.

[0067] Figure 5 This is a structural block diagram of the image processing service system based on GPU cluster. DETAILED DESCRIPTION

[0068] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0069] Figure 1 The flowchart of the image processing service method based on GPU cluster is as follows. In an embodiment of the present invention, an image processing service method based on GPU cluster includes:

[0070] Step S100: Counting the processing requirements of all original images and calibrating the functions of the GPUs in the GPU cluster;

[0071] GPU is hardware for processing images, and its function is similar to that of CPU. It can complete many tasks and is not limited to completing certain specific processing processes. That is, each GPU in a GPU cluster is the same. The logical architecture of this mode is relatively simple, which is equivalent to a combination of multiple GPUs. When receiving an image processing task, they process the image together to increase the processing speed. In the technical solution of the present invention, the function of each GPU in the GPU cluster is limited, so that each GPU is dedicated to completing a specific task. The advantage of doing so is that the preprocessing process of the image processing process is optimized. Only one preprocessing process is required to perform the same processing on all images (if the processing requirements are constantly updated, multiple preprocessing processes are required).

[0072] Step S200: receiving the original image in real time based on a preset cache queue, periodically traversing each original image in the cache queue, and determining an independent value of the original image; the independent value is used to represent the degree of similarity between the image and other images;

[0073] Step S200 is the actual application process, in which the cache queue receives the original image, which is the image that needs to be processed. The function of the cache queue is to make the image output more orderly and controllable (buffering effect). In addition, the images in the cache queue can be analyzed to select some more important images. Whether the image is important is represented by the numerical value of the independent value.

[0074] The independence value is used to characterize the similarity between an image and other images. Generally, the more similar an image is to the images around it, the lower its independence value is.

[0075] Step S300: reading original images in the cache queue in sequence, and comparing the independent value of the original image with a preset independent value threshold;

[0076] The original images are read in sequence in the cache queue (data is read from the cache queue). The reading frequency can be set independently by the management party and will not be affected by network transmission fluctuations. While reading the original image, the independent value of the original image is compared with the preset independent value threshold to distinguish the original image and determine which processing process to select.

[0077] Step S400: when the independent value reaches a preset independent value threshold, a processing path is selected in the GPU cluster according to the processing requirements; when the independent value is less than the preset independent value threshold, a processing path of the previous image is selected as the processing path of the current image; wherein the processing path is the type of GPU that the image processing process passes through;

[0078] In one example of the technical solution of the present invention, if the independence value of an image is high enough, then it needs to be analyzed independently to determine the image processing process that needs to be performed; for images with lower independence values, considering efficiency or computing resources, the previous image processing process can be used to process the image. The reason for doing so is that if the independence value is low, then it has a high degree of similarity with the surrounding images, and using the same processing process will not result in too much error.

[0079] Figure 2 This is a first sub-flow diagram of the image processing service method based on a GPU cluster. The steps of counting the processing requirements of all original images and performing functional calibration on the GPUs in the GPU cluster include:

[0080] Step S101: traverse the image set uploaded by the user containing the required tags, and synchronously calculate the data volume of the image set;

[0081] Step S102: determining the demand quantity of each demand tag according to the data quantity;

[0082] Step S103: determining the distribution density of each demand tag according to the demand, and performing function limitation on the GPUs in the GPU cluster based on the distribution density; wherein the reference point for function limitation is randomly selected; and during the function limitation process, inserting the demand tag into the index of the corresponding GPU.

[0083] In an example of the technical solution of the present invention, a specific description is given of the function limitation process of the GPU, the purpose of which is very simple, that is, to allocate limited GPUs to different demand tags; the specific allocation process is:

[0084] Receive an image set with a demand tag uploaded by a user. The processing requirements of images in the same image set are mostly the same (possibly not unique). Determine the demand for the demand tag based on the size of the image set. Count the demand for all demand tags corresponding to all image sets to obtain the total demand for various demand tags. Thus, determine the distribution density; the distribution density is the percentage of GPUs that can complete the demand tag among the total GPUs.

[0085] The functions of GPUs are limited based on the distribution density, so that each GPU can only complete one or a limited number of processing requirements.

[0086] It is worth mentioning that it is not enough to limit the functions of each GPU only by the distribution density. It is also necessary to set a reference point (the position of a certain GPU), and the process of setting the reference point is random.

[0087] Figure 3 The second sub-flow diagram of the image processing service method based on the GPU cluster, wherein the steps of receiving the original image in real time based on the preset cache queue, periodically traversing each original image in the cache queue, and determining the independent value of the original image include:

[0088] Step S201: receiving the original image in real time based on a preset cache queue;

[0089] Step S202: performing spatial transformation on the original image, extracting HSV components, and binarizing the components;

[0090] Step S203: taking the original image as the center, reading the original images of a preset sequence span, comparing the binary images corresponding to the two original images, and determining the similarity;

[0091] Step S204: when the similarity reaches a preset similarity threshold, the sequence span is incremented and the process is executed cyclically; when the similarity is less than the preset similarity threshold, an independent value is calculated according to the current sequence span and the similarity generated during the cyclic execution;

[0092] The calculation process of the independent value is:

[0093] In the formula, D is N is the sequence span, S is i is the similarity between the image with sequence span i and the current image.

[0094] In an example of the technical solution of the present invention, the calculation process of the independent value is limited. The core principle of the independent value is to calculate the similarity between an image and its surrounding images, as follows:

[0095] The original image is received by the cache queue and stays in the cache queue for a period of time. The original image is processed and the RGB image is converted into an HSV image. During the image processing, the HSV image is more consistent with human perception and is more easily recognized by humans when performing contour segmentation. Each component of the HSV image is binarized (the reference threshold of the binarization is set independently by the management party, and the median is usually taken) to obtain a binarized image. By comparing the binarization results of different images, the similarity between the two can be determined.

[0096] Regarding the two parties to be compared, one is the current original image, and the other is the previous or next few images. The specific number of images is represented by the sequence span. The sequence span starts from the beginning and increases continuously until the similarity is small enough. At this time, the independent value can be calculated from the sequence span and each similarity.

[0097] The calculation process of the independent value is:

[0098] In the formula, D is N is the sequence span, S is i is the similarity between the image with sequence span i and the current image.

[0099] As a preferred embodiment of the technical solution of the present invention, the steps of taking the original image as the center, reading the original images of a preset sequence span, comparing the binary images corresponding to the two original images, and determining the similarity include:

[0100] Taking the original image as the center, read another original image of a preset sequence span to obtain the two sides for comparison;

[0101] Read the binary images of both parties and perform a logical AND operation on the binary images to obtain a fitting image;

[0102] Perform a logical XOR operation on the fitted image and the current original image to obtain a difference image;

[0103] Analyze the difference images and determine the similarity.

[0104] The above content provides a specific similarity determination scheme. First, the two sides of the comparison are read according to the order span, and their binary images are read. The binary images are operated with logic and operation to obtain which pixels in the two images are the same, which are reflected by the fitting image. Then, the current image and the fitting image are compared to determine which pixels are different. Moreover, the values ​​at the positions corresponding to different pixels are 1. The more pixels that are 1, the greater the difference between it and the fitting image. The fitting image represents the similarity between the two images. The greater the difference, the lower the similarity and the higher the independence value.

[0105] The similarity calculation rule is as follows:

[0106] In the formula, S is the similarity, N and M are the sizes of the fitted images, and Z ij To fit the pixel value of point (i, j) in the image, f() is a decreasing function of the value in brackets.

[0107] Figure 4 The third sub-flow chart of the image processing service method based on the GPU cluster is as follows. When the independent value reaches a preset independent value threshold, the step of selecting a processing path in the GPU cluster according to the processing requirements includes:

[0108] Step S301: comparing the independent value with a preset independent value threshold;

[0109] Step S302: when the independent value reaches a preset independent value threshold, traverse the GPU cluster according to processing requirements and mark the target GPU;

[0110] Step S303: query the occupancy rate of the target GPU, and select the target GPU in turn according to the occupancy rate as the processing path.

[0111] The above content limits the selection process of the processing path, which mainly limits the determination process of the processing path. This process will only be entered when the similarity between the image and other images is small enough (the independent value is large enough). When the independent value reaches the preset independent value threshold, the matching GPU is queried according to the required label, and then the various GPUs are connected to obtain the processing path.

[0112] Specifically, the step of querying the occupancy rate of the target GPU and selecting the target GPU in sequence according to the occupancy rate as the processing path includes:

[0113] Query the occupancy rate of the target GPU, and determine the selection order of each GPU under different requirement tags according to the occupancy rate;

[0114] Based on the selection order, the GPUs under each requirement label are selected and combined in sequence to obtain a candidate path;

[0115] The path length of the candidate path is calculated, and a final path is selected according to the path length as the processing path.

[0116] As a preferred embodiment of the technical solution of the present invention, a selection process based on path length is introduced on the basis of determining the processing path. That is, when querying for matching GPUs, multiple GPUs can be queried, and the combination of these GPUs is not unique. While combining these GPUs, a judgment process on the path length is introduced to obtain the final processing path. The advantage of this process is that some longer processing paths can be eliminated, reducing data transmission pressure.

[0117] In fact, when selecting a GPU, the occupancy rate parameter has been introduced. On this basis, the path length parameter is introduced to obtain a relatively excellent combination. As for what situation is considered excellent, the management inputs the judgment conditions, such as entering a length threshold and an average order threshold (representing occupancy rate).

[0118] Figure 5 The structure diagram of the image processing service system based on GPU cluster is shown in FIG. 1 . The technical solution of the present invention further provides an image processing service system based on GPU cluster, characterized in that the system 10 includes:

[0119] A function calibration module 11 is used to count the processing requirements of all original images and perform function calibration on the GPUs in the GPU cluster;

[0120] The independent value determination module 12 is used to receive the original image in real time based on a preset cache queue, periodically traverse each original image in the cache queue, and determine the independent value of the original image; the independent value is used to represent the similarity between the image and other images;

[0121] The independent value comparison module 13 is used to read the original images in the cache queue in sequence and compare the independent values ​​of the original images with a preset independent value threshold;

[0122] The path selection module 14 is used to select a processing path in the GPU cluster according to the processing requirements when the independent value reaches a preset independent value threshold; when the independent value is less than the preset independent value threshold, select the processing path of the previous image as the processing path of the current image;

[0123] The processing path is the type of GPU that the image processing process passes through.

[0124] Furthermore, the function calibration module 11 includes:

[0125] A data volume calculation unit, used to traverse the image set uploaded by the user and containing the required tags, and synchronously calculate the data volume of the image set;

[0126] A demand quantity determination unit, used to determine the demand quantity of each demand tag according to the data quantity;

[0127] A limiting execution unit is used to determine the distribution density of each demand tag according to the demand quantity, and to limit the functions of the GPUs in the GPU cluster based on the distribution density; wherein the reference point of the function limitation is randomly selected; during the function limitation process, the demand tag is inserted into the index of the corresponding GPU.

[0128] Specifically, the independent value determination module 12 includes:

[0129] An image receiving unit, used for receiving the original image in real time based on a preset cache queue;

[0130] An image processing unit, used for performing spatial transformation on the original image, extracting HSV components, and binarizing the components;

[0131] A similarity determination unit is used to read the original images of a preset sequence span with the original image as the center, compare the binary images corresponding to the two original images, and determine the similarity;

[0132] A loop execution unit, configured to, when the similarity reaches a preset similarity threshold, increment the sequence span and execute the loop, and when the similarity is less than the preset similarity threshold, calculate an independent value according to the current sequence span and the similarity generated during the loop execution;

[0133] The calculation process of the independent value is:

[0134] In the formula, D is N is the sequence span, S i is the similarity between the image with sequence span i and the current image.

[0135] Wherein, the similarity determination unit comprises:

[0136] The two-party determination subunit is used to read another original image of a preset sequence span with the original image as the center to obtain the two parties to be compared;

[0137] The first operator unit is used to read the binary images of the two comparison parties, perform a logical AND operation on the binary images, and obtain a fitting image;

[0138] The second operator unit is used to perform a logical XOR operation on the fitted image and the current original image to obtain a difference image;

[0139] An image analysis subunit, used to analyze the difference images and determine the similarity;

[0140] The similarity calculation rule is as follows:

[0141] In the formula, S is the similarity, N and M are the sizes of the fitted images, and Z ij To fit the pixel value of point (i, j) in the image, f() is a decreasing function of the value in brackets.

[0142] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. An image processing service method based on GPU cluster, It is characterized in that The method comprises: Count the processing requirements of all original images and perform functional calibration on the GPUs in the GPU cluster; Receiving the original image in real time based on a preset cache queue, periodically traversing each original image in the cache queue, and determining an independent value of the original image; the independent value is used to characterize the similarity between the image and other images; Reading original images in the cache queue in sequence, and comparing the independent values ​​of the original images with a preset independent value threshold; When the independent value reaches the preset independent value threshold, a processing path is selected in the GPU cluster according to the processing requirements; when the independent value is less than the preset independent value threshold, the processing path of the previous image is selected as the processing path of the current image; Wherein, the processing path is the type of GPU that the image processing process passes through; The step of receiving the original image in real time based on the preset cache queue, periodically traversing each original image in the cache queue, and determining the independent value of the original image includes: Receive original images in real time based on a preset cache queue; Performing spatial transformation on the original image, extracting HSV components, and binarizing the components; Taking the original image as the center, read the original images of the preset sequence span, compare the binary images corresponding to the two original images, and determine the similarity; When the similarity reaches a preset similarity threshold, the sequence span is incremented and the process is executed cyclically; when the similarity is less than the preset similarity threshold, an independent value is calculated according to the current sequence span and the similarity generated during the cyclic execution; The calculation process of the independent value is: In the formula, D is the independent value, N is the sequence span, S i is the similarity between the image with sequence span i and the current image; The steps of taking the original image as the center, reading the original images of the preset sequence span, comparing the binary images corresponding to the two original images, and determining the similarity include: Taking the original image as the center, read another original image of a preset sequence span to obtain the two sides for comparison; Read the binary images of both parties and perform a logical AND operation on the binary images to obtain a fitting image; Perform a logical XOR operation on the fitted image and the current original image to obtain a difference image; Analyze the difference images and determine the similarity; The similarity calculation rule is as follows: In the formula, S is the similarity, N and M are the sizes of the fitted images, and Z ij To fit the pixel value of point (i, j) in the image, f() is a decreasing function of the value in brackets.

2. The image processing service method based on GPU cluster according to claim 1, It is characterized in that The step of counting the processing requirements of all original images and calibrating the functions of the GPUs in the GPU cluster includes: Traverse the image set uploaded by the user with the required tags and synchronously calculate the data volume of the image set; Determine the demand quantity of each demand tag according to the data quantity; The distribution density of each demand tag is determined according to the demand quantity, and the function of the GPU in the GPU cluster is limited based on the distribution density; wherein the reference point of the function limitation is randomly selected; during the function limitation process, the demand tag is inserted into the index of the corresponding GPU.

3. The GPU cluster-based image processing service method according to claim 1, It is characterized in that When the independent value reaches a preset independent value threshold, the step of selecting a processing path in the GPU cluster according to the processing requirements includes: Comparing the independent value with a preset independent value threshold; When the independence value reaches a preset independence value threshold, traverse the GPU cluster according to the processing requirements and mark the target GPU; The occupancy rate of the target GPU is queried, and the target GPU is selected in sequence according to the occupancy rate as a processing path.

4. The GPU cluster-based image processing service method according to claim 3, It is characterized in that The step of querying the occupancy rate of the target GPU and selecting the target GPU in sequence according to the occupancy rate as a processing path includes: Query the occupancy rate of the target GPU, and determine the selection order of each GPU under different requirement tags according to the occupancy rate; Based on the selection order, the GPUs under each requirement label are selected and combined in sequence to obtain a candidate path; The path length of the candidate path is calculated, and a final path is selected according to the path length as the processing path.

5. An image processing service system based on GPU cluster, It is characterized in that The system comprises: Function calibration module, used to count the processing requirements of all original images and perform function calibration on GPUs in the GPU cluster; An independent value determination module is used to receive the original image in real time based on a preset cache queue, periodically traverse each original image in the cache queue, and determine the independent value of the original image; the independent value is used to represent the similarity between the image and other images; An independent value comparison module is used to read the original images in the cache queue in sequence and compare the independent values ​​of the original images with a preset independent value threshold; A path selection module is used to select a processing path in the GPU cluster according to processing requirements when the independent value reaches a preset independent value threshold; when the independent value is less than the preset independent value threshold, select the processing path of the previous image as the processing path of the current image; Wherein, the processing path is the type of GPU that the image processing process passes through; The independent value determination module comprises: An image receiving unit, used for receiving the original image in real time based on a preset cache queue; An image processing unit, used for performing spatial transformation on the original image, extracting HSV components, and binarizing the components; A similarity determination unit is used to read the original images of a preset sequence span with the original image as the center, compare the binary images corresponding to the two original images, and determine the similarity; A loop execution unit, configured to, when the similarity reaches a preset similarity threshold, increment the sequence span and execute the loop, and when the similarity is less than the preset similarity threshold, calculate an independent value according to the current sequence span and the similarity generated during the loop execution; The calculation process of the independent value is: In the formula, D is the independent value, N is the sequence span, S i is the similarity between the image with sequence span i and the current image; The similarity determination unit comprises: The two-party determination subunit is used to read another original image of a preset sequence span with the original image as the center to obtain the two parties to be compared; The first operator unit is used to read the binary images of the two comparison parties, perform a logical AND operation on the binary images, and obtain a fitting image; The second operator unit is used to perform a logical XOR operation on the fitted image and the current original image to obtain a difference image; An image analysis subunit, used to analyze the difference images and determine the similarity; The similarity calculation rule is as follows: In the formula, S is the similarity, N and M are the sizes of the fitted images, and Z ij To fit the pixel value of point (i, j) in the image, f() is a decreasing function of the value in brackets.

6. The GPU cluster-based image processing service system according to claim 5, It is characterized in that The function calibration module comprises: A data volume calculation unit, used to traverse the image set uploaded by the user and containing the required tags, and synchronously calculate the data volume of the image set; A demand quantity determination unit, used to determine the demand quantity of each demand tag according to the data quantity; A limiting execution unit is used to determine the distribution density of each demand tag according to the demand quantity, and to limit the functions of the GPUs in the GPU cluster based on the distribution density; wherein the reference point of the function limitation is randomly selected; during the function limitation process, the demand tag is inserted into the index of the corresponding GPU.