Virtual scene rendering processing method and device, program product and electronic equipment

Automating virtual scene tile selection and rendering through reinforcement learning technology solves the problem of low manual selection efficiency, achieves efficient and beautiful virtual scene rendering, and expands the scope of application and reusability.

CN118823151APending Publication Date: 2024-10-22NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410789980.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

Existing virtual scene rendering technology requires manual selection and drawing of tiles, resulting in low efficiency and high labor costs and time.

Method used

Adopt a method based on reinforcement learning to automatically select and render tiles by obtaining weight information and selection preference information, and use the positional relationship between the unit area to be rendered and its neighboring unit areas and tile usage information to determine the target tile and ensure a unified style. and improve accuracy.

Benefits of technology

It realizes automated tile selection and rendering, improves efficiency, ensures the beauty and coordination of the rendered virtual scene, and expands the scope of application and reusability of the virtual scene rendering processing method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118823151A_ABST
    Figure CN118823151A_ABST
Patent Text Reader

Abstract

The invention provides a virtual scene rendering processing method and device, a program product and electronic equipment, and relates to the technical field of computers. The method comprises the following steps: obtaining weight information and selection preference information obtained by reinforcement learning training based on a first virtual scene; obtaining a second virtual scene; the second virtual scene comprises a plurality of second unit areas, and each second unit area comprises one or more unit areas to be rendered; according to the position relationship between the to-be-rendered unit region and a first neighborhood unit region of the to-be-rendered unit region, the block use information of the first neighborhood unit region, the weight information and the selection preference information, obtaining the selection probability of the to-be-rendered unit region for each preset block; and according to the selection probability of the to-be-rendered unit region for each preset block and each preset block, determining a target block for rendering the to-be-rendered unit region. According to the method and the device, automatic block selection and block rendering are realized, and the virtual scene rendering processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a virtual scene rendering processing method, a virtual scene rendering processing device, a computer program product, and an electronic device. Background Art

[0002] The rendering of virtual scenes is often used in film, television, games, animation and other fields. By rendering virtual scenes, rich and varied pictures can be presented, thereby enhancing the user's sense of immersion and improving the user's viewing experience.

[0003] In the related art, workers are usually required to manually select blocks based on their experience, and then draw the selected blocks in the virtual scene. Each time a different block is drawn, the block selection and block drawing operations need to be repeated. Obviously, this method requires high manpower and time costs and is inefficient. Summary of the invention

[0004] The present disclosure provides a virtual scene rendering processing method, a virtual scene rendering processing device, a computer program product and an electronic device, thereby improving the problem of low efficiency of virtual scene rendering processing at least to a certain extent.

[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0006] According to a first aspect of the present disclosure, a virtual scene rendering processing method is provided, comprising: obtaining weight information and selection preference information obtained by performing reinforcement learning training based on a first virtual scene; the first virtual scene comprises a plurality of first unit areas, and the first unit areas are rendered by preset tiles; the weight information is used to characterize the distribution state of each of the unit areas in the virtual scene, and the selection preference information is used to characterize the selection tendency of the unit area for the preset tiles predicted by the reinforcement learning model; obtaining a second virtual scene; the second virtual scene comprises a plurality of second unit areas, and the second unit areas comprise one or more unit areas to be rendered; according to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and selection preference information, obtaining the selection probability of the unit area to be rendered for each preset tile; the tile usage information of the first neighboring unit area represents the preset tile used for rendering the first neighboring unit area; according to the selection probability of the unit area to be rendered for each preset tile and each preset tile, determining the target tile for rendering the unit area to be rendered.

[0007] According to a second aspect of the present disclosure, a virtual scene rendering processing device is provided, comprising: an information acquisition module, configured to acquire weight information and selection preference information obtained by reinforcement learning training based on a first virtual scene; the first virtual scene includes a plurality of first unit areas, and the first unit areas are rendered by preset blocks; the weight information is used to characterize the distribution state of each of the unit areas in the virtual scene, and the selection preference information is used to characterize the selection tendency of the unit area for the preset block predicted by the reinforcement learning model; a data acquisition module is configured to acquire a second virtual scene; the second virtual scene includes a plurality of second unit areas, and the second unit areas The domain includes one or more unit areas to be rendered; a selection probability acquisition module is configured to obtain the selection probability of the unit area to be rendered for each preset tile according to the positional relationship between the unit area to be rendered and the first neighborhood unit area of ​​the unit area to be rendered, the tile usage information of the first neighborhood unit area, and the weight information and the selection preference information; the tile usage information of the first neighborhood unit area represents the preset tiles used for rendering the first neighborhood unit area; and a target tile determination module is configured to determine the target tile used for rendering the unit area to be rendered according to the selection probability of the unit area to be rendered for each preset tile and each preset tile.

[0008] According to a third aspect of the present disclosure, a computer program is provided. When the computer program is executed by a processor, the virtual scene rendering processing method and possible implementation methods thereof of the first aspect are implemented.

[0009] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor, wherein the processor is configured to execute the virtual scene rendering processing method and possible implementation manner of the virtual scene rendering processing method of the first aspect by executing the executable instructions.

[0010] The technical solution disclosed in this disclosure has the following beneficial effects:

[0011] On the one hand, automatic tile selection and tile rendering are realized, which greatly improves efficiency compared with the manual selection and drawing of tiles. On the other hand, the reinforcement learning model obtained by reinforcement learning training based on the first virtual scene can obtain the target tile for rendering the area to be rendered according to the positional relationship between the unit area to be rendered and its neighboring unit area, and the tile usage information of the neighboring unit area, which can ensure the unity of style between the target tile and the surrounding tiles, making the rendered virtual scene more beautiful and coordinated. In addition, through reinforcement learning training of different types of first virtual scenes, it is possible to determine the target tile of different types of second virtual scenes, expand the scope of application of the virtual scene rendering processing method, and improve the reusability and flexibility of the virtual scene rendering processing method. On the other hand, based on the first virtual scene, the weight information and selection preference information obtained by reinforcement learning training are used to determine the target tile of the unit area to be rendered, which can effectively improve the accuracy of obtaining the target tile and further improve efficiency.

[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0014] Figure 1 The system operation architecture of this exemplary embodiment is shown;

[0015] Figure 2 A flowchart of a virtual scene rendering processing method in this exemplary embodiment is shown;

[0016] Figure 3 A flowchart showing a method of acquiring weight information and selecting preference information in this exemplary embodiment is shown;

[0017] Figure 4 A schematic diagram showing a first virtual scene in this exemplary embodiment;

[0018] Figure 5 A flow chart showing a method for determining an occurrence probability in this exemplary embodiment;

[0019] Figure 6 A flowchart showing a method for obtaining block prediction information in this exemplary embodiment is shown;

[0020] Figure 7 A flow chart showing a method for obtaining selection probabilities of a unit area to be rendered for each preset block in this exemplary embodiment is shown;

[0021] Figure 8 A flowchart showing a method for iterating a reinforcement learning model K times to obtain a target tile in this exemplary embodiment;

