Human body model rendering method, system and storage medium based on multithreading

By classifying, sorting, and distributing human model images in the cloud rendering system, based on thread processing volume and image attributes, the problem of rendering time differences in cloud rendering is solved, and efficient human model rendering is achieved.

CN114782601BActive Publication Date: 2024-08-23HANGZHOU YOULIAN TIMES TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210394844.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-14
Publication Date
2024-08-23
Estimated Expiration
2042-04-14

AI Technical Summary

Technical Problem

During the cloud rendering process, the human body model images sent by different mobile terminals have different resolutions and rendering methods, resulting in differences in rendering times. There is a lack of effective technical solutions to reasonably distribute the images based on thread work conditions and image attributes to improve rendering efficiency.

Method used

By obtaining the human body model images to be processed and rendering demand data sent by each user terminal, they are classified, sorted and distributed to the corresponding rendering threads. Reasonable allocation is made based on image attributes and thread processing volume, and multi-thread processing is used to improve rendering efficiency.

Benefits of technology

It achieves efficient rendering of human model images in high-concurrency scenarios, improves rendering efficiency, ensures that each rendering thread gets tasks that match its processing capabilities, and reduces rendering time differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782601B
    Figure CN114782601B
Patent Text Reader

Abstract

The present invention provides a human body model rendering method, system and storage medium based on multi-threading, which specifically include: obtaining a human body model image to be processed and corresponding rendering requirement data sent by each user terminal at the current moment, classifying the human body model image to be processed according to one-dimensional rendering information in the rendering requirement data to obtain a plurality of first-category human body model images to be processed; sorting the first-category human body model images to be processed according to the rendering requirement information according to a first preset order to obtain a rendering requirement sorting result; determining a plurality of first-category rendering threads corresponding to the human body model image to be processed according to the rendering requirement data; sorting the plurality of rendering threads according to a second preset order according to current processing volume information to obtain a rendering volume sorting result; and distributing the first-category human body model images to be processed to corresponding rendering threads for rendering according to the rendering requirement sorting result and the rendering volume sorting result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and in particular to a multi-threaded human body model rendering method, system and storage medium. Background Art

[0002] In the image rendering process, there are many methods such as local rendering and cloud rendering. With the development of random cloud technology and image processing technology, cloud rendering is increasingly needed by the public. In the cloud rendering process, users can send the human model image to be rendered to the cloud server through the user terminal. The cloud server renders the human model image according to the corresponding needs and sends it back to the corresponding cloud.

[0003] During the rendering process, the cloud server generally performs rendering through the coordinated control of the CPU and GPU. There is a certain relationship between the rendering speed and the number of threads composed of the CPU and GPU. Generally speaking, the more threads composed of the CPU and GPU, the faster the cloud server renders the human body model images sent by multiple mobile terminals.

[0004] In the actual rendering scenario, the resolutions of the human body model images to be rendered sent by different mobile terminals are different, and the rendering methods are also different, so there will be certain differences in the rendering time. Therefore, a technical solution is urgently needed that can distribute the human body model images according to the different working conditions of the threads and the different attributes of the human body model images. Summary of the invention

[0005] The embodiments of the present invention provide a multi-threaded human body model rendering method, system and storage medium, which can distribute human body model images and obtain corresponding rendering time according to different working conditions of threads and different attributes of human body model images, and reasonably allocate human body model images among multiple threads in concurrent scenarios, thereby improving the rendering efficiency of human body model images.

[0006] A first aspect of an embodiment of the present invention provides a multi-threaded human body model rendering method, including a cloud server and multiple user terminals connected to the cloud server, and rendering human body model images sent by the multiple user terminals through the following steps, specifically including:

[0007] Acquire the human body model images to be processed and the corresponding rendering requirement data sent by each user terminal at the current moment, and classify the human body model images to be processed according to the one-dimensional rendering information in the rendering requirement data to obtain a plurality of human body model images to be processed of the first category;

[0008] Calculating rendering requirement information according to the image information and two-dimensional rendering information of each first-category human body model image to be processed, and sorting the first-category human body model images to be processed according to the rendering requirement information in a first preset order to obtain a rendering requirement sorting result;

[0009] Determine, according to the rendering requirement data, a plurality of first-category rendering threads corresponding to the human body model image to be processed;

[0010] Calculating the image attributes and the number of images of the human body model images in each rendering thread to generate current processing volume information of the thread at the current moment, and sorting the multiple rendering threads according to a second preset order according to the current processing volume information to obtain a rendering volume sorting result;

[0011] According to the rendering requirement sorting result and the rendering amount sorting result, the first category of to-be-processed human body model images are distributed to corresponding rendering threads for rendering.

[0012] Optionally, in a possible implementation manner of the first aspect, in the step of obtaining the human body model image to be processed and the corresponding rendering requirement data sent by each user terminal at the current moment, and classifying the human body model image to be processed according to the one-dimensional rendering information in the rendering requirement data to obtain a plurality of human body model images of the first category to be processed, specifically includes:

[0013] If the one-dimensional rendering information is a fusion rendering mode, a plurality of processed human body model images of the first category being a fusion rendering category are obtained;

[0014] If the one-dimensional rendering information is a pixel adjustment rendering mode, a plurality of processed human body model images of the first category of pixel adjustment rendering are obtained.

[0015] Optionally, in a possible implementation manner of the first aspect, in the step of calculating rendering requirement information according to the image information and the two-dimensional rendering information of each first-category human body model image to be processed, and sorting the first-category human body model images to be processed in a first preset order according to the rendering requirement information to obtain a rendering requirement sorting result, specifically includes:

[0016] If the first category is a fusion rendering category, determining other fusion rendering images according to the two-dimensional rendering information;

[0017] Calculating rendering requirement information according to the number of pixel points in the image information of the human body model image to be processed, the number of other fused rendering images, and the number of pixel points in each fused rendering image;

