A data processing method, apparatus, device, and readable storage medium

By calculating dynamic scaling arrays and generating scaling parameters, the rendering information is sent to the GPU at one time, solving the problem of unsmooth rendering when rendering a large number of three-dimensional models, improving rendering performance and reducing time-consuming.

CN114742929BActive Publication Date: 2025-05-30COMPETITIVE WORLD (CHENGDU) NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210360745.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-07
Publication Date
2025-05-30
Estimated Expiration
2042-04-07

AI Technical Summary

Technical Problem

In the process of rendering a large number of three-dimensional models, the client is prone to poor rendering problems, resulting in low frame rates and lag in the picture.

Method used

By obtaining the name and action information of the model to be rendered, the dynamic scaling array is calculated, the scaling parameters are generated, and these parameters are combined into rendering information and sent to the GPU at one time, avoiding the sequential transmission of the rendering information of each entity to be rendered.

Benefits of technology

This method reduces the time-consuming rendering, improves rendering performance, and avoids the problem of picture lag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114742929B_ABST
    Figure CN114742929B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a data processing method, apparatus, device, and readable storage medium. The name of a model to be rendered and action information of a plurality of entities to be rendered are obtained. The entities to be rendered include the entities belonging to the model to be rendered in the frame to be rendered. According to the action information of the entities to be rendered, action images of the entities to be rendered are obtained. The action images include circumscribed rectangle images of the images of the entities to be rendered performing actions. According to the action images of the entities to be rendered and a square grid, dynamic information of the entities to be rendered is obtained. The dynamic information includes a dynamic scaling array. Based on the dynamic scaling array of the entities to be rendered, scaling parameters of the entities to be rendered are obtained. Based on the parameter combinations of each entity to be rendered, rendering information of the model to be rendered is generated. The parameter combinations of the entities to be rendered include the scaling parameters. The rendering information of the model to be rendered includes the square grid and the parameter combinations of each entity to be rendered. This method shortens the rendering time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of display technology, and in particular, to a data processing method, apparatus, device, and readable storage medium. Background Art

[0002] Rendering refers to the process of projecting a 3D model according to set parameters such as environment and material to obtain a digital image. If a large number of 3D models are rendered simultaneously during computer drawing, it will cause the client to experience unsmooth rendering, such as too low frame rate, resulting in frame freezing.

[0003] Taking the rendering of a game battlefield as an example, when there are a large number of entities to be rendered in the game battlefield, in order to reduce the sending batches, the CPU uses the Dynamic batch method to dynamically merge and send a large number of Meshes (Wireless Mesh Network, abbreviated as mesh), resulting in too high time consumption. Summary of the Invention

[0004] This application provides a data processing method, apparatus, device, and readable storage medium, as follows:

[0005] A data processing method includes:

[0006] Obtain the name of the model to be rendered and the action information of multiple entities to be rendered, where the entities to be rendered include the entities belonging to the model to be rendered in the frame to be rendered;

[0007] According to the action information of the entities to be rendered, obtain the action images of the entities to be rendered, where the action images include the circumscribed rectangle images of the images of the entities to be rendered performing the actions;

[0008] According to the action images of the entities to be rendered and a preset square grid, obtain the dynamic information of the entities to be rendered, where the dynamic information includes a dynamic scaling array, and the dynamic scaling array includes the ratio of the size of the action image in each dimension to a first standard value, and the first standard value is the side length of the square grid;

[0009] Based on the dynamic scaling array of the entities to be rendered, obtain the scaling parameters of the entities to be rendered;

[0010] Based on the parameter combinations of each of the entities to be rendered, generate and send the rendering information of the model to be rendered, where the parameter combinations of the entities to be rendered include the scaling parameters, and the rendering information of the model to be rendered includes the square grid and the parameter combinations of each of the entities to be rendered.

[0011] Optionally, based on the dynamic scaling array of the entities to be rendered, obtaining the scaling parameters of the entities to be rendered includes:

[0012] Obtain the static information of the entity to be rendered according to the name of the model to be rendered, where the static information includes a static scaling factor;

[0013] Use the product of the dynamic scaling array and the static scaling factor as the scaling parameter of the entity to be rendered.

[0014] Optionally, obtaining the static information of the entity to be rendered according to the name of the model to be rendered includes:

[0015] Obtain a preset configuration table, where the configuration table includes the correspondence between preset models and static information;

[0016] Use the static information corresponding to the rendering model as the static information of the entity to be rendered.

[0017] Optionally, the static information further includes a static rotation angle, and the dynamic information further includes: the coordinates of the original center point, where the coordinates of the original center point are used to indicate the coordinates of the action central axis point of the action image;

[0018] The method further includes:

[0019] According to the scaling parameter (static scaling factor, static rotation angle, and coordinates of the original center point) of the entity to be rendered, obtain the target coordinates, and use the point indicated by the target coordinates as the real center point coordinates of the entity to be rendered, where the real center point coordinates are used to indicate the coordinates of the action central axis point of the action image transformed according to the scaling parameter (static scaling factor and static rotation angle);