[0022] Fig. 9 A schematic diagram showing the structure of a virtual scene rendering processing device in this exemplary embodiment is shown;

[0023] Fig.10 A schematic structural diagram of an electronic device in this exemplary embodiment is shown. DETAILED DESCRIPTION

[0024] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0025] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0026] In the related art, staff usually need to design virtual scenes in advance. During the virtual scene rendering process, they manually select and draw tiles based on the virtual scene design drawings. For example, in the process of drawing virtual maps through the tilemap technology in Unity, a real-time 3D interactive content creation and operation platform, staff are required to repeatedly select tiles from the drawing board and draw them with clicks. It can be seen that this method is highly dependent on the design ability of the staff, and during the virtual scene rendering process, a lot of time is required to repeatedly perform the same operation, which makes the virtual scene rendering process inefficient.

[0027] In view of one or more of the above problems, the exemplary embodiments of the present disclosure first provide a virtual scene rendering processing method. Figure 1 The system architecture of the operating environment of this exemplary embodiment will be described.

[0028] refer to Figure 1 As shown, the system architecture 100 may include a terminal device 110 and a server 120. The terminal device 110 may be an electronic device such as a tablet computer, a laptop computer, a desktop computer, etc., and the terminal device 110 may be used to obtain a unit area to be rendered. The server 120 generally refers to a background system that provides services related to virtual scene rendering processing in this exemplary embodiment, such as a server that implements a virtual scene rendering processing method. The server 120 may be a cluster formed by one server or multiple servers, which is not limited in this disclosure. The terminal device 110 and the server 120 may be connected via a wired or wireless communication link to exchange data.

[0029] The virtual scene rendering processing method in this exemplary embodiment may be executed by the terminal device 110. For example, in a game scene, the terminal device 110 may be a computer used by an artist, the first virtual scene may be a virtual scene that has been rendered, and the second virtual scene may be a virtual scene that is being rendered. The terminal device 110 determines the target block for rendering the second virtual scene in the preset blocks by executing the virtual scene rendering processing method to implement rendering processing of the second virtual scene.

[0030] In one embodiment, the terminal device 110 can determine the unit area to be rendered, the positional relationship between the unit area to be rendered and its first neighboring unit area, and the tile usage information of the first neighboring unit area in the second virtual scene, and send the determined relevant information of the unit area to be rendered to the server 120. After receiving the relevant information of the unit area to be rendered sent by the terminal device 110, the server 120 can obtain the weight information and selection preference information obtained by reinforcement learning training based on the first virtual scene, and obtain the selection probability of the unit area to be rendered for each preset tile according to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and selection preference information, and determine the target tile for rendering the unit area to be rendered according to the selection probability of the unit area to be rendered for each preset tile and each preset tile; then send the information of the target tile to the terminal device 110, so that the terminal device 110 renders the unit area to be rendered based on the target tile.

[0031] It can be seen from the above that the virtual scene rendering processing method in this exemplary embodiment can be executed by the above-mentioned terminal device 110 or server 120.

[0032] Combine the following Figure 2 The virtual scene rendering processing method is described. Figure 2 An exemplary process of a virtual scene rendering processing method is shown, including the following steps S210 to S240:

[0033] Step S210, obtaining weight information and selection preference information obtained by performing reinforcement learning training based on the first virtual scene; the first virtual scene includes a plurality of first unit areas, and the first unit areas are rendered by preset blocks; the weight information is used to characterize the distribution state of each unit area in the virtual scene, and the selection preference information is used to characterize the selection tendency of the unit area predicted by the reinforcement learning model for the preset block;

[0034] Step S220, obtaining a second virtual scene; the second virtual scene includes a plurality of second unit areas, and the second unit areas include one or more unit areas to be rendered;

[0035] Step S230, obtaining the selection probability of the unit area to be rendered for each preset tile according to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and the selection preference information; the tile usage information of the first neighboring unit area indicates the preset tile used for rendering the first neighboring unit area;

[0036] Step S240 , determining a target image block for rendering the unit area to be rendered according to the selection probability of the unit area to be rendered for each preset image block and each preset image block.

[0037] Based on the above method, on the one hand, automatic tile selection and tile rendering are realized, which greatly improves efficiency compared with the manual selection and drawing of tiles. On the other hand, the reinforcement learning model obtained by reinforcement learning training based on the first virtual scene can obtain the target tile for rendering the area to be rendered according to the positional relationship between the unit area to be rendered and its neighboring unit area, and the tile usage information of the neighboring unit area, which can ensure the unity of the style of the target tile and its surrounding tiles, making the rendered virtual scene more beautiful and coordinated, and through reinforcement learning training of different types of first virtual scenes, it is possible to determine the target tile of different types of second virtual scenes, expand the scope of application of the virtual scene rendering processing method, and improve the reusability and flexibility of the virtual scene rendering processing method. On the other hand, based on the weight information and selection preference information obtained by reinforcement learning training of the first virtual scene, the target tile of the unit area to be rendered is determined, which can effectively improve the accuracy of obtaining the target tile and further improve efficiency.

[0038] Below Figure 2 Each step in the procedure is described in detail.

[0039] refer to Figure 2 In step S210, weight information and selection preference information obtained by reinforcement learning training based on the first virtual scene are obtained; the first virtual scene includes multiple first unit areas, and the first unit areas are rendered by preset blocks; the weight information is used to characterize the distribution state of each unit area in the virtual scene, and the selection preference information is used to characterize the selection tendency of the unit area predicted by the reinforcement learning model for the preset blocks.

[0040] By acquiring and using in subsequent steps the weight information and selection preference information obtained after reinforcement learning training based on the first virtual scene, the reinforcement learning model can accurately recommend tiles to be used in the unit area.

[0041] Among them, the first virtual scene is the training material used for reinforcement learning training, the unit area may include a local area in the virtual scene, and the first unit area may include unit areas of the same size obtained by gridding the first virtual scene; for example, the first virtual scene may be a training material of size 11×11, and the size of 11×11 means that the length of the training material is the sum of the lengths of 11 unit areas, and the width of the training material is the sum of the lengths of 11 unit areas, that is, the training material is a square area composed of 121 unit areas. It should be noted that during the training process, first virtual scenes of the same size can be used for training, and first virtual scenes of different sizes can be used for training, and the present disclosure is not limited to this.

[0042] The above-mentioned preset tiles may include tiles of different categories contained in all the first virtual scenes used in the training process. The unit area can be rendered by the tiles so that the unit area presents a display effect consistent with the tiles. Exemplarily, the tiles may include tiles used in Tilemap technology, which can be designed in advance by the staff according to the overall style of the virtual scene.

[0043] The above-mentioned reinforcement learning model may include a machine learning model that continuously adjusts the behavior strategy based on the reinforcement learning algorithm to achieve the optimal decision-making process. For example, the reinforcement learning algorithm may include Q-Learning (Q learning), Deep Q-Learning (Deep Q-Learning, DQN), etc.