[0018] According to the rendering requirement information, the first category of to-be-processed human body model images are sorted in a first preset order to obtain a rendering requirement sorting result.

[0019] Optionally, in a possible implementation manner of the first aspect, the step of calculating the rendering requirement information according to the number of pixel points in the image information of the human body model image to be processed, the number of other fused rendering images, and the number of pixel points in each fused rendering image specifically includes:

[0020] The rendering requirement information is calculated by the following formula:

[0021]

[0022] Among them, x1 is the value corresponding to the rendering requirement information, k1 is the first weight value, s1 is the number of pixels in the image information of the human body model image to be processed, k2 is the second weight value, and a i is the number of pixels of the i-th fused rendering image in other fused rendering images, c1 is the first normalization constant value, k3 is the third weight value, l is the number of fused rendering images, z1 is the first conversion value, and xbase is the benchmark rendering requirement information.

[0023] Optionally, in a possible implementation manner of the first aspect, in the step of calculating rendering requirement information according to the image information and the two-dimensional rendering information of each first-category human body model image to be processed, and sorting the first-category human body model images to be processed in a first preset order according to the rendering requirement information to obtain a rendering requirement sorting result, specifically includes:

[0024] If the first category is a pixel adjustment rendering category, determining a pixel adjustment method and / or a pixel adjustment range according to the two-dimensional rendering information;

[0025] Obtaining a corresponding pixel adjustment weight value according to the pixel adjustment method, wherein the pixel adjustment weight value corresponding to each pixel adjustment method is preset;

[0026] Calculating according to different pixel adjustment modes and / or pixel adjustment amplitudes and the number of pixel points in the image information of the human body model image to be processed, to obtain rendering requirement information corresponding to the human body model image to be processed in each pixel adjustment mode;

[0027] According to the rendering requirement information, the first category of to-be-processed human body model images are sorted in a first preset order to obtain a rendering requirement sorting result.

[0028] Optionally, in a possible implementation manner of the first aspect, in the step of calculating according to different pixel adjustment modes and / or pixel adjustment amplitudes and the number of pixel points in the image information of the human body model image to be processed to obtain rendering requirement information corresponding to the human body model image to be processed in each pixel adjustment mode, the step specifically includes:

[0029] If the pixel adjustment method is a binarization adjustment method, the number of binarization intervals corresponding to the binarization adjustment method and the number of pixel points in the image information of the human body model image to be processed are obtained, and the rendering requirement information corresponding to the human body model image to be processed in the binarization adjustment method is calculated by the following formula:

[0030]

[0031] Wherein, x2 is the rendering requirement information corresponding to the human body model image to be processed in the binary adjustment mode, α1 is the pixel adjustment weight value corresponding to the binary adjustment mode, k1 is the first weight value, s1 is the number of pixels in the image information of the human body model image to be processed, k4 is the number of binary intervals corresponding to the binary adjustment mode, y is the number of binary intervals, c2 is the second normalization constant value, z2 is the second conversion value, x 基 Rendering requirements information for the benchmark;

[0032] If the pixel adjustment method is a pixel offset adjustment method, the number of pixel points in the image information of the human body model image to be processed is obtained, and the rendering requirement information corresponding to the human body model image to be processed in the pixel offset adjustment method is calculated by the following formula:

[0033]

[0034] Among them, x3 is the rendering requirement information corresponding to the human body model image to be processed in the pixel offset adjustment method, α2 is the pixel adjustment weight value corresponding to the pixel offset adjustment method, d is the pixel adjustment reference value, q is the pixel adjustment amplitude value, and c3 is the third normalization constant value.

[0035] Optionally, in a possible implementation manner of the first aspect, in the step of calculating the image attributes and the number of images of the human body model images in each rendering thread to generate current processing volume information of the thread at the current moment, and sorting the multiple rendering threads according to the second preset order according to the current processing volume information to obtain a rendering volume sorting result, specifically includes:

[0036] Obtain the first image attribute and the first image quantity of the human body model image being rendered in each thread;

[0037] Obtain the second image attribute and the second image quantity of the human body model image to be rendered in each thread;

[0038] The current processing amount information is calculated according to the first image attribute, the number of first images, the second image attribute and the number of second images;

[0039] Sorting the plurality of rendering threads according to a second preset order according to the current processing volume information to obtain a rendering volume sorting result;

[0040] The current processing volume information is calculated using the following formula:

[0041]

[0042] Among them, u is the current processing volume information, β1 is the weight value corresponding to the first image attribute, v1 is the number of first images, β2 is the weight value corresponding to the second image attribute, v2 is the number of second images, and o is the processing volume conversion value.

[0043] Optionally, in a possible implementation of the first aspect, the method further includes:

[0044] Counting the rendering processing volume of rendering threads of different categories in multiple time periods to obtain the total processing volume of rendering threads of each category and the average processing volume of each rendering thread;

[0045] If the difference between the average processing amounts of rendering threads of different categories is greater than a preset processing amount difference, determining the conversion quantity according to the difference between the average processing amounts;

[0046] Render threads that have converted the same number of times in the category with a smaller average throughput are classified as render threads in the category with a larger average throughput.

[0047] A second aspect of an embodiment of the present invention provides a multi-threaded human body model rendering system, including a cloud server and multiple user terminals connected to the cloud server, and rendering human body model images sent by multiple user terminals through the following modules, specifically including:

[0048] An image classification module is used to obtain the human body model image to be processed and the corresponding rendering requirement data sent by each user terminal at the current moment, and classify the human body model image to be processed according to the one-dimensional rendering information in the rendering requirement data to obtain a plurality of human body model images to be processed of the first category;

[0049] a demand sorting module, configured to calculate rendering demand information according to the image information and two-dimensional rendering information of each first-category human body model image to be processed, and sort the first-category human body model images to be processed according to the rendering demand information in a first preset order to obtain a rendering demand sorting result;