[0020] Obtain the physical coordinates, where the physical coordinates are used to indicate the actual coordinates of the action central axis point of the image of the entity to be rendered in the frame to be rendered;

[0021] Use the physical coordinates as the coordinates of the real center point in the frame to be rendered, and according to the coordinates of the real center point in the frame to be rendered, obtain the position parameter of the entity to be rendered;

[0022] The obtaining of the position parameter of the entity to be rendered according to the real center coordinates and physical coordinates of the entity to be rendered, where the physical coordinates are used to indicate the coordinates of the action central axis point of the image of the entity to be rendered in the previous frame of the frame to be rendered.

[0023] Optionally, it further includes:

[0024] According to the static rotation angle, obtain the rotation parameter of the entity to be rendered.

[0025] Optionally, it further includes:

[0026] Obtain the material information of the model to be rendered according to the name of the model to be rendered.

[0027] Optionally, the parameter combination of the entity to be rendered further includes the position parameter and the rotation parameter; the rendering information of the model to be rendered further includes the material information.

[0028] A data processing device includes:

[0029] An action information acquisition unit, configured to acquire the name of the model to be rendered and the action information of a plurality of entities to be rendered, where the entity to be rendered includes the entity belonging to the model to be rendered in the frame to be rendered;

[0030] An action image acquisition unit, configured to acquire the action image of the entity to be rendered according to the action information of the entity to be rendered, where the action image includes the circumscribed rectangle image of the image of the entity to be rendered performing the action;

[0031] A dynamic information acquisition unit, configured to acquire the dynamic information of the entity to be rendered according to the action image of the entity to be rendered and a preset square grid, where the dynamic information includes a dynamic scaling array, and the dynamic scaling array includes the ratio of the size of the action image in each dimension to a first standard value, and the first standard value is the side length of the square grid;

[0032] A scaling parameter acquisition unit, configured to acquire the scaling parameter of the entity to be rendered based on the dynamic scaling array of the entity to be rendered;

[0033] A rendering information acquisition unit, configured to generate and send the rendering information of the model to be rendered based on the parameter combination of each entity to be rendered, where the parameter combination of the entity to be rendered includes the scaling parameter, and the rendering information of the model to be rendered includes the square grid and the parameter combination of each entity to be rendered.

[0034] A data processing device includes: a memory and a processor;

[0035] The memory is used to store programs;

[0036] The processor is configured to execute the program to implement each step of the data processing method.

[0037] A readable storage medium stores a computer program, and when the computer program is executed by a processor, each step of the data processing method is implemented.

[0038] As can be seen from the above technical solutions, the data processing method, apparatus, device, and readable storage medium provided by the embodiments of the present application obtain the name of the model to be rendered and the action information of multiple entities to be rendered. The entities to be rendered include the entities belonging to the model to be rendered in the frame to be rendered. According to the action information of the entities to be rendered, the action images of the entities to be rendered are obtained. The action images include the circumscribed rectangle images of the images of the entities to be rendered performing the actions. According to the action images of the entities to be rendered and a preset square grid, the dynamic information of the entities to be rendered is obtained. The dynamic information includes a dynamic scaling array. Based on the dynamic scaling array of the entities to be rendered, the scaling parameters of the entities to be rendered are obtained. Based on the parameter combinations of each entity to be rendered, the rendering information of the model to be rendered is generated. The parameter combinations of the entities to be rendered include the scaling parameters. The rendering information of the model to be rendered includes the square grid and the parameter combinations of each entity to be rendered. Since the dynamic scaling array includes the ratio of the size of the action image in each dimension to the side length of the square grid, the scaling parameters of the entities to be rendered obtained based on the dynamic scaling array of the entities to be rendered can indicate the transformation relationship between the action image and the square grid. Since the rendering information of the model to be rendered includes the square grid and the parameter combinations of each entity to be rendered, where the parameter combinations include the scaling parameters of the entities to be rendered, the rendering information of the model to be rendered includes a square grid and the size transformation relationship between the square grid and multiple entities to be rendered. Thus, the rendering information of the model to be rendered is sent to the rendering device at one time, without sending the rendering information of each entity to be rendered one by one, which shortens the rendering time. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0040] Figure 1 Schematic flowchart of a specific implementation manner of a data processing method provided by an embodiment of the present application;

[0041] Figure 2 Schematic flowchart of a data processing method provided by an embodiment of the present application;

[0042] Figure 3 Schematic structural diagram of a data processing apparatus provided by an embodiment of the present application;