[0044] The above-mentioned weight information can be used to describe each distribution state between each unit area in the virtual scene. The distribution state can be used to characterize the connection between the tiles used in the unit area and the tiles used in its neighboring unit areas, and the connection can be determined by obtaining the probability of occurrence of each combination of the tiles in the unit area and the tiles in its neighboring unit areas at each position in the virtual scene; taking the first virtual scene as an example, the first virtual scene may include a first unit area A using tile a and its neighboring unit area B using tile b, and a neighboring unit area C using tile c, then the weight information may include the probability of each combination between tile b and tile a appearing in two adjacent first unit areas in the first virtual scene, and the probability of each combination between tile c and tile a appearing in two adjacent first unit areas in the first virtual scene; the combination means that tile b or tile c can be distributed in various directions adjacent to tile a, such as "above", "below", "left" and "right".

[0045] The above-mentioned selection preference information can be used to describe the selection tendency of a certain unit area predicted by the reinforcement learning model for each preset tile, and can also be understood as the result of optimizing the selection probability of the unit area predicted by the reinforcement learning model for each preset tile. Exemplarily, the selection preference information can be a matrix with the same dimension as the total number of preset tiles TileCount, such as Bias[TileCount] represents the selection preference information. Since the reinforcement learning model cannot predict the selection tendency of the unit area for each predicted tile before training, the initial value of Bias[TileCount] can be 0.

[0046] Since the weight information and the selection preference information are obtained after the reinforcement learning model is trained, it is necessary to train the reinforcement learning model based on the first virtual scene to obtain the weight information and the selection preference information. In one embodiment, the weight information and the selection preference information obtained by the reinforcement learning training based on the first virtual scene are obtained by referring to Figure 3 As shown, steps S310 to S350 may be included:

[0047] Step S310: In the first virtual scene, traverse the first unit areas and determine a second neighboring unit area of ​​any first unit area.

[0048] Among them, the neighborhood unit area may include a unit area with blocks around any unit area in the virtual scene, and the second neighborhood unit area may include the neighborhood unit area of ​​each unit area in the first virtual scene; for example, the neighborhood unit area may include a unit area adjacent to any unit area. In one embodiment, the neighborhood unit area of ​​the unit area may be obtained according to the following steps:

[0049] A preset neighborhood scale is obtained, and a neighborhood reference range corresponding to the unit area is determined according to the preset neighborhood scale. In the virtual scene, the unit area within the neighborhood reference range is determined as a neighborhood unit area of ​​the unit area.

[0050] The preset neighborhood scale may be a basis for determining the neighborhood reference range in the virtual scene. The present disclosure does not specifically limit the specific value of the preset neighborhood scale. For example, the preset neighborhood scale R=2, 2 may represent two unit areas, and then it may represent that two unit areas adjacent to the unit area in all directions are determined as the neighborhood unit area. For example, reference Figure 4 As shown, Figure 4 A virtual scene with a size of 11×11 is shown. The neighborhood unit area of ​​the unit area 401 can be determined according to the preset neighborhood scale: When the preset neighborhood scale R=2, the neighborhood reference range can be determined according to the preset neighborhood scale and the position of the unit area 401. Figure 4In the gray shaded area, if the unit areas 402-425 all use tiles, then the unit areas 402-409 are the neighboring unit areas corresponding to the unit area 401 when R=1, and the unit areas 402-425 are the neighboring unit areas corresponding to the unit area 401 when R=2.

[0051] By traversing the first unit area, a second neighboring unit area of ​​the first unit area can be determined according to unit areas surrounding the first unit area.

[0052] Continue to refer Figure 3 In step S320, the block prediction information of any first unit area is determined according to the positional relationship between any first unit area and the second neighboring unit area of ​​any first unit area, the block usage information of the second neighboring unit area, and the weight information.

[0053] Among them, the positional relationship can be used to describe the direction in which the neighboring unit area is located in the unit area, and the distance between the neighboring unit area and the unit area. The present disclosure does not specifically limit the method of obtaining the positional relationship. Exemplarily, a coordinate system can be established with any unit area as the origin, and the positional relationship can be described by the coordinates of the neighboring unit area in the coordinate system. Tile usage information can be used to characterize which category of tiles is used in the unit area. For example, the tile usage information may include tile numbers, and different categories of tiles have different tile numbers. Tile prediction information is used to characterize the probability of selection of the unit area for the original tile predicted by the reinforcement learning model. The original tile may be a preset tile that the unit area is using.

[0054] Before training the reinforcement learning model, the parameters of the model need to be initialized. In one embodiment, before determining the tile prediction information of any first unit area according to the positional relationship between any first unit area and any second neighboring unit area of ​​the first unit area, the tile usage information of the second neighboring unit area, and the weight information, the above method may further include the following steps:

[0055] Initialize weight information and select preference information.

[0056] The above-mentioned initialization weight information may include the following steps:

[0057] The second neighborhood unit area is traversed to obtain the occurrence probability corresponding to each combination of any first unit area and any second neighborhood unit area, so as to initialize the weight information based on the occurrence probability. That is, each distribution state between any first unit area and its corresponding second neighborhood unit areas is recorded in the weight information.

[0058] The above-mentioned probability of occurrence corresponding to each combination of any first unit area and any second neighboring unit area is obtained, refer to Figure 5 As shown, steps S510 to S520 may be included:

[0059] Step S510, determining a value range of the occurrence probability according to the inverse of a preset neighborhood scale; wherein the preset neighborhood scale is used to determine a neighborhood unit area corresponding to the unit area in the first virtual scene or the second virtual scene;

[0060] Step S520, obtaining a random value within the value range of the occurrence probability, and determining the occurrence probability based on the random value.

[0061] The upper and lower limits of the occurrence probability are determined by the reciprocal of the preset neighborhood scale. The smaller the preset neighborhood scale, the larger the range of the above-mentioned occurrence probability. Thus, it is simulated that the smaller the preset neighborhood scale, the smaller the size of the neighborhood reference range. The smaller the neighborhood unit area in the neighborhood reference range, the greater the influence on the process of selecting blocks for its corresponding unit area. For example, Figure 4 As shown, when the preset neighborhood scale R=1, the influence of the neighborhood unit areas 402-409 on the selection of the block of the unit area 401 is greater than the influence of the neighborhood unit areas 402-425 on the selection of the block of the unit area 401 when R=2.

[0062] For example, the total number of preset tiles can be represented by TileCount, and the preset neighborhood scale is R. Since there are (2R+1)*(2R+1) kinds of relative position combinations between any first unit area and its corresponding second neighborhood unit area, and there are TileCount*TileCount kinds of combinations of types of preset tiles filled in any first unit area and its corresponding second neighborhood unit area, therefore, there are TileCount*(2R+1)*(2R+1)*TileCount distribution states between any first unit area and its corresponding second neighborhood unit area. The dimension of the weight information weights can be weights[TileCount*(2R+1)*(2R+1)*TileCount], and the initial value of each element in the weight information can be a random value in the range of [-1 / (2R+1),1 / (2R+1)].

[0063] based on Figure 5 The method can initialize the weight information according to the inverse of the preset neighborhood scale, thereby simulating the effect that the closer the neighborhood unit area is to the unit area, the greater the influence on the selection of the block of the unit area.