[0050] A thread classification module, used for determining a plurality of first-category rendering threads corresponding to the human body model image to be processed according to the rendering requirement data;

[0051] A thread sorting module is used to calculate the image attributes and the number of images of the human model images in each rendering thread to generate the current processing volume information of the thread at the current moment, and sort the multiple rendering threads according to the second preset order according to the current processing volume information to obtain the rendering volume sorting result;

[0052] The distribution rendering module is used to distribute the first type of to-be-processed human body model images to corresponding rendering threads for rendering according to the rendering requirement sorting result and the rendering amount sorting result.

[0053] According to a third aspect of an embodiment of the present invention, a storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the method of the first aspect of the present invention and various possible designs of the first aspect.

[0054] The present invention provides a human model rendering method, system and storage medium based on multi-threading. It is capable of performing efficient human model image rendering in a scenario of high-concurrency human model rendering. The present invention will adopt a multi-threaded working mode, and distribute the corresponding type of human model images to be processed according to the type of each thread, so that when the rendering requirements of multiple scenes are met, the present invention can distinguish and render human model images of different rendering processing levels, so that human model images with low rendering processing levels have the advantages of obviously fast speed and high rendering efficiency, thereby improving the overall human model rendering efficiency. When rendering multiple human model images to be processed of a certain class, the present invention will calculate the rendering demand sorting result according to the image information and two-dimensional rendering information of the multiple human model images to be processed, and calculate the rendering amount sorting result according to the image attributes and image number of the human model in the processing of the rendering thread, and distribute the human model images to be processed in combination with the rendering demand sorting result and the rendering amount sorting result, so that each rendering thread can obtain a rendering task that is compatible with its current relative processing capacity, thereby improving the overall human model rendering efficiency.

[0055] The technical solution provided by the present invention adopts different calculation methods according to different categories when calculating rendering requirement information. When the first category is a fusion rendering category, the present invention will comprehensively calculate the number of pixel points in the image information of the human body model image to be processed, the number of other fusion rendering images, and the number of pixel points in each fusion rendering image, and obtain the rendering requirement information when multiple images are fused, so that the obtained rendering requirement information can reflect the amount of calculation in the fusion process, and then it can be matched with the rendering thread corresponding to the required amount of calculation, thereby improving the rendering efficiency of the human body model image to be processed in the fusion rendering category.

[0056] The technical solution provided by the present invention, when calculating the pixel adjustment rendering category, will calculate the rendering requirement information of the human body model image to be processed according to the pixel binarization adjustment method and the pixel offset adjustment method, so that the rendering requirement information of the binarization adjustment method and the pixel offset adjustment method can be compared, and then the present invention can match and allocate the human body model images to be processed in the binarization adjustment method and the pixel offset adjustment method to the same rendering thread for processing when rendering, so that the human body model images to be processed in the binarization adjustment method and the pixel offset adjustment method can be allocated to the rendering thread with corresponding rendering capabilities, thereby improving the rendering efficiency.

[0057] The technical solution provided by the present invention counts the rendering processing volume of different categories of rendering threads in multiple time periods, and obtains the corresponding conversion number of rendering threads according to the working conditions of different categories of rendering threads, so that different rendering threads can be converted to each other, and the computing volume of each type of rendering thread is maximized, thereby improving the overall rendering efficiency of the technical solution provided by the present invention and avoiding the situation where some types of rendering threads have a large workload and some types of rendering threads have a small workload. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A schematic diagram of applicable scenarios of a multi-threaded human body model rendering method;

[0059] Figure 2 A flowchart of a first implementation of a multi-threaded human body model rendering method;

[0060] Figure 3 A flowchart of a second implementation of a multi-threaded human body model rendering method;

[0061] Figure 4 The present invention is a structural diagram of a first embodiment of a multi-threaded human body model rendering device. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein.

[0064] It should be understood that in various embodiments of the present invention, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0065] It should be understood that in the present invention, "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatuses.

[0066] It should be understood that in the present invention, "plurality" refers to two or more than two. "And / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "Contains A, B and C", "Contains A, B, C" means that A, B, and C are all included, "Contains A, B or C" means that one of A, B, and C is included, and "Contains A, B and / or C" means that any one, any two, or any three of A, B, and C are included.

[0067] It should be understood that in the present invention, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A and B can be determined based on A. Determining B based on A does not mean determining B based only on A, but B can also be determined based on A and / or other information. A and B match when the similarity between A and B is greater than or equal to a preset threshold.

[0068] Depending on the context, "if" as used herein may be interpreted as "when" or "when" or "in response to determining" or "in response to detecting."

[0069] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0070] The present invention provides a human body model rendering method based on multithreading, such as Figure 1 As shown, it is a scene schematic diagram of the technical solution provided by the present invention, including a cloud server and multiple user terminals connected to the cloud server. The cloud server can be in the form of a server cluster, and the server cluster will include multiple CPUs and GPUs. Multiple threads for rendering human body models are obtained by combining the CPUs and GPUs. The present invention will classify the rendering threads in advance. For example, some rendering threads perform fusion rendering on human body models, and some rendering threads perform pixel adjustment rendering on human body models, and so on. The present invention does not impose any limitation on the manner in which the CPU and GPU form threads. One CPU can form a rendering thread with one GPU. Two CPUs can form a rendering thread with one GPU. One CPU can form a rendering thread with two GPUs. The cloud server is connected to a database, and the fused rendered image can be stored in the database.

[0071] The human body model rendering method based on multithreading provided by the present invention is as follows: Figure 2 As shown, the human body model images sent by multiple user terminals are rendered through the following steps, specifically including:

[0072] Step S110, obtaining the human body model image to be processed and the corresponding rendering requirement data sent by each user terminal at the current moment, and classifying the human body model image to be processed according to the one-dimensional rendering information in the rendering requirement data to obtain a plurality of human body model images to be processed of the first category. In the technical solution provided by the present invention, the user can send the human body model image to be processed that needs to be rendered to the cloud server through the user terminal, and the rendering requirement data is also sent together with the human body model image to be processed. When collecting the rendering requirement data through the user terminal, two-dimensional rendering information will be obtained, and the two-dimensional rendering information respectively includes one-dimensional rendering information and two-dimensional rendering information. The present invention will classify the human body model image to be processed according to the one-dimensional rendering information, so that in the subsequent rendering step, threads of different categories can process the human body model images to be processed of the corresponding category.

[0073] The technical solution provided by the present invention, in a possible implementation manner, is as follows Figure 3 As shown, step S110 specifically includes:

[0074] Step S1101, if the one-dimensional rendering information is a fusion rendering method, then a plurality of processed human body model images of the first category of fusion rendering category are obtained. The fusion rendering method is selected by the user, and the fusion rendering method can be understood as the superposition rendering of two images. For example, there is a human body model, and it is necessary to add a certain expression or a certain piece of clothing to the human body model. At this time, it is necessary to fuse a new fusion image on the basis of the previous human body model, that is, to fuse the two images. At this time, the present invention uses the fusion rendering method as one of the rendering methods and modes provided by the present invention.

[0075] Step S1102: If the one-dimensional rendering information is a pixel adjustment rendering mode, a plurality of processed human body model images of the first category of pixel adjustment rendering are obtained. In the process of rendering the human body model, the color, skin color and other contents of the human body model may need to be adjusted. At this time, no new image is added to the original human body model image, but pixels are changed on the basis of the original human body model image. Therefore, the rendering mode at this time can be understood as a pixel adjustment rendering mode.

[0076] The present invention classifies a plurality of processed human body model images according to the one-dimensional rendering information to obtain human body model images of different categories with different processing and rendering requirements.

[0077] Step S120, calculate rendering requirement information according to the image information and two-dimensional rendering information of each first-category human body model image to be processed, and sort the first-category human body model images to be processed according to the rendering requirement information in a first preset order to obtain a rendering requirement sorting result. The technical solution provided by the present invention calculates rendering requirement information for each category of human body model images to be processed after classifying the human body model images to be processed. Generally speaking, the larger the rendering requirement information, the greater the amount of calculation required. The present invention will sort the first-category human body model images to be processed according to each rendering requirement information. The first preset order can be a descending order, that is, the human body model image to be processed with a larger rendering requirement information is at the front in the rendering requirement sorting result. The rendering requirement information can be the number of data items that need to be processed as predicted when processing the human body model image to be processed.

[0078] In a possible implementation of the technical solution provided by the present invention, step S120 specifically includes:

[0079] If the first category is a fusion rendering category, other fusion rendering images are determined according to the two-dimensional rendering information. When the first category of the human body model image to be processed is a fusion rendering category, it will be fused with other fusion rendering images, such as expression images, decoration images, clothing images, etc. The two-dimensional rendering information may contain image tags, address information, link information, etc. of other fusion rendering images that need to be determined, and other fusion rendering images can be quickly determined according to the two-dimensional rendering information.

[0080] The rendering requirement information is calculated based on the number of pixel values ​​in the image information of the human model image to be processed, the number of other fused rendering images, and the number of pixel values ​​in each fused rendering image. The technical solution provided by the present invention can obtain the number of pixel values ​​in the image information of the human model image to be processed. The resolutions of the human model images to be processed sent by the user terminal to the cloud service end are fixed. Different resolutions will have different number of pixel values, so the present invention can quickly determine the number of pixel values ​​in the image information. The requirements for fusion rendering are different, and the number of fused rendering images determined at this time is different. For example, the human model image to be processed may add 1 decoration, 2 decorations, and so on. Different fused rendering images may also have different numbers of pixels. Since the elements in the fused rendering images are different, the number of pixels in different fused rendering images may also be different. Therefore, the present invention also needs to obtain the number of fused rendering images and the number of pixels in each fused rendering image, and calculate the corresponding rendering requirement information.

[0081] The technical solution provided by the present invention, in one possible implementation manner, in the step of calculating and obtaining rendering requirement information according to the number of pixel points in the image information of the human body model image to be processed, the number of other fused rendering images, and the number of pixel points in each fused rendering image, specifically includes:

[0082] The rendering requirement information is calculated by the following formula:

[0083]

[0084] Among them, x1 is the value corresponding to the rendering requirement information, k1 is the first weight value, s1 is the number of pixels in the image information of the human body model image to be processed, k2 is the second weight value, and a i is the number of pixels of the i-th fused rendering image in other fused rendering images, c1 is the first normalized constant value, k3 is the third weight value, l is the number of fused rendering images, z1 is the first conversion value, x 基 Provides information about the baseline rendering requirements. The offset coefficients of multiple dimensions such as the number of pixels in the human body model image to be processed, the number of other fused rendering images, and the number of pixels in each fused rendering image can be obtained. The larger the value is, the greater the amount of calculation required by the corresponding rendering thread is, so the obtained rendering requirement information x1 is larger. The first conversion value z1 can be preset and used for The obtained offset coefficient is converted. Generally speaking, the present invention will pre-set a reference rendering requirement information x 基 , the benchmark rendering requirement information x 基 Can be preset by the user, baseline rendering requirement information x 基 It can be understood as the minimum rendering requirement when rendering the human body model image. The first normalization constant value c1 is preset, and can normalize the number of pixel points in the image information of the human body model image to be processed after weighted processing, the number of other fused rendering images, and the number of pixel points in each fused rendering image.

[0085] According to the rendering requirement information, the first type of human body model images to be processed are sorted in a first preset order to obtain a rendering requirement sorting result. The technical solution provided by the present invention sorts the human body model images to be processed according to the value of the rendering requirement information, and the first preset order can be a descending order.