[0043] Figure 4 Schematic structural diagram of a data processing device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0045] A data processing method provided in an embodiment of the present application is applied to, but not limited to, the rendering process of a game battlefield. Among them, the game battlefield includes a large number of entities to be rendered. Taking a game battlefield with a scale of "thousands of people" as an example, the number of entities to be rendered is as high as a thousand. In the traditional rendering method, the rendering data of each entity to be rendered included in the frame to be rendered needs to be sent to the GPU one by one, so that the GPU can render all the entities to be rendered. Among them, the rendering data of each entity to be rendered includes a rectangular grid and pose information. The rectangular grid is used to indicate the outer rectangle of the entity picture of the entity to be rendered in the frame to be rendered, and the pose information is used to indicate the position and entity pose of the entity to be rendered in the frame to be rendered. It should be noted that the specific format for the CPU to send the rendering data to the GPU is determined according to the interface rules. For details, please refer to the prior art.

[0046] Obviously, in the traditional rendering method, the number of requests from the CPU to the GPU is as high as a thousand times, and the performance of real-time rendering is very low.

[0047] It should be noted that this method is applicable to a rendering system, which includes a data processor and a data renderer. Among them, the data processor includes, but is not limited to, the CPU (Central Processing Unit / Processor, central processor) of a smart device (such as a mobile phone, iPad, simulator, etc.). The data renderer includes, but is not limited to, the GPU (Graphics Processing Unit, visual processor) of a smart device (such as a mobile phone, iPad, simulator, etc.). In this embodiment, the rendering system includes a CPU and a GPU as an example. Figure 1 The flowchart of a data processing method applied to the CPU is shown, as Figure 1 shown, this method includes:

[0048] S101. Obtain the name of the model to be rendered and the action information of the entity to be rendered according to the frame number of the frame to be rendered.

[0049] In this embodiment, the model to be rendered is the model included in the frame to be rendered. For example, the frame to be rendered is the k-th frame picture, and the k-th frame picture includes models A, B, and C.

[0050] In this embodiment, the entity to be rendered includes the entities belonging to the model to be rendered in the frame to be rendered. The action information of the entity to be rendered includes the animation name and the action sequence number. It should be noted that the animation name is the name of the animation to which the action of the entity to be rendered in the frame to be rendered (denoted as the real-time action) belongs, and the action sequence number is used to indicate the position of the real-time action in the action sequence of the animation. The action sequence includes a plurality of actions that make up the animation sorted by time preset.

[0051] For example, in the k-th frame, the animation name of the entity to be rendered is RUN (run), and the action sequence number is 3. RUN consists of 4 actions, and the action sequence is [r1 r2 r3 r4]. That is, the action being executed by the entity to be rendered in the k-th frame is r3.

[0052] S102. According to the action information of the entity to be rendered, obtain the action image of the entity to be rendered from the preset model data.

[0053] In this embodiment, the model data is generated and stored offline in advance. The model data includes animation data, and the animation data includes: the correspondence between the model name, the animation name (such as Run), and the model atlas.

[0054] The animation data further includes: the action direction, the animation playback speed, the total number of frames of the one-way action, the model mask atlas, and the material information. It should be noted that for the specific method of generating the model data offline and the specific content of the animation data, reference can be made to the prior art, and this embodiment does not make any limitations in this regard.

[0055] Among them, the model atlas of each model includes: an image sequence, and the image sequence includes action images sorted by time. Each action image corresponds to an action. For example, the model data includes the model atlases of model A, model B, and model C. Among them, the model atlas of model A includes the image sequence T1 corresponding to animation 1 (such as run) of model A, and T1 includes 10 images. It can be understood that the display end needs to render and display these 10 action images according to the position to realize the playback of animation 1 of model A.

[0056] In this embodiment, according to the name of the model to be rendered, the animation name of the entity to be rendered, and the action sequence number, obtain the image sequence corresponding to the animation name of the entity to be rendered in the model atlas corresponding to the model to be rendered, and obtain the image corresponding to the action sequence number in the image sequence as the action image of the entity to be rendered.

[0057] S103. According to the name of the model to be rendered and the preset configuration table, obtain the static information of the entity to be rendered.

[0058] In this embodiment, the static information includes a preset static zoom factor and a static rotation angle. The static zoom factor of the entity to be rendered is the zoom factor of the action image of the entity to be rendered, and the static rotation angle of the entity to be rendered is the rotation angle of the action image of the entity to be rendered.

[0059] Specifically, the static information of the entity to be rendered is obtained from a preset configuration table according to the name of the model to be rendered. The adaptation table is pre-configured according to the game logic, and the adaptation table includes the correspondence between the model and the static information.

[0060] S104. Obtain the dynamic information of the entity to be rendered according to the action image of the entity to be rendered and a preset square grid.

[0061] In this embodiment, the square grid is a mesh object composed of two triangles and four vertices created in advance when the code is running. The side length of the square grid is the first standard value.

[0062] In this embodiment, the dynamic information includes a dynamic zoom array and the coordinates of the original center point. Among them, the dynamic zoom array of the entity to be rendered includes the ratio of the size of the action image in each dimension to the first standard value. Since the action image is a rectangle, it is recorded that the dynamic zoom array = [mx my 0], where mx is the ratio of the length of the action image (the size in the x-axis direction) to the side length of the square grid, and my is the ratio of the length of the action image (the size in the y-axis direction) to the side length of the square grid.

[0063] In this embodiment, the original center point is the action center axis point of the action image.