[0064] In one embodiment, the method further includes initializing the selection preference information according to a preset preference information initial value. The preset preference information initial value can be used to determine the initial value of the selection preference information. The present disclosure does not specifically limit the specific value of the preset preference information initial value. For example, the preset preference information initial value can be 0.

[0065] Exemplarily, since the selection preference information Bias is used to characterize the selection probability of the unit area for each preset tile, the dimension of Bias is the same as the total number of preset tiles. If the initial value of the preset preference information is 0, the initial value of Bias[TileCount] is 0.

[0066] By initializing the weight information and the selection preference information, the reinforcement learning model can better learn the distribution law of each unit area in the first virtual scene during the training process, thereby improving the generalization ability of the model.

[0067] After the weight information and the selection preference information are initialized, the training process of the reinforcement learning model can be continued. In one embodiment, the block prediction information of any first unit area is determined based on the positional relationship between any first unit area and any second neighboring unit area of ​​the first unit area, the block usage information of the second neighboring unit area, and the weight information. Figure 6 As shown, steps S610 to S620 may be included:

[0068] Step S610, determining target weight information associated with each second neighborhood unit area in the weight information;

[0069] Step S620: Obtain block prediction information corresponding to any first unit area according to the target weight information and the activation function of the reinforcement learning model.

[0070] By acquiring the distribution state of any first unit area and its corresponding second neighborhood unit area, as well as the activation function, the initial selection probability of any first unit area for each preset block predicted by the model can be obtained.

[0071] For example, if the size of the first virtual scene is 11×11, and the total number of preset tiles TileCount=8, then we can first create a matrix unactivated[11×11×8] for storing the selection tendency of each unit area for the preset tiles predicted by the model, and a matrix activated[11×11×8] for storing tile prediction information; secondly, initialize unactivated[11×11×8] and activated[11×11×8]: set the initial value of unactivated[11×11×8] to 0, and set the initial value of activated[11×11×8] to 1 / TileCount.

[0072] Create another training queue, determine the priority parameters of each second neighborhood unit area according to the corresponding elements of the second neighborhood unit area of ​​any first unit area in activated[11×11×8], and store the priority parameters of each second neighborhood unit area in the training queue, wherein the priority parameters of each second neighborhood unit area can be determined according to the sum of the selection probabilities of the second neighborhood unit area for each preset tile.

[0073] After the training queue is generated, the second neighborhood unit area with the largest priority parameter can be processed as the target neighborhood unit area:

[0074] If the position coordinates of any first unit area are (x, y), the i-th tile in the preset tiles is used (i is a positive integer, and i≤TileCount), and the number of the i-th tile is idx (tile usage information); the position coordinates of the target neighborhood unit area are (x-2, y-2); then the following code can be used to obtain the function GetWeight() according to the preset weights to determine the selection tendency of any first unit area for each preset tile in the weight information weights: unactivated[x, y, i]:

[0075] unactivated[x,y,i]+=weights.GetWeight(i,-2,-2,idx);

[0076] By modifying i and idx in the above code, the selection tendency of any first unit area for other preset tiles can be obtained; that is, based on the target weight information associated with any of the above first unit areas in the weight information, the influence of the tiles of the target neighborhood unit area on the tile selection tendency of any of the first unit areas can be obtained.

[0077] To obtain the selection probability Pr{A t=a} (block prediction information) as an example, unactivated[x, y, i] is input into the activation function, where i is equal to the index of the original block At, as shown in the following formula (1):

[0078]

[0079] Where At can represent the original tile used by any of the first unit areas, that is, the tile usage information, and H t (a) indicates the currently selected preset tile a in any first unit area. The i in unactivated[x,y,i] can be modified to the index corresponding to the preset tile a to obtain H. t (a); H t (b) indicates the selection tendency of any first unit area to other unselected preset blocks b. Then, i in unactivated[x, y, i] can be modified to the index of other preset blocks b to obtain H t (b); m=TileCount-1, used to represent the total number of preset tiles other than the original tile a.

[0080] It should be noted that the above activation function uses the softmax activation function. If other activation functions can obtain higher prediction accuracy, the softmax activation function can also be replaced by other activation functions.

[0081] based on Figure 6 The method can obtain the selection probability of the first unit area for the original tile predicted by the reinforcement learning model through weight information and activation function, thereby providing the possibility of updating the weight information and selection preference information through the selection probability of the original tile in subsequent steps.

[0082] Step S330, determining reward information or penalty information according to the tile prediction information of any first unit area and the tile usage information of any first unit area, and updating the weight information and the selection preference information based on the reward information or the penalty information;

[0083] Among them, the reward information is used to apply positive feedback to the weight information and selection preference information when the reinforcement learning model prediction is correct, that is, the preset tile selected by the first unit area predicted by the reinforcement learning model is the same as the original tile of the first unit area, and the penalty information is used to apply negative feedback to the weight information and selection preference information when the reinforcement learning model prediction is wrong.

[0084] By obtaining reward information or penalty information and updating weight information and selection preference information based on the reward information or penalty information, the reinforcement learning model can receive positive feedback when the prediction is correct and negative feedback when the preset is wrong, thereby improving the prediction accuracy of the model.

[0085] In one implementation, the determining of reward information or penalty information according to the block prediction information of any first unit area and the block usage information of any first unit area may include the following steps:

[0086] When the tile prediction information of any first unit area is consistent with the tile usage information of the first unit area, the reward information is determined based on the preset reward mechanism and the tile prediction information; otherwise, the penalty information is determined based on the preset penalty mechanism and the tile prediction information.

[0087] Among them, the preset reward mechanism and the preset penalty mechanism can be used to update the weight information and the selection preference information. For example, the tile prediction information activated[x, y, i] (i is equal to the index of the original tile At) of any first unit area is obtained, that is, the selection probability of any first unit area for the original tile At. If the selection probability of any first unit area for the original tile At is greater than the probability of selecting other preset tiles (that is, activated[x, y, i]>1-activated[x, y, i]), it can be determined that the tile a currently selected by any first unit area is the original tile At, that is, a=At. Based on this, the preset reward mechanism shown in the following formula (2) can be used to obtain the reward information H t+1 (a):