[0086] In a possible implementation of the technical solution provided by the present invention, step S120 specifically includes:

[0087] If the first category is a pixel adjustment rendering category, the pixel adjustment method and / or the pixel adjustment amplitude is determined according to the two-dimensional rendering information. When the user needs to perform pixel adjustment rendering on the human body model image, the technical solution provided by the present invention will determine the pixel adjustment method and / or the pixel adjustment amplitude according to the two-dimensional rendering information. The pixel adjustment method includes, for example, binarization adjustment and pixel offset adjustment of the human body model image. When adjusting the pixel offset, a pixel adjustment amplitude is required, for example, the RGB value of the current pixel is offset upward by 10 points, downward by 20 points, and so on. When rendering the human body model, a corresponding pixel adjustment amplitude is required.

[0088] The corresponding pixel adjustment weight value is obtained according to the pixel adjustment method, wherein the pixel adjustment weight value corresponding to each pixel adjustment method is preset. The technical solution provided by the present invention sets different pixel adjustment weight values ​​for different pixel adjustment methods in advance. If the calculation amount of the binary adjustment is generally greater than that of the pixel offset adjustment, then the weight value corresponding to the binary adjustment method is greater than the weight value corresponding to the pixel offset adjustment method.

[0089] According to different pixel adjustment modes and / or pixel adjustment amplitudes, and the number of pixel points in the image information of the human body model image to be processed, the rendering requirement information corresponding to the human body model image to be processed in each pixel adjustment mode is calculated. The technical solution provided by the present invention can calculate in a comprehensive manner in multiple dimensions to obtain the rendering requirement information corresponding to the human body model image to be processed in the pixel adjustment mode, thereby achieving the purpose of sorting the human body model images to be processed in the pixel adjustment mode.

[0090] The technical solution provided by the present invention, in one possible implementation manner, in the step of calculating according to different pixel adjustment modes and / or pixel adjustment amplitudes and the number of pixel points in the image information of the human body model image to be processed, obtaining the rendering requirement information corresponding to the human body model image to be processed in each pixel adjustment mode, specifically includes:

[0091] If the pixel adjustment method is a binarization adjustment method, the number of binarization intervals corresponding to the binarization adjustment method and the number of pixel points in the image information of the human body model image to be processed are obtained, and the rendering requirement information corresponding to the human body model image to be processed in the binarization adjustment method is calculated by the following formula:

[0092]

[0093] Wherein, x2 is the rendering requirement information corresponding to the human body model image to be processed in the binary adjustment mode, α1 is the pixel adjustment weight value corresponding to the binary adjustment mode, k1 is the first weight value, s1 is the number of pixels in the image information of the human body model image to be processed, k4 is the number of binary intervals corresponding to the binary adjustment mode, y is the number of binary intervals, c2 is the second normalization constant value, z2 is the second conversion value, x 基 Requires information for benchmark rendering.

[0094] pass When the binary adjustment method is obtained, the adjustment offset coefficient corresponding to the information of each dimension of the human body model image to be processed can be weighted by the pixel adjustment weight value α1 corresponding to the binary adjustment method, and then combined with the second conversion value z2 and the reference rendering requirement information x 基 The rendering requirement information of the binarization adjustment method is calculated. The rendering requirement information at this time will take into account the characteristics of the binarization adjustment method. The more the number of binarization intervals, the larger the corresponding rendering requirement information.

[0095] If the pixel adjustment method is a pixel offset adjustment method, the number of pixel points in the image information of the human body model image to be processed is obtained, and the rendering requirement information corresponding to the human body model image to be processed in the pixel offset adjustment method is calculated by the following formula:

[0096]

[0097] Among them, x3 is the rendering requirement information corresponding to the human body model image to be processed in the pixel offset adjustment method, α2 is the pixel adjustment weight value corresponding to the pixel offset adjustment method, d is the pixel adjustment reference value, q is the pixel adjustment amplitude value, and c3 is the third normalization constant value.

[0098] pass When the pixel offset adjustment method is obtained, the adjustment offset coefficient corresponding to the information of each dimension of the human body model image to be processed can be weighted by the pixel adjustment weight value α2 corresponding to the pixel offset adjustment method, and then combined with the second conversion value z2 and the reference rendering requirement information x 基 The rendering requirement information of the pixel offset adjustment method is calculated. The rendering requirement information at this time will take into account the characteristics of the pixel offset adjustment method. The larger the pixel adjustment amplitude value, the larger the corresponding rendering requirement information.

[0099] According to the rendering requirement information, the first category of human body model images to be processed are sorted in a first preset order to obtain a rendering requirement sorting result. The technical solution provided by the present invention will respectively calculate and process the human body model images to be processed corresponding to the binarization adjustment method and the pixel offset adjustment method, and perform unified sorting, so that the rendering requirement information calculated by the two is in the same calculation value dimension, so that the renderings of different processing methods can also be compared, reducing the number of classifications of rendering threads.

[0100] Step S130, determining a plurality of first-category rendering threads corresponding to the human body model image to be processed according to the rendering requirement data. The technical solution provided by the present invention classifies the rendering threads according to the rendering requirement data, so that the rendering threads obtained at this time are all the rendering threads required by the human body model image to be processed, thereby providing a basis for the subsequent matching between the human body model image to be processed and the rendering threads.

[0101] Step S140, calculate the image attributes and the number of images of the human body model image in each rendering thread to generate the current processing volume information of the thread at the current moment, and sort the multiple rendering threads according to the second preset order based on the current processing volume information to obtain the rendering volume sorting result. The technical solution provided by the present invention, after classifying the rendering threads, will calculate the current processing volume information of the corresponding rendering thread according to the image attributes, the number of images and other dimensions of the human body model image in the rendering thread. The larger its current processing volume information is, the longer it takes to process the newly received human body model image to be processed. The present invention will sort the multiple rendering threads according to the current processing volume information, and the second preset order can be an ascending sorting method, that is, the rendering threads with less current processing volume information are ranked in the front. The current processing volume information can be understood as information formed by the number of data items that are currently being processed and need to be processed.