[0064] It should be noted that obtaining the dynamic information of the entity to be rendered can be executed online in real time or the dynamic information of the entity to be rendered can be generated offline in advance. For example, if the correspondence between the action image and the dynamic information is included in the model data, this step can directly obtain the dynamic information corresponding to the action image from the model data.

[0065] S105. Obtain the scaling parameter of the entity to be rendered according to the dynamic zoom array and the static zoom factor of the entity to be rendered.

[0066] In this embodiment, the product of the dynamic zoom array and the static zoom factor of the entity to be rendered is used as the scaling parameter of the entity to be rendered. Taking the dynamic zoom array as scale1 and the static zoom factor as scale2 as an example, the calculation method of the scaling parameter scale(ai) of the entity to be rendered is as follows:

[0067] Calculate scale: The dynamic zoom factor of model Ai is scale1, and the static zoom factor is scale2. Then the scaling parameter scale of the entity to be rendered = scale1 * scale2.

[0068] S106. Obtain the target coordinates according to the scaling parameter, static rotation angle, and coordinates of the original center point of the entity to be rendered, and use the point indicated by the target coordinates as the true center point of the entity to be rendered.

[0069] In this embodiment, an optional method for calculating the true center coordinates of the entity to be rendered includes:

[0070] 1. Multiply the coordinates of the original center point of the entity to be rendered in the center by the scaling parameter to obtain intermediate coordinates, and divide the intermediate coordinates by the sine value of the static rotation angle to obtain the true center coordinates. Taking the coordinates of the original center point of the center of the entity to be rendered ai as ai(x, y, z), the static rotation angle as p, and the scaling parameter as ai(sx, sy, sz) as an example, the calculation process of the true center coordinates of the entity to be rendered includes:

[0071] 2. After scaling the coordinates of the original center point by s times, the intermediate coordinates are obtained as ai(x*sx, y*sy, z*sz). After rotating the intermediate coordinates by p degrees, the target coordinates are obtained as ai(x*sx / sin(p), y*sy / sin(p), z*sz / sin(p)).

[0072] Since the scaling parameter refers to the scaling factor of the action image of the entity to be rendered on each coordinate, the static rotation angle refers to the rotation angle of the action image, and the coordinates of the original center point refer to the coordinates of the action central axis point of the action image, therefore, the target coordinates obtained by transforming the original center point according to the static scaling factor and static rotation angle represent the action central axis point of the action image after being transformed according to the scaling parameter and static rotation angle. Therefore, the point indicated by the target coordinates is used as the true center point of the entity to be rendered, realizing that the action central axis points are in the same position.

[0073] S107. Use the physical coordinates as the coordinates of the true center point in the frame to be rendered, and obtain the position parameters of the entity to be rendered according to the coordinates of the true center point in the frame to be rendered.

[0074] In this embodiment, the physical coordinates of the entity to be rendered refer to the actual coordinates of the action central axis point of the image of the entity to be rendered in the frame to be rendered.

[0075] In this embodiment, for the specific method of obtaining the physical coordinates, please refer to the prior art.

[0076] S108. Obtain the rotation parameter according to the static rotation angle.

[0077] In this embodiment, the static rotation angle indicates the rotation angles of each dimension, and the static rotation angle is converted into a rotation parameter according to the interface rule. Specifically, taking the static rotation angle p = 45° of the entity to be rendered as an example, the calculation method of the rotation parameter rotation(ai) is as follows:

[0078] rotation(ai) = Quaternion.Euler(new Vector3(45, 0, 0)).

[0079] S109. Obtain the transformation matrix of the model to be rendered based on the parameter vectors of each entity to be rendered in the model to be rendered.

[0080] In this embodiment, the parameter vector of the entity to be rendered consists of the position parameter, rotation parameter, and scaling parameter of the entity to be rendered.

[0081] Calculate the transformation matrix matrix = Matrix4x4.TRS(position(ai), rotation(ai), scale(ai)).

[0082] S110. Generate the rendering information of the model to be rendered and send the rendering information of the model to be rendered to the GPU.

[0083] In this embodiment, the rendering information of the model to be rendered includes the transformation matrix, square grid, and material information. It should be noted that the method for obtaining the material information refers to the prior art.

[0084] It should be noted that the GPU receives the rendering information of the model to be rendered and renders the real-time image of each entity to be rendered according to the rendering information of the model to be rendered.

[0085] It can be seen from the above technical solution that since the transformation matrix includes the parameter vectors of each entity to be rendered, and the scaling parameter in the parameter vector is generated based on the square grid and the size of the action image of the entity to be rendered, a rectangular grid corresponding to each entity to be rendered can be obtained according to the scaling parameter of each entity to be rendered and the square grid. Therefore, the GPU renders the real-time image of each entity to be rendered based on the rectangular grid, position parameter, rotation parameter, and material information. That is, this method utilizes the relationship between the rectangle and the square, and by transmitting the scaling parameters, the same grid, and the same material information of each entity to be rendered, the execution condition of the Gpu instance is achieved. Therefore, for the same model, the CPU only needs to submit the rendering data to the GPU once, so that the GPU uses the Gpu instance method to render the real-time image of the entity to be rendered in the frame to be rendered. Also, since the acquisition of the transformation matrix is a simple data calculation process, this method reduces the time consumption.