[0088] H t+1 (a) = H t (a)+α(1-activat"d$%,',i()(a=A t ) (2)

[0089] Wherein, a can be the learning rate of the reinforcement learning model, and its value can be determined according to the actual situation. For example, the value of a can be set to 0.1; α(1-activat"d$%,',i() is the reward information; H t+1 (a) is the updated selection preference information.

[0090] If the probability of any first unit area selecting the original tile At is less than the probability of selecting other preset tiles, it can be determined that the tile a currently selected by any first unit area is not the original tile At, that is, a≠At. Based on this, the penalty information H can be obtained according to the preset penalty mechanism shown in the following formula (3): t+1 (a):

[0091] H t+1 (a) = H t (a)-α*activat"d$%,',i()(a≠A t ) (3)

[0092] Among them, -α*activat"d$%,',i() can be the penalty information; H t+1 (a) may be updated selection preference information.

[0093] When the tile prediction information is consistent with the tile usage information, applying positive feedback to the reinforcement learning model can effectively improve the prediction accuracy of the reinforcement learning model, thereby accelerating the model convergence speed.

[0094] After obtaining the reward information or penalty information, the selection preference information and the weight information can be updated based on the reward information or penalty information. For example, the superposition result of the reward information or penalty information and the current selection preference information can be determined as the element value in the selection preference information Bias[TileCount] to update the selection preference information, and based on the above formula (3) and formula (4), the target weight information of any first unit area in the weight information is updated; after the weight information and the selection preference information are updated, the priority parameters of each second neighborhood unit area in the training queue are re-determined according to the updated weight information and the selection preference information to update the training queue, and the second neighborhood unit area with the largest priority parameter in the updated training queue is popped out, and the second neighborhood unit area is determined as the target neighborhood unit area, and unactivated[x,y,i] is re-determined based on the position coordinates of the target neighborhood unit area and the GetWeight() function to continue to obtain the penalty information or reward information, and the weight information and the selection preference information are updated based on the penalty information or reward information until the training queue is empty, so as to complete the training process of the first unit area and its second neighborhood unit area for the reinforcement learning model.

[0095] Continue to refer Figure 3 In step S340, continue to traverse the next first unit area of ​​any first unit area, and update the weight information and selection preference information based on the tile prediction information of the next first unit area. After all the first unit areas of the current first virtual scene are traversed, continue to traverse the next first virtual scene of the current first virtual scene until the reinforcement learning model converges to complete the reinforcement learning training.

[0096] The above-mentioned reinforcement learning model continuously learns the distribution pattern between the first unit area and its second neighborhood unit area. When the model converges, it means that the prediction results of the model are gradually approaching the actual results. The model has good generalization ability and can be used to predict the preset blocks selected by the unit area to be rendered in the second virtual scene.

[0097] In step S350, the weight information and selection preference information corresponding to the converged reinforcement learning model are obtained, and the block selection is predicted for the unit area to be rendered in the second virtual scene using the trained reinforcement learning model.

[0098] based on Figure 3 The method can realize the training of the reinforcement learning model based on the first virtual scene, improve the generalization ability of the reinforcement learning model after the training is completed, and enable the model to accurately predict the preset blocks that should be filled in the unit area to be rendered.

[0099] Continue to refer Figure 2 In step S220, a second virtual scene is obtained; the second virtual scene includes a plurality of second unit areas, and the second unit areas include one or more unit areas to be rendered.

[0100] Among them, the above-mentioned second virtual scene is a virtual scene to be rendered, the second unit area may be a unit area contained in the second virtual scene, the unit area to be rendered is a second unit area in the second virtual scene that does not contain tiles or needs to modify tiles. The present disclosure does not make any special limitation on the method of determining the unit area to be rendered. Exemplarily, the unit area to be rendered can be determined based on the position information of the user's click operation or touch operation in the second virtual scene.

[0101] After obtaining the second virtual scene, continue to refer to Figure 2 In step S230, the selection probability of the unit area to be rendered for each preset tile is obtained based on the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and selection preference information; the tile usage information of the first neighboring unit area represents the preset tile used to render the first neighboring unit area.

[0102] The first neighborhood unit area is a neighborhood unit area of ​​the unit area to be rendered in the second virtual scene. In one embodiment, the selection probability of the unit area to be rendered for each preset tile is obtained based on the positional relationship between the unit area to be rendered and the first neighborhood unit area of ​​the unit area to be rendered, the tile usage information of the first neighborhood unit area, and the weight information and the selection preference information, referring to Figure 7 As shown, steps S710 to S730 may be included:

[0103] Step S710, obtaining reward information or penalty information according to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and selection preference information;

[0104] Step S720, updating weight information and selection preference information based on reward information or penalty information;

[0105] Step S730 : obtaining the selection probability of each preset image block in the unit area to be rendered based on the updated selection preference information.

[0106] The selection probability of the unit area to be rendered for each preset tile is determined by the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, as well as the weight information and the selection preference information. That is, the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered and the tile usage information of the first neighboring unit area are input into the reinforcement learning model after training, so that the reinforcement learning model can predict the selection probability of the unit area to be rendered for each preset tile according to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered and the tile usage information of the first neighboring unit area.

[0107] The model based on the trained reinforcement learning predicts the tiles to be filled in the unit area to be rendered. It can automatically determine the probability of selecting each preset tile in the unit area to be rendered according to the tiles contained in the unit areas around the unit area to be rendered. Compared with the existing technology, it effectively improves the rendering processing efficiency of the unit area to be rendered.

[0108] After obtaining the selection probability of each preset block in the unit area to be rendered, continue to refer to Figure 2 In step S240, a target image block for rendering the unit area to be rendered is determined according to the selection probability of the unit area to be rendered for each preset image block and each preset image block.

[0109] The above-mentioned determining the target image block for rendering the unit area to be rendered according to the selection probability of each preset image block of the unit area to be rendered and each preset image block may include the following steps:

[0110] In the preset tiles corresponding to when the selection probability is greater than the selection probability threshold, N target tiles are randomly selected, where N is a positive integer;

[0111] Alternatively, the preset tiles are ranked from large to small according to the selection probability, and the target tile is determined according to the top N preset tiles.

[0112] The selection probability threshold may be a basis for selecting a target tile from preset tiles. The present disclosure does not impose any special limitation on the selection probability threshold. For example, the selection probability threshold may be 0.5.

[0113] Since the unit area to be rendered can be rendered based on one preset tile or based on the superposition result of multiple preset tiles, when determining the target tile in the preset tiles, the number of the target tiles can be one or more.

[0114] By randomly selecting N target tiles from the preset tiles corresponding to the selection probability greater than the selection probability threshold, the content richness of the second virtual scene can be enhanced, thereby improving the appearance diversity of the second virtual scene; determining the target tile based on the top N preset tiles can make the target tile consistent with the style of the tiles around the unit area to be rendered, thereby improving the overall coordination and aesthetics of the second virtual scene and improving the user's viewing experience.

[0115] Since there may be prediction errors in the process of determining the target tile through the reinforcement learning model, the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered can be obtained in the reinforcement learning model. After the tile usage information of the first neighboring unit area is obtained, multiple iterations can be performed to make the error range of the element value in the weight information and the selection preference information stabilize. Then, the target tile of the area to be rendered is determined based on the weight information and the selection preference information of the last iteration. Therefore, in one embodiment, reference Figure 8 As shown, the above method may further include steps S810 to S850:

[0116] Step S810, determining the number of iterations K, where K is a positive integer greater than 1;

[0117] Step S820, obtaining weight information and selection preference information obtained in the previous iteration process of the current iteration process;

[0118] Step S830, updating the weight information and selection preference information of the current iteration process according to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and selection preference information obtained in the previous iteration process, so as to obtain the weight information and selection preference information of the current iteration process;

[0119] Step S840, based on the weight information and selection preference information of the current iteration process, obtaining the selection probability of each preset block for the to-be-rendered unit area corresponding to the current iteration process;

[0120] Step S850, continue to execute the next round of iteration process of the current iteration process until K iteration processes are completed, and determine the target block for rendering the unit area to be rendered based on the selection probability of each preset block obtained in the Kth iteration process and each preset block.

[0121] Among them, the above-mentioned number of iterations is the number of predictions made by the reinforcement learning model on the selection probability of each preset tile for the same unit area to be rendered. The present disclosure does not specifically limit the method for determining the number of iterations. For example, the number of iterations can be determined by the staff based on experience, or it can be automatically determined based on the error range between the weight information and / or selection preference information of the previous round of iteration process of the current iteration process and the weight information and / or selection preference information of the current iteration process. For example, if the error range is less than the error threshold, the iteration is stopped; otherwise, the next round of iteration is continued according to the weight information and selection preference information of the current iteration process.

[0122] Through multiple iterations and using the weight information and selection preference information updated in the previous iteration in each iteration, the reinforcement learning model can continuously correct the weight information and selection preference information, effectively avoiding the problem of errors in the prediction process of the reinforcement learning model, thereby ensuring the accuracy of the selection of the target block.

[0123] Based on the above method, automatic tile selection and tile rendering are realized, which effectively reduces the labor cost and time cost in the process of rendering virtual scenes through tiles, thereby improving the rendering processing efficiency of virtual scenes.

[0124] The exemplary embodiment of the present disclosure also provides a virtual scene rendering processing device. Fig. 9 As shown, the virtual scene rendering processing device may include:

[0125] The information acquisition module 910 is configured to acquire weight information and selection preference information obtained by performing reinforcement learning training based on a first virtual scene; the first virtual scene includes a plurality of first unit areas, and the first unit areas are rendered by preset blocks; the weight information is used to characterize the distribution state of each unit area in the virtual scene, and the selection preference information is used to characterize the selection tendency of the unit area predicted by the reinforcement learning model for the preset block;

[0126] The data acquisition module 920 is configured to acquire a second virtual scene; the second virtual scene includes a plurality of second unit areas, and the second unit areas include one or more unit areas to be rendered;

[0127] The selection probability acquisition module 930 is configured to obtain the selection probability of the unit area to be rendered for each preset tile according to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and the selection preference information; the tile usage information of the first neighboring unit area indicates the preset tile used for rendering the first neighboring unit area;

[0128] The target block determination module 940 is configured to determine a target block for rendering the unit area to be rendered according to the selection probability of the unit area to be rendered for each preset block and each preset block.

[0129] In one embodiment, the above-mentioned acquisition of weight information and selection preference information obtained by performing reinforcement learning training based on the first virtual scene may include:

[0130] In the first virtual scene, traverse the first unit area and determine a second neighboring unit area of ​​any first unit area;

[0131] Determine the block prediction information of any first unit area according to the positional relationship between any first unit area and a second neighboring unit area of ​​any first unit area, the block usage information of the second neighboring unit area, and the weight information;

[0132] Determine reward information or penalty information according to the tile prediction information of any first unit area and the tile usage information of any first unit area, and update the weight information and the selection preference information based on the reward information or the penalty information;

[0133] Continue to traverse the next first unit area of ​​any first unit area, and update the weight information and the selection preference information based on the tile prediction information of the next first unit area. After all the first unit areas of the current first virtual scene are traversed, continue to traverse the next first virtual scene of the current first virtual scene until the reinforcement learning model converges to complete the reinforcement learning training;

[0134] Obtain the weight information and selection preference information corresponding to the converged reinforcement learning model.

[0135] In one embodiment, the determining of the block prediction information of any first unit area according to the positional relationship between any first unit area and the second neighboring unit area of ​​any first unit area, the block usage information of the second neighboring unit area, and the weight information may include:

[0136] In the weight information, target weight information associated with each second neighborhood unit area is determined;

[0137] According to the target weight information and the activation function of the reinforcement learning model, the block prediction information corresponding to any first unit area is obtained.

[0138] In one implementation, determining the reward information or penalty information according to the block prediction information of any first unit area and the block usage information of any first unit area may include:

[0139] When the tile prediction information of any first unit area is consistent with the tile usage information of the first unit area, the reward information is determined based on the preset reward mechanism and the tile prediction information; otherwise, the penalty information is determined based on the preset penalty mechanism and the tile prediction information.

[0140] In one embodiment, before determining the block prediction information of any first unit area according to the positional relationship between any first unit area and the second neighboring unit area of ​​any first unit area, the block usage information of the second neighboring unit area, and the weight information, the apparatus may further include:

[0141] Initialize weight information and select preference information.

[0142] In one implementation, the initialization weight information may include:

[0143] The second neighborhood unit area is traversed to obtain the occurrence probability corresponding to each combination of any first unit area and any second neighborhood unit area, so as to initialize the weight information based on the occurrence probability.

[0144] In one implementation, the obtaining of the occurrence probability corresponding to each combination of any first unit area and any second neighborhood unit area may include:

[0145] Determine the value range of the occurrence probability according to the inverse of the preset neighborhood scale; wherein the preset neighborhood scale is used to determine the neighborhood unit area corresponding to the unit area in the first virtual scene or the second virtual scene;

[0146] A random value within a range of occurrence probability is obtained, and the occurrence probability is determined based on the random value.

[0147] In one embodiment, obtaining the selection probability of the unit area to be rendered for each preset tile based on the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and the selection preference information may include:

[0148] Acquire reward information or penalty information according to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and the selection preference information;

[0149] Update weight information and selection preference information based on reward information or penalty information;

[0150] Based on the updated selection preference information, the selection probability of each preset block in the unit area to be rendered is obtained.

[0151] In one embodiment, determining the target image block for rendering the unit area to be rendered according to the selection probability of the unit area to be rendered for each preset image block and each preset image block may include:

[0152] In the preset tiles corresponding to when the selection probability is greater than the selection probability threshold, N target tiles are randomly selected, where N is a positive integer;

[0153] Alternatively, the preset tiles are ranked from large to small according to the selection probability, and the target tile is determined according to the top N preset tiles.

[0154] In one embodiment, the above device may further include:

[0155] Determine the number of iterations K, where K is a positive integer and K>1;

[0156] Obtain the weight information and selection preference information obtained in the previous iteration process of the current iteration process;

[0157] According to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and selection preference information obtained in the previous iteration process, the weight information and selection preference information of the current iteration process are updated to obtain the weight information and selection preference information of the current iteration process;

[0158] Based on the weight information and selection preference information of the current iteration process, the selection probability of each preset block in the unit area to be rendered corresponding to the current iteration process is obtained;

[0159] Continue to execute the next round of iteration of the current iteration process until K iteration processes are completed, and determine the target block for rendering the unit area to be rendered based on the selection probability of each preset block obtained in the Kth iteration process and each preset block.

[0160] The specific details of each part of the above device have been described in detail in the method part implementation method, so they will not be repeated here.

[0161] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0162] The exemplary embodiments of the present disclosure further provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned virtual scene rendering processing method is implemented.

[0163] Computer programs for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The computer program may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0164] In one embodiment, the computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing a computer program. The readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid-state drive (SSD), and the like. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing a computer program, such as a read-only memory, a NAND flash memory, and the like.