[0102] In a possible implementation of the technical solution provided by the present invention, step S140 specifically includes:

[0103] Get the first image attribute and the first image quantity of the human body model image being rendered in each thread. The human body model image being rendered can be understood as the human body model image being rendered by the GPU. The first image attribute can be the first image attribute corresponding to the fusion rendering category, or the first image attribute corresponding to the pixel adjustment rendering category. Generally speaking, the weight value corresponding to the first image attribute of the fusion rendering category is greater than the weight value corresponding to the first image attribute of the pixel adjustment rendering category. If in a rendering thread, 1 CPU corresponds to 1 GPU, then there is only 1 GPU at this time, and the number of first images at this time can only be 0 or 1. If 1 CPU corresponds to 2 GPUs, then the number of first images at this time may be 0, 1, or 2. For scenes with different rendering threads, there may be different rendering methods.

[0104] Get the second image attribute and the number of second images of the human model image to be rendered in each thread. The human model image to be rendered can be understood as the human model image in the process of preparation by the CPU. The second image attribute can be the second image attribute corresponding to the fusion rendering category, or the second image attribute corresponding to the pixel adjustment rendering category. Generally speaking, the weight value corresponding to the second image attribute of the fusion rendering category is greater than the weight value corresponding to the second image attribute of the pixel adjustment rendering category. If in a rendering thread, 1 CPU corresponds to 1 GPU, then there is 1 CPU at this time, and the number of first images at this time may be 0, 1, etc. If 2 CPUs correspond to 1 GPU, then the number of first images at this time may be 0, 1, 2, etc. For scenes with different rendering threads, there may be different rendering methods. In some scenes, 1 may also correspond to a number of images greater than 1.

[0105] Generally speaking, the GPU will render the human body model images separately, and the CPU can prepare the human body model images synchronously.

[0106] The current processing amount information is calculated according to the first image attribute, the number of first images, the second image attribute and the number of second images.

[0107] The technical solution provided by the present invention calculates the current processing volume information through the following formula:

[0108]

[0109] Among them, u is the current processing volume information, β1 is the weight value corresponding to the first image attribute, v1 is the number of first images, β2 is the weight value corresponding to the second image attribute, v2 is the number of second images, and o is the processing volume conversion value. The data processing volume corresponding to the GPU at the current moment can be obtained through β1·v1, and the data processing volume corresponding to the CPU at the current moment can be obtained through β2·v2. Combining the data processing volume corresponding to the GPU and the data processing volume corresponding to the CPU can obtain the final current processing volume information.

[0110] According to the current processing volume information, multiple rendering threads are sorted in a second preset order to obtain a rendering volume sorting result. The present invention sorts the rendering threads in a second preset order according to the current processing volume information, and the second preset order is ascending.

[0111] Step S150, according to the rendering demand sorting result and the rendering amount sorting result, distribute the first category of human body model images to be processed to the corresponding rendering threads for rendering. The technical solution provided by the present invention, after obtaining the rendering demand sorting result and the rendering amount sorting result. The human body model images to be processed at the corresponding position in the rendering demand sorting result will be selected and matched with the rendering threads at the corresponding position in the rendering amount sorting result, for example, the first human body model image to be processed in the rendering demand sorting result is matched with the first rendering thread in the rendering amount sorting result. Since the rendering demand sorting result is in descending order and the rendering amount sorting result is in ascending order, the human body model image to be processed with the largest amount of calculation required will be matched with the rendering thread with the largest relative amount of calculation, thereby making the workload of multiple rendering threads similar, so that in the subsequent rendering process, the situation where the work of multiple rendering threads is inconsistent is reduced as much as possible, thereby improving the rendering efficiency.

[0112] The technical solution provided by the present invention, in a possible implementation manner, further includes:

[0113] Statistics are taken for the rendering processing volume of rendering threads of different categories in multiple time periods to obtain the total processing volume of rendering threads of each category and the average processing volume of each rendering thread. The present invention will count the rendering processing volume of different categories and at different times. The different times may be 10:00 to 12:00, 16:00 to 18:00, etc. The average processing volume of multiple time periods is obtained, and the processing load of rendering threads of different categories can be reflected by the average processing volume. The larger the average processing volume, the larger the corresponding processing load.

[0114] If the difference in average processing volume between rendering threads of different categories is greater than a preset processing volume difference, the conversion quantity is determined according to the difference in average processing volume. If the difference in average processing volume is greater than the preset processing volume difference, it proves that the difference in average processing volume between rendering threads of different categories is too large, and the categories of rendering threads need to be reallocated so that rendering threads of different categories have similar processing loads, thereby improving the overall processing efficiency of the technical solution provided by the present invention.

[0115] It should be noted that in different types of rendering processes, different interfaces need to be set for the CPU and GPU. For example, in the scenario of fusion rendering, it may be necessary to connect to the interface of the database, that is, to retrieve the corresponding fusion image in the database. There will also be a certain amount of time in the data retrieval process, so the present invention will configure different interfaces according to the type of rendering thread to achieve different rendering functions.

[0116] It can be understood that the server cluster includes multiple sub-servers, each sub-server includes multiple CPUs and GPUs, and the present invention can classify the rendering threads composed of CPUs and GPUs based on sub-servers, or can classify them directly based on the rendering threads composed of CPUs and GPUs.