[0086] For example, in recent years, in order to improve the performance of real-time rendering, a dynamic batching method (referred to as CPU batching) is applied to dynamically merge the rendering data of entities to be rendered and then send it to the GPU, thereby reducing the number of requests from the CPU to the GPU. However, in the scenario of real-time rendering of a large number of entities to be rendered, during the process of the dynamic batching method, the CPU needs to merge a large number of Mesh meshes (wireless mesh networks) in the rendering data, which takes a long time and easily causes the screen to freeze. Therefore, the method proposed in this application, which processes the rendering data of entities to be rendered by means of Gpu instance batching to obtain batch rendering data, and sends the batch rendering data to the GPU so that the GPU renders the screen according to the batch rendering data, shortens the time-consuming compared with the dynamic batching method.

[0087] Figure 2 It is a schematic flowchart of a data processing method provided by an embodiment of the present application. As Figure 2 shown, this method includes:

[0088] S201. Obtain the name of the model to be rendered and the action information of multiple entities to be rendered.

[0089] In this embodiment, the entities to be rendered include the entities belonging to the model to be rendered in the frame to be rendered, and the action information is used to indicate the real-time actions of the entities to be rendered in the frame to be rendered. Optionally, the action information includes the animation name and the action serial number. It should be noted that the animation name is the name of the animation to which the action (denoted as the real-time action) of the entity to be rendered in the frame to be rendered belongs, and the action serial number is used to indicate the position of the real-time action in the action sequence of the animation. The action sequence includes a plurality of actions that make up the animation sorted by time preset.

[0090] It should be noted that there are various methods for obtaining the action information of the entities to be rendered. For details, refer to the above embodiments.

[0091] S202. Obtain the action images of the entities to be rendered according to the action information of the entities to be rendered.

[0092] In this embodiment, the action image includes the circumscribed rectangle image of the image of the entity to be rendered performing the action.

[0093] S203. Obtain the dynamic information of the entities to be rendered according to the action images of the entities to be rendered and the preset square grid.

[0094] In this embodiment, the dynamic information includes a dynamic scaling array and the coordinates of the original center point. The dynamic scaling array includes the ratio of the size of the action image in each dimension to the first standard value, and the first standard value is the side length of the square grid.

[0095] It should be noted that the method for obtaining the square grid can be referred to the prior art. The dynamic information obtained based on the action image of the entity to be rendered and the preset square grid can be stored offline in advance or calculated in real time. This embodiment does not limit this.

[0096] S204. Obtain the scaling parameter of the entity to be rendered based on the dynamic scaling array of the entity to be rendered.

[0097] In this embodiment, the scaling parameter of the entity to be rendered indicates the scaling multiple of the square grid in each dimension with respect to the rendered image of the entity to be rendered, where the rendered image is the real-time image of the entity to be rendered in the frame to be rendered.

[0098] It should be noted that there are various specific methods for obtaining the scaling parameter of the entity to be rendered based on the dynamic scaling array of the entity to be rendered. One optional method can be referred to the above embodiment.

[0099] S205. Generate and send the rendering information of the model to be rendered based on the parameter combinations of each entity to be rendered.

[0100] In this embodiment, the parameter combination of the entity to be rendered includes the scaling parameter, and the rendering information of the model to be rendered includes the square grid and the parameter combinations of each entity to be rendered.

[0101] It can be seen from the above technical solutions that in a data processing method provided by an embodiment of the present application, since the dynamic scaling array includes the ratio of the size of the action image in each dimension to the side length of the square grid, the scaling parameter of the entity to be rendered obtained based on the dynamic scaling array of the entity to be rendered can indicate the transformation relationship between the action image and the square grid. Since the rendering information of the model to be rendered includes the square grid and the parameter combinations of each entity to be rendered, where the parameter combination includes the scaling parameter of the entity to be rendered, the rendering information of the model to be rendered includes a square grid and the size transformation relationship between the square grid and multiple entities to be rendered. Therefore, by sending the rendering information of the model to be rendered to the rendering device at one time, it is not necessary to send the rendering information of each entity to be rendered one by one, which shortens the rendering time.

[0102] Figure 3 The structural schematic diagram of a data processing device provided by an embodiment of the present application is shown, as Figure 3 shown, the device may include:

[0103] An action information acquisition unit 301, configured to acquire the name of the model to be rendered and the action information of multiple entities to be rendered, where the entity to be rendered includes the entity belonging to the model to be rendered in the frame to be rendered;

[0104] The action image acquisition unit 302 is configured to acquire the action image of the entity to be rendered according to the action information of the entity to be rendered, where the action image includes the circumscribed rectangle image of the image of the entity to be rendered that executes the action;