[0165] In one embodiment, the computer program product may be an intangible product including a computer program. Exemplarily, the computer program product may be implemented as a virtual digital product, such as a digital file storing an executable file, an installation package, etc. of the computer program.

[0166] The code of the computer program can be written in one or more programming languages. Programming languages ​​such as C language, Java, C++, etc. The program code can be executed entirely on the user computing device, or partially on the user computing device, or as a separate software package, or partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., an Internet connection provided by an operator).

[0167] The computer program may be carried or transmitted via electrical, magnetic, optical, electromagnetic, infrared, or other signals. The electronic device may convert the signal carrying the computer program into a digital signal, thereby running the computer program. When the computer program runs on an electronic device, its code is used to enable the electronic device to execute (more specifically, the processor of the electronic device may execute) the method steps of various exemplary embodiments of the present disclosure, such as the above-mentioned virtual scene rendering processing method, which includes the following steps:

[0168] Obtaining weight information and selection preference information obtained by performing reinforcement learning training based on a first virtual scene; the first virtual scene includes a plurality of first unit areas, and the first unit areas are rendered by preset blocks; the weight information is used to characterize the distribution state of each unit area in the virtual scene, and the selection preference information is used to characterize the selection tendency of the unit area predicted by the reinforcement learning model for the preset block;