[0117] The technical solution provided by the present invention determines the number of conversions according to the difference in average processing volume. The larger the difference in average processing volume, the larger the corresponding number of conversions. The present invention can pre-set multiple difference intervals, each difference having a corresponding number of conversions. For example, if the number of conversions corresponding to the difference interval W is 5, then after the difference in average processing volume falls into the difference interval W, 5 rendering threads are converted.

[0118] The rendering threads with the conversion number in the category with a smaller average processing amount are classified as rendering threads in the category with a larger average processing amount. The technical solution provided by the present invention converts the rendering threads after obtaining the conversion number.

[0119] Through the above technical solution, the present invention can dynamically adjust the rendering thread according to the user's rendering needs over a period of time, so that the rendering threads of the technology provided by the present invention can be in the same or similar load state, thereby improving the overall rendering efficiency.

[0120] In order to implement the multi-threaded human model rendering method provided by the present invention, the present invention also provides a multi-threaded human model rendering system, including a cloud server and multiple user terminals connected to the cloud server, and rendering the human model images sent by the multiple user terminals through the following modules, such as Figure 4 As shown, specifically including:

[0121] An image classification module is used to obtain the human body model image to be processed and the corresponding rendering requirement data sent by each user terminal at the current moment, and classify the human body model image to be processed according to the one-dimensional rendering information in the rendering requirement data to obtain a plurality of human body model images to be processed of the first category;

[0122] a demand sorting module, configured to calculate rendering demand information according to the image information and two-dimensional rendering information of each first-category human body model image to be processed, and sort the first-category human body model images to be processed according to the rendering demand information in a first preset order to obtain a rendering demand sorting result;

[0123] A thread classification module, used for determining a plurality of first-category rendering threads corresponding to the human body model image to be processed according to the rendering requirement data;

[0124] A thread sorting module is used to calculate the image attributes and the number of images of the human model images in each rendering thread to generate the current processing volume information of the thread at the current moment, and sort the multiple rendering threads according to the second preset order according to the current processing volume information to obtain the rendering volume sorting result;

[0125] The distribution rendering module is used to distribute the first type of to-be-processed human body model images to the corresponding rendering threads for rendering according to the rendering requirement sorting result and the rendering amount sorting result.

[0126] The present invention also provides a storage medium, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the methods provided by the various embodiments described above.

[0127] Among them, the storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, the storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (Application Specific Integrated Circuits, referred to as ASIC). In addition, the ASIC can be located in a user device. Of course, the processor and the storage medium can also exist in a communication device as discrete components. The storage medium can be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0128] The present invention also provides a program product, which includes an execution instruction, which is stored in a storage medium. At least one processor of a device can read the execution instruction from the storage medium, and at least one processor executes the execution instruction so that the device implements the methods provided in the above various embodiments.

[0129] In the above-mentioned terminal or server embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A human body model rendering method based on multithreading, It is characterized in that The method comprises a cloud server and a plurality of user terminals connected to the cloud server, and rendering human body model images sent by the plurality of user terminals through the following steps, specifically comprising: Acquire the human body model images to be processed and the corresponding rendering requirement data sent by each user terminal at the current moment, and classify the human body model images to be processed according to the one-dimensional rendering information in the rendering requirement data to obtain a plurality of human body model images to be processed of the first category; Calculating rendering requirement information according to the image information and two-dimensional rendering information of each first-category human body model image to be processed, and sorting the first-category human body model images to be processed according to the rendering requirement information in a first preset order to obtain a rendering requirement sorting result; Determine, according to the rendering requirement data, a plurality of first-category rendering threads corresponding to the human body model image to be processed; Calculating the image attributes and the number of images of the human body model images in each rendering thread to generate current processing volume information of the thread at the current moment, and sorting the multiple rendering threads according to a second preset order according to the current processing volume information to obtain a rendering volume sorting result; According to the rendering requirement sorting result and the rendering amount sorting result, the first category of to-be-processed human body model images are distributed to corresponding rendering threads for rendering.

2. The multi-threaded human body model rendering method according to claim 1, It is characterized in that The step of obtaining a human body model image to be processed and corresponding rendering requirement data sent by each user terminal at the current moment, and classifying the human body model image to be processed according to one-dimensional rendering information in the rendering requirement data to obtain a plurality of human body model images of the first category to be processed specifically includes: If the one-dimensional rendering information is a fusion rendering mode, a plurality of processed human body model images of the first category being a fusion rendering category are obtained; If the one-dimensional rendering information is a pixel adjustment rendering mode, a plurality of processed human body model images of the first category of pixel adjustment rendering are obtained.

3. The multi-threaded human body model rendering method according to claim 2, It is characterized in that The step of calculating rendering requirement information according to the image information and two-dimensional rendering information of each first-category human body model image to be processed, and sorting the first-category human body model images to be processed in a first preset order according to the rendering requirement information to obtain a rendering requirement sorting result specifically includes: If the first category is a fusion rendering category, determining other fusion rendering images according to the two-dimensional rendering information; Calculating rendering requirement information according to the number of pixel points in the image information of the human body model image to be processed, the number of other fused rendering images, and the number of pixel points in each fused rendering image; According to the rendering requirement information, the first category of to-be-processed human body model images are sorted in a first preset order to obtain a rendering requirement sorting result.

4. The multi-threaded human body model rendering method according to claim 3, It is characterized in that The step of calculating the rendering requirement information according to the number of pixel points in the image information of the human body model image to be processed, the number of other fused rendering images, and the number of pixel points in each fused rendering image specifically includes: The rendering requirement information is calculated by the following formula: Among them, x 1 is the value corresponding to the rendering requirement information, k 1 is the first weight value, s 1 is the number of pixels in the image information of the human body model image to be processed, k 2 is the second weight value, a i is the number of pixels of the i-th fused rendering image in other fused rendering images, c 1 is the first normalization constant value, k 3 is the third weight value, l is the number of fused rendered images, z 1 is the first conversion value, x 基 Requires information for benchmark rendering.