[0105] The dynamic information acquisition unit 303 is configured to acquire the dynamic information of the entity to be rendered according to the action image of the entity to be rendered and a preset square grid, where the dynamic information includes a dynamic scaling array, and the dynamic scaling array includes the ratio of the size of the action image in each dimension to a first standard value, and the first standard value is the side length of the square grid;

[0106] The scaling parameter acquisition unit 304 is configured to acquire the scaling parameter of the entity to be rendered based on the dynamic scaling array of the entity to be rendered;

[0107] The rendering information acquisition unit 305 is configured to generate and send the rendering information of the model to be rendered based on the parameter combinations of the entities to be rendered, where the parameter combinations of the entities to be rendered include the scaling parameters, and the rendering information of the model to be rendered includes the square grid and the parameter combinations of the entities to be rendered.

[0108] Optionally, the scaling parameter acquisition unit is configured to acquire the scaling parameter of the entity to be rendered based on the dynamic scaling array of the entity to be rendered, including: specifically, the scaling parameter acquisition unit is configured to:

[0109] Acquire the static information of the entity to be rendered according to the name of the model to be rendered, where the static information includes a static scaling factor;

[0110] Use the product of the dynamic scaling array and the static scaling factor as the scaling parameter of the entity to be rendered.

[0111] Optionally, the scaling parameter acquisition unit is configured to acquire the static information of the entity to be rendered according to the name of the model to be rendered, including: specifically, the scaling parameter acquisition unit is configured to:

[0112] Acquire a preset configuration table, where the configuration table includes the corresponding relationship between preset models and static information;

[0113] Use the static information corresponding to the rendering model as the static information of the entity to be rendered.

[0114] Optionally, the static information further includes a static rotation angle, and the dynamic information further includes: the coordinates of the original center point, where the original center point is the action central axis point of the action image;

[0115] This device further includes: the position parameter acquisition unit is configured to:

[0116] Obtain the target coordinates according to the scaling parameter, static rotation angle of the entity to be rendered, and the coordinates of the original center point, and use the point indicated by the target coordinates as the true center point of the entity to be rendered. The true center point is the action central axis point of the action image after being transformed according to the scaling parameter and static rotation angle;

[0117] Obtain the physical coordinates, which are used to indicate the actual coordinates of the action central axis point of the image of the entity to be rendered in the frame to be rendered;

[0118] Use the physical coordinates as the coordinates of the true center point in the frame to be rendered, and obtain the position parameter of the entity to be rendered according to the coordinates of the true center point in the frame to be rendered;

[0119] Optionally, the device further includes: a rotation parameter acquisition unit for:

[0120] Obtain the rotation parameter of the entity to be rendered according to the static rotation angle.

[0121] Optionally, the device further includes: a material information acquisition unit for:

[0122] Obtain the material information of the model to be rendered according to the name of the model to be rendered.

[0123] Optionally, the parameter combination of the entity to be rendered further includes the position parameter and the rotation parameter; the rendering information of the model to be rendered further includes the material information.

[0124] Figure 4 The structural schematic diagram of the data processing device is shown. The device may include: at least one processor 401, at least one communication interface 402, at least one memory 403, and at least one communication bus 404;

[0125] In the embodiments of the present application, the number of the processor 401, the communication interface 402, the memory 403, and the communication bus 404 is at least one, and the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404;

[0126] The processor 401 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0127] The memory 403 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0128] Among them, the memory stores a program, and the processor can execute the program stored in the memory to implement each step of a data processing method provided by an embodiment of the present application, as follows:

[0129] A data processing method includes:

[0130] Obtain the name of the model to be rendered and the action information of multiple entities to be rendered, where the entities to be rendered include the entities belonging to the model to be rendered in the frame to be rendered;

[0131] According to the action information of the entity to be rendered, obtain the action image of the entity to be rendered, where the action image includes the circumscribed rectangle image of the image of the entity to be rendered performing the action;

[0132] According to the action image of the entity to be rendered and a preset square grid, obtain the dynamic information of the entity to be rendered, where the dynamic information includes a dynamic scaling array, and the dynamic scaling array includes the ratio of the size of the action image in each dimension to a first standard value, and the first standard value is the side length of the square grid;

[0133] Based on the dynamic scaling array of the entity to be rendered, obtain the scaling parameter of the entity to be rendered;

[0134] Based on the parameter combinations of each entity to be rendered, generate and send the rendering information of the model to be rendered, where the parameter combination of the entity to be rendered includes the scaling parameter, and the rendering information of the model to be rendered includes the square grid and the parameter combinations of each entity to be rendered.

[0135] Optionally, based on the dynamic scaling array of the entity to be rendered, obtaining the scaling parameter of the entity to be rendered includes:

[0136] According to the name of the model to be rendered, obtain the static information of the entity to be rendered, where the static information includes the static scaling multiple;

[0137] Take the product of the dynamic scaling array and the static scaling multiple as the scaling parameter of the entity to be rendered.