[0169] Acquire a second virtual scene; the second virtual scene includes a plurality of second unit areas, and the second unit areas include one or more unit areas to be rendered;

[0170] According to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and the selection preference information, the selection probability of the unit area to be rendered for each preset tile is obtained; the tile usage information of the first neighboring unit area indicates the preset tile used for rendering the first neighboring unit area;

[0171] According to the selection probability of the unit area to be rendered for each preset image block and each preset image block, a target image block for rendering the unit area to be rendered is determined.

[0172] By executing the above method steps through a computer program, on the one hand, automatic tile selection and tile rendering are realized, which greatly improves efficiency compared to the manual selection and drawing of tiles. On the other hand, the reinforcement learning model obtained by reinforcement learning training based on the first virtual scene can obtain the target tile for rendering the area to be rendered according to the positional relationship between the unit area to be rendered and its neighboring unit area, and the tile usage information of its neighboring unit area, which can ensure the unity of the style of the target tile and its surrounding tiles, making the rendered virtual scene more beautiful and coordinated, and through reinforcement learning training of different types of first virtual scenes, it is possible to determine the target tile of different types of second virtual scenes, expand the scope of application of the virtual scene rendering processing method, and improve the reusability and flexibility of the virtual scene rendering processing method. On the other hand, based on the weight information and selection preference information obtained by reinforcement learning training of the first virtual scene, the target tile of the unit area to be rendered is determined, which can effectively improve the acquisition accuracy of the target tile and further improve efficiency.

[0173] The exemplary embodiments of the present disclosure also provide an electronic device, such as the terminal device 110 or the server 120 described above. The electronic device may include a processor and a memory. The memory stores executable instructions of the processor, such as a computer program. The processor executes the method steps of various exemplary embodiments of the present disclosure by executing the executable instructions. In addition, the electronic device may also include a display for displaying a graphical user interface.

[0174] Reference below Fig.10 , the electronic device is exemplarily described in the form of a general-purpose computing device. It should be understood that Fig.10 The electronic device 1000 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0175] like Fig.10 As shown, the electronic device 1000 may include: a processor 1010 , a memory 1020 , a bus 1030 , an I / O (input / output) interface 1040 , a network adapter 1050 , and a display 1060 .

[0176] The processor 1010 may include one or more processing units. For example, the processor 1010 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.

[0177] The processor 1010 can be used to execute executable instructions stored in the memory 1020, such as executing the above-mentioned virtual scene rendering processing method, which includes the following steps: obtaining weight information and selection preference information obtained by reinforcement learning training based on the first virtual scene; the first virtual scene includes multiple first unit areas, and the first unit areas are rendered by preset tiles; the weight information is used to characterize the distribution state of each unit area in the virtual scene, and the selection preference information is used to characterize the selection tendency of the unit area predicted by the reinforcement learning model for the preset tiles; obtaining a second virtual scene; the second virtual scene includes multiple second unit areas, and the second unit area includes one or more unit areas to be rendered; according to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and selection preference information, the selection probability of the unit area to be rendered for each preset tile is obtained; the tile usage information of the first neighboring unit area represents the preset tile used for rendering the first neighboring unit area; according to the selection probability of the unit area to be rendered for each preset tile and each preset tile, the target tile for rendering the unit area to be rendered is determined.

[0178] By implementing the above method through a computer program, on the one hand, automatic tile selection and tile rendering are realized, which greatly improves efficiency compared to the manual selection and drawing of tiles. On the other hand, the reinforcement learning model obtained by reinforcement learning training based on the first virtual scene can obtain the target tile for rendering the area to be rendered according to the positional relationship between the unit area to be rendered and its neighboring unit area, and the tile usage information of its neighboring unit area, which can ensure the unity of the style of the target tile and its surrounding tiles, making the rendered virtual scene more beautiful and coordinated, and through reinforcement learning training of different types of first virtual scenes, it is possible to determine the target tile of different types of second virtual scenes, expand the scope of application of the virtual scene rendering processing method, and improve the reusability and flexibility of the virtual scene rendering processing method. On the other hand, based on the weight information and selection preference information obtained by reinforcement learning training of the first virtual scene, the target tile of the unit area to be rendered is determined, which can effectively improve the accuracy of obtaining the target tile and further improve efficiency.

[0179] The memory 1020 may include a volatile memory, such as a RAM 1021, a cache unit 1022, and may also include a non-volatile memory, such as a ROM 1023. The memory 1020 may also include one or more program modules 1024, such program modules 1024 include but are not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof may include the implementation of a network environment. For example, the program module 1024 may include each module in the above-mentioned apparatus 900.

[0180] The bus 1030 is used to realize the connection between different components of the electronic device 1000, and may include a data bus, an address bus, and a control bus.

[0181] The electronic device 1000 can communicate with one or more external devices 1100 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 1040 .

[0182] The electronic device 1000 can communicate with one or more networks through the network adapter 1050. For example, the network adapter 1050 can provide mobile communication solutions such as 3G / 4G / 5G, or provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. The network adapter 1050 can communicate with other modules of the electronic device 1000 through the bus 1030.

[0183] The electronic device 1000 may display a graphical user interface, such as an interface displaying the second virtual scene, through the display 1060 .

[0184] although Fig.10Not shown, other hardware and / or software modules may also be provided in the electronic device 1000, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0185] As can be seen from the above, the technical solution of the present disclosure can be implemented as a method, an apparatus, a system, a computer program product, an electronic device, etc. Those skilled in the art can understand that various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software, such as being respectively referred to as a "circuit", "module" or "system".