5. The multi-threaded human body model rendering method according to claim 2, It is characterized in that The step of calculating rendering requirement information according to the image information and two-dimensional rendering information of each first-category human body model image to be processed, and sorting the first-category human body model images to be processed in a first preset order according to the rendering requirement information to obtain a rendering requirement sorting result specifically includes: If the first category is a pixel adjustment rendering category, determining a pixel adjustment method and / or a pixel adjustment range according to the two-dimensional rendering information; Obtaining a corresponding pixel adjustment weight value according to the pixel adjustment method, wherein the pixel adjustment weight value corresponding to each pixel adjustment method is preset; Calculating according to different pixel adjustment modes and / or pixel adjustment amplitudes and the number of pixel points in the image information of the human body model image to be processed, to obtain rendering requirement information corresponding to the human body model image to be processed in each pixel adjustment mode; According to the rendering requirement information, the first category of to-be-processed human body model images are sorted in a first preset order to obtain a rendering requirement sorting result.

6. The multi-threaded human body model rendering method according to claim 5, It is characterized in that The step of calculating according to different pixel adjustment modes and / or pixel adjustment amplitudes and the number of pixel points in the image information of the human body model image to be processed to obtain rendering requirement information corresponding to the human body model image to be processed in each pixel adjustment mode specifically includes: If the pixel adjustment method is a binarization adjustment method, the number of binarization intervals corresponding to the binarization adjustment method and the number of pixel points in the image information of the human body model image to be processed are obtained, and the rendering requirement information corresponding to the human body model image to be processed in the binarization adjustment method is calculated by the following formula: Among them, x 2 is the rendering requirement information corresponding to the human body model image to be processed in the binary adjustment mode, α 1 is the pixel adjustment weight value corresponding to the binary adjustment method, k 1 is the first weight value, s 1 is the number of pixels in the image information of the human body model image to be processed, k 4 is the number of binarization intervals corresponding to the binarization adjustment method, y is the number of binarization intervals, c 2 is the second normalization constant value, z 2 is the second conversion value, x 基 Rendering requirements information for the benchmark; If the pixel adjustment method is a pixel offset adjustment method, the number of pixel points in the image information of the human body model image to be processed is obtained, and the rendering requirement information corresponding to the human body model image to be processed in the pixel offset adjustment method is calculated by the following formula: Among them, x 3 is the rendering requirement information corresponding to the human body model image to be processed in the pixel offset adjustment mode, α 2 is the pixel adjustment weight value corresponding to the pixel offset adjustment method, d is the pixel adjustment reference value, q is the pixel adjustment amplitude value, c 3 is the third normalization constant value.

7. The multi-threaded human body model rendering method according to any one of claims 1 to 6, It is characterized in that The step of calculating the image attributes and the number of images of the human body model images in each rendering thread to generate the current processing volume information of the thread at the current moment, and sorting the multiple rendering threads according to the second preset order according to the current processing volume information to obtain the rendering volume sorting result specifically includes: Obtain the first image attribute and the first image quantity of the human body model image being rendered in each thread; Obtain the second image attribute and the second image quantity of the human body model image to be rendered in each thread; The current processing amount information is calculated according to the first image attribute, the number of first images, the second image attribute and the number of second images; Sorting the plurality of rendering threads according to a second preset order according to the current processing volume information to obtain a rendering volume sorting result; The current processing volume information is calculated using the following formula: Among them, u is the current processing information, β 1 is the weight value corresponding to the first image attribute, v 1 is the number of first images, β 2 is the weight value corresponding to the second image attribute, v 2 is the second image quantity, o is the processing quantity conversion value.

8. The multi-threaded human body model rendering method according to claim 7, It is characterized in that Also includes: Counting the rendering processing volume of rendering threads of different categories in multiple time periods to obtain the total processing volume of rendering threads of each category and the average processing volume of each rendering thread; If the difference between the average processing amounts of rendering threads of different categories is greater than a preset processing amount difference, determining the conversion quantity according to the difference between the average processing amounts; Render threads that have converted the same number of times in the category with a smaller average throughput are classified as render threads in the category with a larger average throughput.

9. A human model rendering system based on multithreading, It is characterized in that The system comprises a cloud server and a plurality of user terminals connected to the cloud server, and renders the human body model images sent by the plurality of user terminals through the following modules, specifically comprising: An image classification module is used to obtain the human body model image to be processed and the corresponding rendering requirement data sent by each user terminal at the current moment, and classify the human body model image to be processed according to the one-dimensional rendering information in the rendering requirement data to obtain a plurality of human body model images to be processed of the first category; a demand sorting module, configured to calculate rendering demand information according to the image information and two-dimensional rendering information of each first-category human body model image to be processed, and sort the first-category human body model images to be processed according to the rendering demand information in a first preset order to obtain a rendering demand sorting result; A thread classification module, used for determining a plurality of first-category rendering threads corresponding to the human body model image to be processed according to the rendering requirement data; A thread sorting module is used to calculate the image attributes and the number of images of the human model images in each rendering thread to generate the current processing volume information of the thread at the current moment, and sort the multiple rendering threads according to the second preset order according to the current processing volume information to obtain the rendering volume sorting result; The distribution rendering module is used to distribute the first type of to-be-processed human body model images to corresponding rendering threads for rendering according to the rendering requirement sorting result and the rendering amount sorting result.

10. A storage medium, It is characterized in that The storage medium stores a computer program, which is used to implement the method according to any one of claims 1 to 8 when executed by a processor.

Citation Information

Patent Citations

  • Apparatus and computer program products for object rendering method that renders object efficiently using a plurality of processor cores

    US10475153B1

  • Method to Render a Root-Less Scene Graph With a User Controlled Order of Rendering

    US20080278482A1

  • Direct volume rendering in virtual and / or augmented reality

    US20190272027A1