[0138] Optionally, according to the name of the model to be rendered, obtaining the static information of the entity to be rendered includes:

[0139] Obtain a preset configuration table, where the configuration table includes the correspondence between preset models and static information;

[0140] Take the static information corresponding to the rendering model as the static information of the entity to be rendered.

[0141] Optionally, the static information further includes a static rotation angle, and the dynamic information further includes: the coordinates of the original center point, which are used to indicate the coordinates of the action central axis point of the action image;

[0142] The method further includes:

[0143] According to the static scaling multiple, static rotation angle of the to-be-rendered entity and the coordinates of the original center point, obtain target coordinates, and use the point indicated by the target coordinates as the real center point coordinates of the to-be-rendered entity, where the real center point coordinates are used to indicate the coordinates of the action central axis point of the action image after being transformed according to the static scaling multiple and static rotation angle;

[0144] Obtain physical coordinates, which are used to indicate the actual coordinates of the action central axis point of the image of the to-be-rendered entity in the to-be-rendered frame;

[0145] Use the physical coordinates as the coordinates of the real center point in the to-be-rendered frame, and according to the coordinates of the real center point in the to-be-rendered frame, obtain the position parameters of the to-be-rendered entity;

[0146] The position parameters of the to-be-rendered entity are obtained according to the real center coordinates and physical coordinates of the to-be-rendered entity, and the physical coordinates are used to indicate the coordinates of the action central axis point of the image of the to-be-rendered entity in the previous frame of the to-be-rendered frame.

[0147] Optionally, it further includes:

[0148] According to the static rotation angle, obtain the rotation parameters of the to-be-rendered entity.

[0149] Optionally, it further includes:

[0150] According to the name of the to-be-rendered model, obtain the material information of the to-be-rendered model.

[0151] Optionally, the parameter combination of the to-be-rendered entity further includes the position parameters and the rotation parameters; the rendering information of the to-be-rendered model further includes the material information.

[0152] An embodiment of the present application further provides a readable storage medium, which can store a computer program suitable for being executed by a processor. When the computer program is executed by the processor, it realizes each step of a data processing method provided by the embodiment of the present application, as follows:

[0153] A data processing method includes:

[0154] Obtain the name of the to-be-rendered model and the action information of multiple to-be-rendered entities, where the to-be-rendered entities include the entities belonging to the to-be-rendered model in the to-be-rendered frame;

[0155] Obtain the action image of the entity to be rendered according to the action information of the entity to be rendered, where the action image includes the circumscribed rectangle image of the image of the entity to be rendered performing the action;

[0156] Obtain the dynamic information of the entity to be rendered according to the action image of the entity to be rendered and a preset square grid, where the dynamic information includes a dynamic scaling array, and the dynamic scaling array includes the ratio of the size of the action image in each dimension to a first standard value, and the first standard value is the side length of the square grid;

[0157] Obtain the scaling parameter of the entity to be rendered based on the dynamic scaling array of the entity to be rendered;

[0158] Generate and send the rendering information of the model to be rendered based on the parameter combinations of each entity to be rendered, where the parameter combination of the entity to be rendered includes the scaling parameter, and the rendering information of the model to be rendered includes the square grid and the parameter combinations of each entity to be rendered.

[0159] Optionally, obtaining the scaling parameter of the entity to be rendered based on the dynamic scaling array of the entity to be rendered includes:

[0160] Obtain the static information of the entity to be rendered according to the name of the model to be rendered, where the static information includes a static scaling multiple;

[0161] Use the product of the dynamic scaling array and the static scaling multiple as the scaling parameter of the entity to be rendered.

[0162] Optionally, obtaining the static information of the entity to be rendered according to the name of the model to be rendered includes:

[0163] Obtain a preset configuration table, where the configuration table includes the correspondence between preset models and static information;

[0164] Use the static information corresponding to the rendering model as the static information of the entity to be rendered.

[0165] Optionally, the static information further includes a static rotation angle, and the dynamic information further includes: the coordinates of the original center point, and the coordinates of the original center point are used to indicate the coordinates of the action central axis point of the action image;

[0166] The method further includes:

[0167] Obtain the target coordinates based on the static scaling factor, static rotation angle, and the coordinates of the original center point of the entity to be rendered, and use the point indicated by the target coordinates as the true center point coordinates of the entity to be rendered. The true center point coordinates are used to indicate the coordinates of the action central axis point of the action image transformed according to the static scaling factor and static rotation angle;

[0168] Obtain the physical coordinates, which are used to indicate the actual coordinates of the action central axis point of the image of the entity to be rendered in the frame to be rendered;

[0169] Use the physical coordinates as the coordinates of the true center point in the frame to be rendered, and obtain the position parameters of the entity to be rendered based on the coordinates of the true center point in the frame to be rendered;

[0170] The position parameters of the entity to be rendered are obtained based on the true center coordinates and physical coordinates of the entity to be rendered. The physical coordinates are used to indicate the coordinates of the action central axis point of the image of the entity to be rendered in the previous frame of the frame to be rendered.