[0186] It should be understood that the present disclosure is not limited to the specific method steps or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. Those skilled in the art will easily think of other embodiments based on the specific embodiments provided by the present disclosure. Therefore, the specific embodiments provided by the present disclosure are only exemplary, and the scope and spirit of the present disclosure are indicated by the claims, and any variations, uses or adaptive changes of the present disclosure should be covered, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the technical field that are not disclosed in the present disclosure.

Claims

1. A virtual scene rendering processing method, characterized in that: include: Obtaining weight information and selection preference information obtained by performing reinforcement learning training based on the first virtual scene; The first virtual scene includes a plurality of first unit areas, and the first unit areas are rendered by preset blocks; the weight information is used to characterize the distribution state of each of the unit areas in the virtual scene, and the selection preference information is used to characterize the selection tendency of the unit areas for the preset blocks predicted by the reinforcement learning model; Acquire a second virtual scene; the second virtual scene includes a plurality of second unit areas, and the second unit areas include one or more unit areas to be rendered; According to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and the selection preference information, the selection probability of the unit area to be rendered for each preset tile is obtained; the tile usage information of the first neighboring unit area indicates the preset tile used for rendering the first neighboring unit area; According to the selection probability of the unit area to be rendered for each preset image block and each preset image block, a target image block for rendering the unit area to be rendered is determined.

2. The method according to claim 1, characterized in that The obtaining of weight information and selection preference information obtained by performing reinforcement learning training based on the first virtual scene includes: In the first virtual scene, traverse the first unit areas and determine a second neighboring unit area of ​​any of the first unit areas; Determine the block prediction information of any first unit area according to the positional relationship between any first unit area and a second neighboring unit area of ​​any first unit area, the block usage information of the second neighboring unit area, and the weight information; Determine reward information or penalty information according to the tile prediction information of any of the first unit areas and the tile usage information of any of the first unit areas, and update the weight information and the selection preference information based on the reward information or the penalty information; Continue to traverse the next first unit area of ​​any first unit area, and update the weight information and selection preference information based on the tile prediction information of the next first unit area, and after the traversal of all first unit areas of the current first virtual scene is completed, continue to traverse the next first virtual scene of the current first virtual scene until the reinforcement learning model converges to complete the reinforcement learning training; Obtain weight information and selection preference information corresponding to the reinforcement learning model after convergence.

3. The method according to claim 2, characterized in that The determining, according to the positional relationship between the any first unit area and the second neighboring unit area of ​​the any first unit area, the block usage information of the second neighboring unit area, and the weight information, the block prediction information of the any first unit area comprises: In the weight information, determine target weight information associated with each of the second neighborhood unit areas; According to the target weight information and the activation function of the reinforcement learning model, the block prediction information corresponding to any one of the first unit areas is obtained.

4. The method according to claim 2, characterized in that: The determining of reward information or penalty information according to the block prediction information of any first unit area and the block usage information of any first unit area includes: When the tile prediction information of any of the first unit areas is consistent with the tile usage information of the first unit area, the reward information is determined based on a preset reward mechanism and the tile prediction information; otherwise, the penalty information is determined based on a preset penalty mechanism and the tile prediction information.

5. The method according to claim 2, characterized in that: Before determining the block prediction information of any first unit area according to the positional relationship between the any first unit area and the second neighboring unit area of ​​the any first unit area, the block usage information of the second neighboring unit area, and the weight information, the method further includes: Initialize the weight information and selection preference information.

6. The method according to claim 5, characterized in that The initializing the weight information includes: The second neighborhood unit area is traversed to obtain the occurrence probability corresponding to each combination of any first unit area and any second neighborhood unit area, so as to initialize the weight information based on the occurrence probability.

7. The method according to claim 6, characterized in that The obtaining the occurrence probability corresponding to each combination of any first unit area and any second neighborhood unit area includes: Determining the value range of the occurrence probability according to the inverse of a preset neighborhood scale; wherein the preset neighborhood scale is used to determine the neighborhood unit area corresponding to the unit area in the first virtual scene or the second virtual scene; A random value within the value range of the occurrence probability is obtained, and the occurrence probability is determined based on the random value.

8. The method according to claim 1, characterized in that: The obtaining, according to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and the selection preference information, the selection probability of the unit area to be rendered for each preset tile comprises: Acquire reward information or penalty information according to a positional relationship between the unit area to be rendered and a first neighboring unit area of ​​the unit area to be rendered, tile usage information of the first neighboring unit area, and the weight information and selection preference information; updating the weight information and the selection preference information based on the reward information or the penalty information; Based on the updated selection preference information, the selection probability of each preset block in the unit area to be rendered is obtained.

9. The method according to claim 1, characterized in that: The step of determining a target image block for rendering the unit area to be rendered according to the selection probability of each preset image block of the unit area to be rendered and each preset image block comprises: Among the preset blocks corresponding to when the selection probability is greater than the selection probability threshold, randomly select N blocks to determine the target block, where N is a positive integer; Alternatively, the preset image blocks are ranked from large to small according to the selection probability, and the target image block is determined according to the top N preset image blocks.

10. The method according to claim 1, characterized in that The method further comprises: Determine the number of iterations K, where K is a positive integer greater than 1; Obtaining the weight information and selection preference information obtained in the previous iteration process of the current iteration process; According to the positional relationship between the unit area to be rendered and the first neighboring unit area of ​​the unit area to be rendered, the tile usage information of the first neighboring unit area, and the weight information and selection preference information obtained in the previous iteration process, the weight information and selection preference information of the current iteration process are updated to obtain the weight information and selection preference information of the current iteration process; Based on the weight information and the selection preference information of the current iteration process, obtaining the selection probability of each preset block of the to-be-rendered unit area corresponding to the current iteration process; Continue to execute the next round of the iteration process of the current iteration process until the K iteration processes are completed, and determine the target block for rendering the unit area to be rendered according to the selection probability of each preset block of the unit area to be rendered obtained in the Kth iteration process and each preset block.

11. A virtual scene rendering processing device, characterized in that: include: An information acquisition module is configured to acquire weight information and selection preference information obtained by performing reinforcement learning training based on the first virtual scene; The first virtual scene includes a plurality of first unit areas, and the first unit areas are rendered by preset blocks; the weight information is used to characterize the distribution state of each of the unit areas in the virtual scene, and the selection preference information is used to characterize the selection tendency of the unit areas for the preset blocks predicted by the reinforcement learning model; A data acquisition module is configured to acquire a second virtual scene; the second virtual scene includes a plurality of second unit areas, and the second unit areas include one or more unit areas to be rendered; A selection probability acquisition module is configured to obtain the selection probability of the unit area to be rendered for each preset tile according to the positional relationship between the unit area to be rendered and a first neighboring unit area of ​​the unit area to be rendered, tile usage information of the first neighboring unit area, and the weight information and selection preference information; the tile usage information of the first neighboring unit area indicates the preset tile used for rendering the first neighboring unit area; The target block determination module is configured to determine a target block for rendering the unit area to be rendered according to the selection probability of the unit area to be rendered for each preset block and each preset block.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

13. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 10 by executing the executable instructions.