[0171] Optionally, it further includes:

[0172] Obtain the rotation parameters of the entity to be rendered according to the static rotation angle.

[0173] Optionally, it further includes:

[0174] Obtain the material information of the model to be rendered according to the name of the model to be rendered.

[0175] Optionally, the parameter combination of the entity to be rendered further includes the position parameters and the rotation parameters; the rendering information of the model to be rendered further includes the material information.

[0176] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0177] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other.

[0178] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, characterized in that, the method includes: Obtain the name of the model to be rendered and the action information of multiple entities to be rendered, where the entities to be rendered include the entities belonging to the model to be rendered in the frame to be rendered; According to the action information of the entity to be rendered, obtain the action image of the entity to be rendered, where the action image includes the circumscribed rectangle image of the image of the entity to be rendered performing the action; According to the action image of the entity to be rendered and a preset square grid, obtain the dynamic information of the entity to be rendered, where the dynamic information includes a dynamic scaling array, and the dynamic scaling array includes the ratio of the size of the action image in each dimension to a first standard value, and the first standard value is the side length of the square grid; Based on the dynamic scaling array of the entity to be rendered, obtain the scaling parameter of the entity to be rendered; Based on the parameter combinations of each of the entities to be rendered, generate and send the rendering information of the model to be rendered, where the parameter combination of the entity to be rendered includes the scaling parameter, and the rendering information of the model to be rendered includes the square grid and the parameter combinations of each of the entities to be rendered.

2. The method according to claim 1, characterized in that, the obtaining the scaling parameter of the entity to be rendered based on the dynamic scaling array of the entity to be rendered includes: According to the name of the model to be rendered, obtain the static information of the entity to be rendered, where the static information includes a static scaling multiple; the static scaling multiple of the entity to be rendered is the scaling multiple of the action image of the entity to be rendered; Use the product of the dynamic scaling array and the static scaling multiple as the scaling parameter of the entity to be rendered.

3. The method according to claim 2, characterized in that, the obtaining the static information of the entity to be rendered according to the name of the model to be rendered includes: Obtain a preset configuration table, where the configuration table includes the correspondence between preset models and static information; Use the static information corresponding to the rendering model as the static information of the entity to be rendered.

4. The method according to claim 2, characterized in that, the static information further includes a static rotation angle, and the dynamic information further includes: the coordinates of the original center point, where the original center point is the action mid-axis point of the action image; the method further includes: According to the scaling parameter, static rotation angle and coordinates of the original center point of the entity to be rendered, obtain the target coordinates, and use the point indicated by the target coordinates as the real center point of the entity to be rendered, where the real center point is the action mid-axis point of the action image transformed according to the scaling parameter and static rotation angle; Obtain the physical coordinates, where the physical coordinates are used to indicate the actual coordinates of the action mid-axis point of the image of the entity to be rendered in the frame to be rendered; Use the physical coordinates as the coordinates of the real center point in the frame to be rendered, and according to the coordinates of the real center point in the frame to be rendered, obtain the position parameter of the entity to be rendered.

5. The method according to claim 4, characterized in that, the method further includes: Obtain the rotation parameters of the entity to be rendered according to the static rotation angle.

6. The method according to claim 5, wherein, the method further includes: Obtain the material information of the model to be rendered according to the name of the model to be rendered.

7. The method according to claim 6, wherein, The parameter combination of the entity to be rendered further includes the position parameter and the rotation parameter; the rendering information of the model to be rendered further includes material information.

8. A data processing device, wherein, comprising: An action information acquisition unit, configured to acquire the name of the model to be rendered and the action information of a plurality of entities to be rendered, where the entities to be rendered include the entities belonging to the model to be rendered in the frame to be rendered; An action image acquisition unit, configured to acquire the action image of the entity to be rendered according to the action information of the entity to be rendered, where the action image includes the circumscribed rectangular image of the image of the entity to be rendered performing the action; A dynamic information acquisition unit, configured to acquire the dynamic information of the entity to be rendered according to the action image of the entity to be rendered and a preset square grid, where the dynamic information includes a dynamic scaling array, and the dynamic scaling array includes the ratio of the size of the action image in each dimension to a first standard value, and the first standard value is the side length of the square grid; A scaling parameter acquisition unit, configured to acquire the scaling parameters of the entity to be rendered based on the dynamic scaling array of the entity to be rendered; A rendering information acquisition unit, configured to generate and send the rendering information of the model to be rendered based on the parameter combinations of the respective entities to be rendered, where the parameter combination of the entity to be rendered includes the scaling parameter, and the rendering information of the model to be rendered includes the square grid and the parameter combinations of the respective entities to be rendered.

9. A data processing device, wherein, comprising: A memory and a processor; The memory is used to store programs; The processor is configured to execute the program to implement each step of the data processing method according to any one of claims 1 to 7.

10. A readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, each step of the data processing method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Batch rendering method, device and system for skeletal animations and storage medium

    CN109840931A

  • Batch processing rendering method for game scene, device and server

    CN111744182A