CN115225588A - Data processing method and device - Google Patents
Data processing method and device Download PDFInfo
- Publication number
- CN115225588A CN115225588A CN202210164690.9A CN202210164690A CN115225588A CN 115225588 A CN115225588 A CN 115225588A CN 202210164690 A CN202210164690 A CN 202210164690A CN 115225588 A CN115225588 A CN 115225588A
- Authority
- CN
- China
- Prior art keywords
- resource
- sequence
- resources
- blocks
- initial
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 45
- 238000013468 resource allocation Methods 0.000 claims abstract description 103
- 238000012545 processing Methods 0.000 claims abstract description 84
- 238000000034 method Methods 0.000 claims description 45
- 230000004044 response Effects 0.000 claims description 15
- 238000010276 construction Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 description 25
- 238000009877 rendering Methods 0.000 description 21
- 238000010586 diagram Methods 0.000 description 17
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 13
- 239000010802 sludge Substances 0.000 description 8
- 238000004590 computer program Methods 0.000 description 6
- 238000013461 design Methods 0.000 description 5
- 238000011161 development Methods 0.000 description 5
- 244000025254 Cannabis sativa Species 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 208000003464 asthenopia Diseases 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003631 expected effect Effects 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/76—Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions
- H04L47/762—Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions triggered by the network
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a data processing method and a device, wherein the data processing method comprises the following steps: responding to a resource processing instruction to create a resource arrangement area, and determining resources to be arranged associated with the resource arrangement area; determining the number of global blocks in the resource arrangement area and the number of resource blocks corresponding to the resources to be arranged; constructing a resource allocation sequence based on the global block number and the resource block number; the resource allocation region is updated according to the resource allocation sequence and the resources to be allocated, and the target region is generated according to the update result.
Description
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data processing method. The application also relates to a data processing device, a computing device and a computer readable storage medium.
Background
With the development of internet technology, the efficiency of data processing is continuously increased, so that more and more media resources are increasingly refined for designing visual senses, and in large-scale scene design, in order to enhance the visual effect, fewer and less repeated visual scenes are utilized, and more random combinations are strived to be used for scenes artificially constructed, so as to reduce visual fatigue and enhance the substitution feeling of users.
Disclosure of Invention
In view of this, embodiments of the present application provide a data processing method to solve technical defects in the prior art. The embodiment of the application also provides a data processing device, a computing device and a computer readable storage medium.
According to a first aspect of embodiments of the present application, there is provided a data processing method, including:
responding to a resource processing instruction to create a resource arrangement area, and determining resources to be arranged associated with the resource arrangement area;
determining the number of global blocks in the resource arrangement area and the number of resource blocks corresponding to the resources to be arranged;
constructing a resource allocation sequence based on the global block number and the resource block number;
and updating the resource allocation region according to the resource allocation sequence and the resources to be allocated, and generating a target region according to an updating result.
Optionally, the creating a resource arrangement area in response to the resource processing instruction, and determining the resource to be arranged associated with the resource arrangement area, includes:
receiving the resource processing instruction;
analyzing the resource processing instruction to obtain resource arrangement region information and resource information to be arranged;
the resource arrangement region is created based on the resource arrangement region information, and the resource to be arranged associated with the resource arrangement region is determined based on the resource to be arranged information.
Optionally, the creating the resource arrangement area based on the resource arrangement area information includes:
analyzing the resource arrangement region information to obtain a side length parameter and a precision parameter;
constructing an initial resource arrangement area based on the side length parameter;
dividing the initial resource arrangement region based on the precision parameters to obtain a resource arrangement region containing resource blocks;
correspondingly, the determining the global block number in the resource arrangement area includes:
determining the number of the resource blocks contained in the resource arrangement region as the global block number.
Optionally, the determining, based on the information of the resources to be arranged, the resources to be arranged associated with the resource arrangement region includes:
analyzing the resource information to be distributed to obtain a resource identification parameter and a resource proportion parameter;
determining the resources to be arranged associated with the resource arrangement area based on the resource identification parameters;
correspondingly, the determining the number of resource blocks corresponding to the resources to be arranged includes:
and determining the resource block number corresponding to the resources to be distributed based on the resource proportion parameter and the global block number.
Optionally, the determining, based on the resource proportion parameter and the global block number, the resource block number corresponding to the resource to be arranged includes:
acquiring density information carried in the resource processing instruction;
determining the total number of resource blocks according to the density information and the global block number;
and determining the number of the resource blocks corresponding to the resources to be distributed based on the resource proportion parameter and the total number of the resource blocks.
Optionally, the constructing a resource allocation sequence based on the number of global blocks and the number of resource blocks includes:
constructing an initial resource sequence based on the global block number;
carrying out disorder processing on the initial resource sequence to obtain a disorder resource sequence;
and constructing a resource allocation sequence based on the number of the resource blocks and the out-of-order resource sequence.
Optionally, the constructing an initial resource sequence based on the global block number includes:
constructing an initial index value based on the global block number, and creating initial resource sequence values corresponding to the resource blocks contained in the resource arrangement area one by one;
creating an initial resource sequence pair based on the initial resource sequence value and the initial index value;
and constructing the initial resource sequence according to the initial resource sequence pair.
Optionally, the constructing a resource allocation sequence based on the number of resource blocks and the out-of-order resource sequence includes:
dividing the out-of-order resource sequence based on the number of resource blocks;
and constructing a resource allocation sequence corresponding to the resources to be distributed based on the division result.
Optionally, the updating the resource allocation region according to the resource allocation sequence and the resource to be allocated, and generating the target region according to the update result includes:
extracting resource sequence values in the resource allocation sequence;
determining a target resource block corresponding to the resource sequence value in the resource allocation region and a resource index value corresponding to the resource sequence value based on the resource allocation sequence;
determining an incidence relation between the resource index value and the resource to be arranged based on an initial index value associated with the resource index value;
and updating the target resource block according to the incidence relation and the resources to be distributed, and generating the target area according to an updating result.
According to a second aspect of embodiments of the present application, there is provided a data processing apparatus including:
a response module configured to create a resource arrangement area in response to a resource processing instruction and determine a resource to be arranged associated with the resource arrangement area;
a determining module configured to determine the number of global blocks in the resource arrangement area and the number of resource blocks corresponding to the resources to be arranged;
a construction module configured to construct a resource allocation sequence based on the global block number and the resource block number;
and the updating module is configured to update the resource allocation region according to the resource allocation sequence and the resources to be allocated, and generate a target region according to an updating result.
According to a third aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is for storing computer-executable instructions that when executed by the processor implement the steps of the data processing method.
According to a fourth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the data processing method.
According to a fifth aspect of embodiments of the present application, there is provided a chip storing a computer program which, when executed by the chip, implements the steps of the data processing method.
The data processing method provided by the application determines a resource arrangement area and resources to be arranged associated with the resource arrangement area through a resource processing instruction; determining the global block number of the resource arrangement area and the resource block number of the resource to be arranged; constructing a resource allocation sequence according to the number of the global blocks and the number of the resource blocks; the resource arrangement region is updated according to the resource allocation sequence and the resources to be arranged, the updated resource arrangement region is rendered to obtain the target region, random resource display in the preset region can be achieved through the data processing method, the speed of processing the resource random display task is high, the real-time performance of resource random rendering display can be guaranteed, the spatial data is digitized, the development difficulty is reduced, and meanwhile the application range is not affected.
Drawings
Fig. 1 is a flowchart of a data processing method according to an embodiment of the present application;
fig. 2 is a schematic code diagram related to a data processing method according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating an initial resource sequence in a data processing method according to an embodiment of the present application being processed out of order;
fig. 4 is a schematic diagram of a target area in a data processing method according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a data processing method applied to a movie scene design according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 7 is a block diagram of a computing device according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application.
In the present application, a data processing method is provided. The present application relates to a data processing apparatus, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
In practical application, a process of creating a resource random display area, which is an automated random scheme in the prior art, adopts a mode of randomly selecting a type of resources to be arranged, then randomly selecting an area where the resources to be arranged need to be arranged from a total display area, and finally rendering the randomly selected resources to be arranged in the randomly selected corresponding area. Firstly, because the amount of information carried by the space resources is large, the random processing mode of the space resources in the display area in the prior art occupies the computing resources of the system or the device; secondly, the above scheme of creating the resource random exposure area uses at least two random processes, which also consumes the computing resources of the computing system or device. The two aspects can bring greater hardware pressure to a computing system or a device, the working efficiency is not high, the problems of system blockage and the like are easily caused under the condition of creating a more fine and huge resource random display scene, the creating speed is slow, the real-time processing requirement can be met only by using professional equipment, and the application range is narrow.
In view of this, this embodiment provides a data processing method, where the space resources are digitized, a digitized sequence corresponding to the space resources is created, and the digitized sequence is processed, so that the random resource display requirement is met, and at the same time, the processing efficiency is much higher than that of directly processing the space resources because the digitized information is simple and convenient to process, and the scheme only needs a random process once, so that the expected effect can be achieved, the hardware pressure is more released, and the user can also achieve real-time random resource display without professional equipment, and the application range is wide.
Fig. 1 shows a flowchart of a data processing method provided in an embodiment of the present application, which specifically includes the following steps:
step S102: and creating a resource arrangement area in response to the resource processing instruction, and determining the resources to be arranged associated with the resource arrangement area.
The resource processing instruction represents an instruction sent by a user to create a region for randomly showing resources, the resource arrangement region is a region for showing the random resources, and the resources to be arranged are randomly shown resources.
Specifically, in the case of creating a scene in which resources are randomly presented, the terminal needs to receive a resource processing instruction, which is expected by a user for designing a region in which the resources are randomly presented, of the user, create a region for presenting the resources, which are randomly presented and which the user desires to create, according to the resource processing instruction, that is, a resource arrangement region, and determine a specific resource, which is desired by the user to be presented in the resource arrangement region, that is, a resource to be arranged.
Based on the resource arrangement method, in response to a resource processing instruction sent by a user, a resource arrangement area for randomly showing the resources is created, and the resources to be arranged which need to be randomly shown in the resource arrangement area are determined. The method is a precondition for realizing random allocation and display of the predetermined resources to be distributed in a predetermined area; the resource arrangement area is automatically created through a resource processing instruction, then the resource types and information to be randomly displayed in the resource arrangement area are determined through the instruction in the resource processing instruction, the resource consumption of manually creating a random display scene is solved, the attribute information of the scene is determined and the random display resource types are determined when the random display scene is automatically created in the traditional mode, the front flow is simplified, and the creation efficiency of the random scene is accelerated.
Further, when creating the resource allocation region and determining the resources to be allocated, the resource allocation region needs to be created based on the resource processing instruction, that is, creating the resource allocation region and determining the resources to be allocated need to be based on the information and parameters that are carried in the resource processing instruction and are defined by the user for the resource allocation region and the resources to be allocated, in this embodiment, a specific implementation manner is as follows:
receiving the resource processing instruction; analyzing the resource processing instruction to obtain resource arrangement region information and resource information to be arranged; the resource arrangement region is created based on the resource arrangement region information, and the resource to be arranged associated with the resource arrangement region is determined based on the resource to be arranged information.
The resource arrangement area information includes parameter information of a user for a resource arrangement area to be created, and the resource information to be arranged includes parameter information of a resource to be shown in the resource arrangement area.
Based on the resource layout area information, the resource layout area information and the resource information to be displayed in the resource layout area are obtained, the resource layout area is created based on the resource layout area information, and the resources to be arranged related to the resource layout area are determined based on the resource layout area information.
For example, in a game scene, a player needs to arrange a certain area and display random flower and grass resources, a terminal receives a resource processing instruction sent by the player, and analyzes the resource processing instruction to obtain resource arrangement area information and resource information to be arranged, where the resource information to be arranged is a flower a resource and a flower B resource that the player selects and needs to be randomly displayed, and the resource arrangement area information is a square area of 100 × 100 unit length that randomly displays the flower a and the flower B resource selected by the user, it should be noted that the selection mode of the resource arrangement area here may be selected by dragging a flower and grass brush with a structure similar to a "brush", or may be a geometric image creation process in similar drawing software, and a resource arrangement area frame is selected, and the specific selection mode is determined by an actual usage scene, which is not limited in this embodiment. The terminal creates a square area with the unit length of 100 x 100 according to the resource arrangement area information contained in the resource arrangement area sent by the user, the square area is used as the resource arrangement area, and the resources to be arranged are determined to be the flower A resources and the flower B resources according to the resource information to be arranged contained in the resource arrangement area sent by the user.
In summary, according to the resource arrangement region information carried in the received resource processing instruction and the indication of the resource information to be arranged, the region where the resource needs to be randomly displayed and the specific resource to be randomly displayed are determined, and a foundation is made for establishing the resource region to be randomly displayed.
Further, in the process of creating the resource arrangement area, the position and the size of the resource arrangement area need to be known, and the resource arrangement area is divided, so that a plurality of blocks exist in the resource arrangement area, and resources to be arranged can be randomly displayed in each block in the resource arrangement area, in this embodiment, the specific implementation manner is as follows:
analyzing the resource arrangement region information to obtain a side length parameter and a precision parameter; constructing an initial resource arrangement area based on the side length parameter; dividing the initial resource arrangement region based on the precision parameters to obtain a resource arrangement region containing resource blocks; correspondingly, the determining the number of global blocks in the resource arrangement region includes: determining the number of the resource blocks contained in the resource arrangement region as the global block number.
Wherein the side length parameter indicates the size and the shape of the resource arrangement area; the precision parameter indicates the size of a resource block obtained by dividing the resource arrangement region; the resource blocks indicate rendering accuracy in the resource allocation region, that is, a minimum display region of the resources to be allocated for display in the resource display region, and accordingly, the number of global blocks in the resource allocation region, that is, the number of resource blocks in the resource display region, is determined.
Based on the method, the terminal analyzes the information of the resource arrangement area, determines the shape and the size of the resource arrangement area based on the side length parameter obtained by analysis, then divides the determined resource arrangement area based on the precision parameter analyzed from the information of the resource arrangement area, and divides the resource arrangement area into grids, wherein each grid is a resource block, and correspondingly, the process of determining the global block in the resource arrangement area, namely determining the number of the resource blocks contained in the resource arrangement area, is carried out. Further, information on the position of the resource arrangement region indicating the position at the time of creation of the resource arrangement region may also be included in the resource arrangement region information.
According to the above example, the terminal receives the resource arrangement region information, analyzes the resource arrangement region information, obtains a side length parameter of 100 by analyzing, determines that the resource arrangement region is a square region with a unit length of 100 x 100, determines that the precision parameter is 10, divides the resource arrangement region into 10 x 10 grids, each grid is a resource block, and then determines that the number of the resource blocks is 100, and then determines that the number of the global blocks is 100. At the code level, the global block number may be processed based on code 1 in a code diagram related to a data processing method shown in fig. 2.
Wherein nRenderTotalSize represents the number of global blocks, nBrushSideSize represents a side LENGTH parameter, and RENDER _ UNIT _ LENGTH represents a precision parameter. That is, in the present embodiment:
global block number = (side length parameter/precision parameter) = (100/10) =100.
In summary, by analyzing the resource arrangement region information, the size and the shape of the resource arrangement region are determined, and the resource arrangement region is divided, so that the smallest block to be rendered in the resource arrangement region, that is, the resource block is determined, and the global block number is determined according to the number of the resource blocks.
Further, in the process of determining the resources to be arranged through the resource arrangement region information, the type and the identifier of the resources to be arranged, and the occupied proportion of each type of resources to be arranged in the rendering process of all the resources to be arranged need to be determined, in this embodiment, the specific implementation manner is as follows:
analyzing the resource information to be distributed to obtain resource identification parameters and resource proportion parameters; determining the resources to be arranged associated with the resource arrangement area based on the resource identification parameters; correspondingly, the determining the number of resource blocks corresponding to the resources to be arranged includes: and determining the number of resource blocks corresponding to the resources to be distributed based on the resource proportion parameter and the global block number.
The resource identification parameter represents the type and identification of the resource to be distributed, and the resource proportion parameter is the proportion of a certain resource to be distributed in all the resources to be distributed.
Based on the resource allocation region, analyzing the information of the resources to be allocated, obtaining a resource identification parameter containing the type and identification information of the resources to be allocated and a resource proportion parameter containing rendering proportion information of the resources to be allocated, determining the resources to be allocated associated with the resource allocation region through the resource identification parameter, and then determining the number of resource blocks, namely the number of resource blocks, which will be occupied by the resources to be allocated corresponding to the resource proportion parameter in the resource allocation region, according to the resource proportion parameter and the number of global blocks.
According to the above example, the terminal analyzes the information of the resources to be distributed to obtain the types of the resources to be distributed, namely the flower A resources and the flower B resources, determines that the ID of the flower A resources is H01 and the ID of the flower B resources is H02, then determines that the ratio of the flower A resources to the flower B resources is 0.5 according to the resource ratio parameters, and determines that the number of the resource blocks of the flower A resources and the flower B resources is 50 by combining with the global block number of 100. It should be noted that the synthesis of the resource proportion parameter may be less than 1, that is, the resource to be arranged may present an area with a blank effect without fully occupying the whole resource arrangement area, and how to determine the rendering proportion of the specific resource to be arranged may be set according to an actual application scenario, which is not limited in this embodiment.
In summary, the type, identification (ID) and the proportion of the resource to be arranged in rendering are determined according to the resource information to be arranged, so as to provide a foundation for the subsequent rendering of the resource to be arranged in the resource arrangement area.
Step S104: and determining the number of global blocks in the resource arrangement area and the number of resource blocks corresponding to the resources to be arranged.
Specifically, after the resource arrangement region and the resources to be arranged are determined, the number of all minimum renderable blocks in the resource arrangement region and the number of minimum renderable blocks corresponding to the resources to be arranged need to be determined.
The global block number is the number of minimum blocks which can be rendered in the resource arrangement area, and the minimum blocks can be approximately regarded as pixel blocks on the screen of the electronic tube television, namely minimum quantization blocks which can be edited. The resource block number is the number of the minimum blocks of a certain resource to be arranged in the resource arrangement area for rendering.
Based on this, the terminal determines the total number of minimum renderable blocks in the resource arrangement area, i.e. the global block number, and the number of minimum renderable blocks in the resource arrangement area corresponding to the resource to be arranged, i.e. the resource block number, according to the determined resource arrangement area.
Further, in the step of determining the number of resource blocks corresponding to the resources to be allocated, a case that a resource allocation area includes a blank is described, and in this case, since the total sum of the resource proportion parameters may not be 1, when an error occurs in the resource proportion parameters, the terminal cannot verify the resource proportion parameters, and in order to solve this problem, in this embodiment, a specific implementation method is as follows:
acquiring density information carried in the resource processing instruction; determining the total number of resource blocks according to the density information and the global block number; and determining the number of the resource blocks corresponding to the resources to be distributed based on the resource proportion parameter and the total number of the resource blocks.
The density information records the proportion of the number of minimum blocks, which need to be rendered in total, of all resources to be arranged in the resource arrangement area to the total number of minimum blocks in the resource arrangement area.
Based on this, the resource processing instruction is analyzed to obtain the density information carried by the resource processing instruction in a summary manner, the total number of the resource blocks is determined according to the density information and the global block number, that is, the number of all resource blocks which can be rendered in the resource arrangement area is determined according to the density information and the global block number, and then the number of the resource blocks which need to be rendered for the resource to be arranged is determined according to the resource proportion parameter and the obtained total number of the resource blocks.
Along the above example, the terminal obtains the density information carried in the resource processing instruction as 1, that is, the number of resource blocks in the resource arrangement region that can be subjected to rendering operation occupies 100% of the number of global blocks, so that the total number of resource blocks is calculated as 100, and then the number of resource blocks corresponding to the floral a resource and the floral B resource is determined to be 50 according to the resource occupation ratio parameter 0.5 of the floral a resource and the floral B resource. At the code level, the above steps can be implemented based on the code 2 in the code diagram related to the data processing method shown in fig. 2.
Wherein nDensity represents the total number of resource blocks calculated by density, and fDensity is density information. That is, in the present embodiment:
total number of resource blocks = number of global blocks × sparse density information =100 × 1=100.
Wherein, nPercent represents the number of resource blocks corresponding to a certain flower and grass, and pPercent [ i ] is a resource ratio parameter. That is, in the present embodiment:
the resource block number = resource block total number = flower a resource block number = flower a resource occupation ratio parameter =100 × 0.5=50;
resource block number corresponding to flower B resource = total number of resource blocks = resource occupation ratio parameter corresponding to flower B =100 × 0.5=50.
In conclusion, by introducing the sparse density information, one-step limitation is performed before the process of determining the number of the resource blocks corresponding to the resources to be distributed, so that the occurrence rate of the problem of rendering errors caused by data distortion due to the influence of transmission or noise and the like is greatly reduced.
Step S106: and constructing a resource allocation sequence based on the global block number and the resource block number.
Specifically, in the process of performing random rendering on the resources to be arranged in the resource arrangement region, the traditional method needs to perform random rendering on the spatial positions of the resources to be arranged in the resource arrangement region, and the processing process of the spatial data occupies relatively large computing resources, which is not favorable for the implementation efficiency of the business process. Therefore, a resource allocation sequence is introduced, the spatial data are digitized and processed in a sequence form, the occupation of computing resources is greatly reduced, and the processing efficiency is improved.
The resource allocation sequence is a digital sequence, corresponds to the resource arrangement region, and converts the space data operation in the resource arrangement region into the digital data operation in the digital sequence.
Based on the method, a resource allocation sequence is constructed through the number of the global blocks and the number of the resource blocks, wherein the number of the global blocks enables the space dimension information of the resource allocation region to correspond to sequence elements in the resource allocation sequence in the construction process of the resource allocation sequence, and the number of the resource blocks enables resources to be allocated to be reflected into the resource allocation sequence in the resource allocation region associated space region.
Further, in the process of constructing the resource allocation sequence, in order to implement a random rendering scenario of resources to be arranged in the resource arrangement region, a sequence constructed based on the global block number needs to be subjected to out-of-order processing, and in this embodiment, the specific implementation manner is as follows:
constructing an initial resource sequence based on the global block number; carrying out disorder processing on the initial resource sequence to obtain a disorder resource sequence; and constructing a resource allocation sequence based on the number of the resource blocks and the out-of-order resource sequence.
The initial resource sequence is a sequence which is constructed based on the global block number and is not subjected to disorder processing.
Based on the method, a corresponding initial resource sequence is constructed based on the global block number, the initial resource sequence is disordered to realize process analogy with random rendering of resources to be distributed in a resource distribution area, a random arrangement process is realized in a digitalized sequence to obtain a disordered resource sequence, and then a resource distribution sequence is constructed based on the disordered resource sequence and the resource block number.
In conclusion, the process of processing the resource arrangement region out-of-order into the out-of-order resource sequence and constructing the resource allocation sequence by combining the resource block number changes the random ordering of the spatial dimension into the digital sequence out-of-order process, so that the operation resource is saved, and the processing efficiency is improved.
Further, in the process of converting the resource arrangement area into the initial resource sequence, information conversion from a space dimension to a digital dimension is involved, and in this embodiment, the specific implementation manner is as follows:
constructing an initial index value based on the global block number, and creating initial resource sequence values corresponding to the resource blocks contained in the resource arrangement area one by one; creating an initial resource sequence pair based on the initial resource sequence value and the initial index value; and constructing the initial resource sequence according to the initial resource sequence pair.
For example, in actual application, if the number of the global blocks is 100, the initial index value may be an integer set including 0 to 99, the initial resource sequence value corresponds to the resource blocks in the resource arrangement region one to one, that is, each resource block is labeled once, and the number is used as an "identity", for example, a first resource block from left to right and from top to bottom in the resource arrangement block is defined to have a corresponding initial resource sequence value of 0, a second resource block corresponds to an initial resource sequence value of 1, and so on, it should be noted that the initial resource sequence value and the initial index value may be discontinuous but may not be the same, and a specific assignment manner thereof is determined by an actual usage scenario, which is not limited in this embodiment. After the initial index value and the initial resource sequence value are obtained, an initial resource sequence is constructed, a presentation form is constructed as shown in table 1 in a schematic diagram of disorder processing of the initial resource sequence in the data processing method provided by the embodiment of the present application shown in fig. 3, and then disorder processing is performed on the initial resource sequence as shown in the processes of table 1-table 99 in fig. 3.
Based on this, an initial index value is constructed based on the number of global blocks, and based on resource blocks included in the resource arrangement region, initial resource sequence values corresponding to one are constructed, and the initial index value and the initial resource sequence values are combined pairwise to form an initial resource sequence pair. And then constructing an initial resource sequence based on the obtained initial resource sequence pair.
According to the above example, the terminal constructs 100 integer initial index values from 0 to 99 according to the number of global blocks, assigns each resource block in the resource arrangement region to 100 integer initial resource sequence values from 0 to 99 in a one-to-one correspondence, constructs an initial resource sequence pair from the initial index values and the initial resource sequence values in a one-to-one manner, and constructs an initial resource sequence based on the 100 initial resource sequence pairs that are constructed. At the code level, the above steps can be implemented based on the code 3 in the code diagram related to the data processing method shown in fig. 2.
The global block number is converted into an initial resource sequence, the initial resource sequence exists in a Vector container vecRandSeq, and the initial resource sequence is an incremental sequence.
In summary, by corresponding the resource blocks in the resource allocation region to the initial resource sequence values in the initial resource sequence, the initial resource sequence values in the initial resource sequence have a spatial meaning, so that the process of disordering the initial resource sequence is equivalent to the process of randomly processing the resource blocks in the resource allocation region.
Further, for the out-of-order resource sequence, there is no allocation process for the resources to be allocated, so that the number of resource blocks needs to be introduced to obtain the resource allocation sequence to implement allocation of the resources to be allocated, in this embodiment, the specific matters are as follows:
dividing the out-of-order resource sequence based on the number of resource blocks; and constructing a resource allocation sequence corresponding to the resources to be distributed based on the division result.
Based on this, the resource block number is used to divide the disordered resource sequence, that is, the initial resource sequence values in the disordered resource are allocated to correspond to a resource to be arranged, so that the resource block corresponding to the initial resource sequence value is associated with the resource to be arranged corresponding to the resource block number, and the resource to be arranged can be rendered in the resource block.
Along the above example, the terminal associates the initial resource sequence value corresponding to the first 50 bits, i.e. 0-49 initial resource index values in the disordered resource sequence, of the initial index values in the disordered resource sequence with the flower A resource, and associates the initial resource sequence value corresponding to the last 50 bits, i.e. 50-99 initial resource index values in the disordered resource sequence with the flower B resource.
In summary, the out-of-order resource processing instruction is divided according to the number of the resource blocks, so that the resources to be arranged correspond to the resource blocks in the resource arrangement region, and the out-of-order resource sequence is obtained by out-of-order the initial resource sequence, which is equivalent to randomly arranging the resource blocks in the resource arrangement region, so that the random allocation of the resources to be arranged in the resource arrangement region is realized at this time.
Step S108: and updating the resource allocation region according to the resource allocation sequence and the resources to be allocated, and generating a target region according to an updating result.
Specifically, after the resource allocation sequence is constructed, the resource to be allocated needs to be rendered in the resource allocation region according to the indication of the resource allocation sequence to generate the target region.
The resource allocation sequence indicates a corresponding region of the resources to be arranged in the resource arrangement region, and then the rendering can be realized in the corresponding region based on the information of the resources to be arranged, so that a target region which is expected to be obtained by a user and randomly shown in the resource arrangement region by the resources to be arranged is generated.
Further, in a case of updating the resource allocation region, it is necessary to allocate the resource to be allocated to the resource allocation region based on the indication of the resource allocation sequence, and perform an update rendering on the resource allocation region based on the allocated resource to be allocated, in this embodiment, a specific implementation manner is as follows:
extracting resource sequence values in the resource allocation sequence; determining a target resource block corresponding to the resource sequence value in the resource allocation region and a resource index value corresponding to the resource sequence value based on the resource allocation sequence; determining an incidence relation between the resource index value and the resource to be arranged based on an initial index value associated with the resource index value; and updating the target resource block according to the incidence relation and the resources to be distributed, and generating the target area according to an updating result.
The resource sequence value is a sequence value of a corresponding initial resource sequence value in a disordered resource sequence corresponding to the resource allocation sequence, wherein the sequence value is obtained after the resource block number division; the target resource block is a target block corresponding to the resource sequence value; the resource index value is an index value of a corresponding initial index value in a disordered resource sequence corresponding to the resource allocation sequence, wherein the index value is obtained after the resource block number division.
Based on this, a resource sequence value in the resource allocation sequence is extracted, a target resource block corresponding to the resource sequence value is determined, a resource to be arranged corresponding to the resource index value is determined according to the resource index value corresponding to the resource sequence value, and the target resource block is updated and rendered based on the associated resource to be arranged to generate a target region.
According to the above example, the resource to be distributed corresponding to the target resource block in the resource distribution region is determined based on the resource sequence value and the resource index value in the resource distribution sequence, the display information in the target resource block is updated based on the resource to be distributed, and the image of the corresponding resource to be distributed is rendered in the target resource block to form the target region. The formed target area is as shown in a schematic diagram of the target area in a data processing method shown in fig. 4, in a resource arrangement area having 100 resource blocks, 50 resource blocks render a display flower a based on flower a resources, and the other 50 resource blocks render a display flower B based on flower B resources, and the positions of flower a and flower B in the resource arrangement area are randomly generated, at this time, the area where flower a and flower B are randomly rendered is the target area.
In summary, by using the resource allocation sequence, the display information of the target resource block in the resource arrangement region is updated to the corresponding resource to be arranged, so that the resource to be arranged is randomly displayed in the resource arrangement region.
The data processing method provided by the application determines a resource arrangement area and resources to be arranged associated with the resource arrangement area through a resource processing instruction; determining the global block number of the resource arrangement area and the resource block number of the resource to be arranged; constructing a resource allocation sequence according to the number of the global blocks and the number of the resource blocks; the resource arrangement region is updated according to the resource allocation sequence and the resources to be arranged, the updated resource arrangement region is rendered to obtain the target region, random display of the resources in the preset region can be achieved through the data processing method, the speed of processing the resource random display task is high, the real-time performance of resource random rendering display can be guaranteed, the spatial data are digitized, the development difficulty is reduced, and meanwhile the application range is not affected.
As shown in fig. 3, a schematic diagram of performing out-of-order processing on an initial resource sequence in a data processing method according to an embodiment of the present application specifically illustrates that the initial resource sequence is generated into a corresponding out-of-order resource sequence through out-of-order processing.
At the code layer, the out-of-order step can be implemented based on the code 4 in the code diagram related to the data processing method shown in fig. 2.
As shown in table 1 of fig. 3, which is an initial resource sequence, there are 100 initial resource sequence values and initial index values, wherein the initial index value corresponds to i in the above code, and the initial resource sequence value corresponds to vecRandSeq [ i ].
The initial resource sequence is traversed from back to front through an operation mode in a code layer, the initial index value of the initial resource sequence is randomly processed, the random initial index value is exchanged with the initial resource sequence value corresponding to the current initial index value, disorder of the initial resource sequence value is achieved, and the initial resource sequence is converted into a disorder resource sequence through modes shown in tables 2 to 99.
At the code layer, the allocation of resources to be arranged can be realized based on the code 5 in the code diagram related to one data processing method shown in fig. 2.
Wherein, nMIxCount is the number of kinds of the resource to be distributed.
The following describes the data processing method further by taking the application of the data processing method provided by the present application to movie scene design as an example, with reference to fig. 5. Fig. 5 shows a processing flow chart of a data processing method applied to movie scene design according to an embodiment of the present application, which specifically includes the following steps:
step S502: and receiving the resource processing instruction.
Specifically, a resource processing instruction based on the design of the movie scene sent by a user is received.
Step S504: and analyzing the resource processing instruction to obtain resource arrangement region information and resource information to be arranged.
Step S506: and analyzing the resource arrangement region information to obtain a side length parameter and a precision parameter.
Specifically, the resource arrangement region information is analyzed, and a side length parameter of which the side length is 55 unit length × 12 unit length and a precision parameter of which the side length is 1 unit length × 1 unit length of the resource arrangement region are obtained.
Step S508: and constructing an initial resource arrangement area based on the side length parameter.
Specifically, the resource arrangement region is determined to be a rectangular region with the shape of 55 m × 12 m based on the side length parameter.
Step S510: and dividing the initial resource arrangement region based on the precision parameters to obtain a resource arrangement region containing resource blocks.
Specifically, the resource arrangement region is divided by the precision parameters, so that the resource arrangement region including 55 × 12 resource blocks is obtained.
Step S512: and analyzing the resource information to be distributed to obtain a resource identification parameter and a resource proportion parameter.
Specifically, in the resource identification parameters, the resources are a puddle C and sludge D, the corresponding identification of the puddle C is C01, the corresponding identification of the sludge D is D01, and in the resource proportion parameters, the resource proportion of the puddle C to the sludge D is 0.5.
Step S514: determining the resources to be arranged associated with the resource arrangement area based on the resource identification parameters.
Specifically, the resources to be distributed are determined to be the puddle C and the sludge D based on the resource identification parameters.
Step S516: and determining the resource block number corresponding to the resources to be distributed based on the resource proportion parameter and the global block number.
Specifically, based on the resource ratio parameter indication, the ratio of the puddle C to the sludge D is 0.5 to 0.5, so the number of resource blocks corresponding to the puddle C and the sludge D is 330.
Step S518: and constructing an initial index value based on the global block number, and creating initial resource sequence values in one-to-one correspondence with the resource blocks contained in the resource arrangement area.
Specifically, 660-integer initial index values of 0 to 659 and 660-integer initial resource sequence values of 0 to 659 corresponding to the 660 resource blocks included in the resource arrangement region are constructed based on the global block number 660.
Step S520: an initial resource sequence pair is created based on the initial resource sequence value and the initial index value.
Specifically, a pair of 660 initial index values and a pair of 660 initial resource sequence values having the same value are used as a group to construct an initial resource sequence pair.
Step S522: and constructing the initial resource sequence according to the initial resource sequence pair.
Specifically, the initial resource sequence is constructed based on the 660 initial resource sequence pairs obtained.
Step S524: and carrying out disorder processing on the initial resource sequence to obtain a disorder resource sequence.
Specifically, at the code layer, the initial resource sequence is scrambled by using a scrambling method similar to the code 4 shown in fig. 2, so as to obtain a scrambled resource sequence.
Step S526: and dividing the out-of-order resource sequence based on the number of the resource blocks.
Specifically, according to the resource block number of the puddle C corresponding to the sludge D being 330, the corresponding identifications of the first 330 initial resource sequence values and the initial index values in the out-of-order resource sequence corresponding to the puddle C are C01, and the corresponding identifications of the last 330 corresponding to the sludge D are D01.
Step S528: and constructing a resource allocation sequence corresponding to the resources to be distributed based on the division result.
Step S530: and updating the resource allocation region according to the resource allocation sequence and the resources to be allocated, and generating a target region according to an updating result.
Specifically, rendering resources of the puddle C and the mashed mud D are indexed in a resource database through the corresponding identification of the puddle C as C01 and the corresponding identification of the mashed mud D as D01, and the two rendering resources are rendered according to a resource block corresponding to a resource allocation sequence value in a resource allocation sequence to obtain a target area; the movie scene created by the method realizes the random distribution of the puddles and the mashed mud, and the creation of the scene of a marshland is formed.
The data processing method provided by the application determines a resource arrangement area and resources to be arranged associated with the resource arrangement area through a resource processing instruction; determining the global block number of the resource arrangement area and the resource block number of the resource to be arranged; constructing a resource allocation sequence according to the number of the global blocks and the number of the resource blocks; the resource arrangement region is updated according to the resource allocation sequence and the resources to be arranged, the updated resource arrangement region is rendered to obtain the target region, random resource display in the preset region can be achieved through the data processing method, the speed of processing the resource random display task is high, the real-time performance of resource random rendering display can be guaranteed, the spatial data is digitized, the development difficulty is reduced, and meanwhile the application range is not affected.
Corresponding to the above method embodiment, the present application further provides an embodiment of a data processing apparatus, and fig. 6 shows a schematic structural diagram of a data processing apparatus provided in an embodiment of the present application. As shown in fig. 6, the apparatus includes:
a response module 602 configured to create a resource arrangement area in response to the resource processing instruction and determine a resource to be arranged associated with the resource arrangement area;
a determining module 604, configured to determine the number of global blocks in the resource arrangement area and the number of resource blocks corresponding to the resources to be arranged;
a construction module 606 configured to construct a resource allocation sequence based on the global block number and the resource block number;
an updating module 608 configured to update the resource allocation region according to the resource allocation sequence and the resource to be allocated, and generate a target region according to an update result.
In an optional embodiment, the response module 602 is further configured to:
receiving the resource processing instruction; analyzing the resource processing instruction to obtain resource arrangement region information and resource information to be arranged; the resource arrangement region is created based on the resource arrangement region information, and the resource to be arranged associated with the resource arrangement region is determined based on the resource to be arranged information.
In an optional embodiment, the response module 602 is further configured to:
analyzing the resource arrangement region information to obtain a side length parameter and a precision parameter; constructing an initial resource arrangement area based on the side length parameter; dividing the initial resource arrangement region based on the precision parameters to obtain a resource arrangement region containing resource blocks; correspondingly, the determining the global block number in the resource arrangement area includes: determining the number of the resource blocks contained in the resource arrangement region as the global block number.
In an optional embodiment, the response module 602 is further configured to:
analyzing the resource information to be distributed to obtain resource identification parameters and resource proportion parameters; determining the resources to be arranged associated with the resource arrangement area based on the resource identification parameters; correspondingly, the determining the number of resource blocks corresponding to the resources to be arranged includes: and determining the number of resource blocks corresponding to the resources to be distributed based on the resource proportion parameter and the global block number.
In an optional embodiment, the determining module 604 is further configured to:
acquiring density information carried in the resource processing instruction; determining the total number of resource blocks according to the density information and the global block number; and determining the number of the resource blocks corresponding to the resources to be distributed based on the resource proportion parameter and the total number of the resource blocks.
In an optional embodiment, the construction module 606 is further configured to:
constructing an initial resource sequence based on the global block number; carrying out disorder processing on the initial resource sequence to obtain a disorder resource sequence; and constructing a resource allocation sequence based on the number of the resource blocks and the out-of-order resource sequence.
In an optional embodiment, the construction module 606 is further configured to:
constructing an initial index value based on the global block number, and creating initial resource sequence values corresponding to the resource blocks contained in the resource arrangement area one by one; creating an initial resource sequence pair based on the initial resource sequence value and the initial index value; and constructing the initial resource sequence according to the initial resource sequence pair.
In an optional embodiment, the construction module 606 is further configured to:
dividing the out-of-order resource sequence based on the number of resource blocks; and constructing a resource allocation sequence corresponding to the resources to be distributed based on the division result.
In an optional embodiment, the update module 608 is further configured to:
extracting resource sequence values in the resource allocation sequence; determining a target resource block corresponding to the resource sequence value in the resource allocation region and a resource index value corresponding to the resource sequence value based on the resource allocation sequence; determining an association relation between the resource index value and the resource to be arranged based on an initial index value associated with the resource index value; and updating the target resource block according to the incidence relation and the resources to be distributed, and generating the target area according to an updating result.
The application provides a data processing device can realize carrying out the random show of resource in predetermineeing the region, and the speed of processing resource random show task is fast, can guarantee the resource and render the real-time of show at random, with the space data digitization, does not influence application scope when reducing the development degree of difficulty.
The above is a schematic configuration of a data processing apparatus of the present embodiment. It should be noted that the technical solution of the data processing apparatus and the technical solution of the data processing method belong to the same concept, and details that are not described in detail in the technical solution of the data processing apparatus can be referred to the description of the technical solution of the data processing method. Further, the components in the device embodiment should be understood as functional blocks that must be created to implement the steps of the program flow or the steps of the method, and each functional block is not actually divided or separately defined. The device claims defined by such a set of functional modules should be understood as a functional module framework that mainly implements the solution by means of a computer program described in the specification, and should not be understood as a physical device that mainly implements the solution by means of hardware.
Fig. 7 illustrates a block diagram of a computing device 700 provided according to an embodiment of the present application. Components of the computing device 700 include, but are not limited to, a memory 710 and a processor 720. Processor 720 is coupled to memory 710 via bus 730, and database 750 is used to store data.
Computing device 700 also includes access device 740, access device 740 enabling computing device 700 to communicate via one or more networks 760. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 740 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the application, the above-described components of the computing device 700 and other components not shown in fig. 7 may also be connected to each other, for example, by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 7 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smartphone), wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 700 may also be a mobile or stationary server.
Wherein processor 720 is configured to execute the following computer-executable instructions:
creating a resource arrangement area in response to a resource processing instruction, and determining resources to be arranged associated with the resource arrangement area;
determining the number of global blocks in the resource arrangement area and the number of resource blocks corresponding to the resources to be arranged;
constructing a resource allocation sequence based on the global block number and the resource block number;
and updating the resource allocation region according to the resource allocation sequence and the resources to be allocated, and generating a target region according to an updating result.
The foregoing is a schematic diagram of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the data processing method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the data processing method.
An embodiment of the present application further provides a computer readable storage medium storing computer instructions that, when executed by a processor, are configured to:
responding to a resource processing instruction to create a resource arrangement area, and determining resources to be arranged associated with the resource arrangement area;
determining the number of global blocks in the resource arrangement area and the number of resource blocks corresponding to the resources to be arranged;
constructing a resource allocation sequence based on the global block number and the resource block number;
and updating the resource allocation region according to the resource allocation sequence and the resources to be allocated, and generating a target region according to an updating result.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the data processing method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the data processing method.
An embodiment of the present application further provides a chip, in which a computer program is stored, and the computer program implements the steps of the data processing method when executed by the chip.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that for simplicity and convenience of description, the above-described method embodiments are described as a series of combinations of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and/or concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the teaching of this application. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.
Claims (12)
1. A data processing method, comprising:
creating a resource arrangement area in response to a resource processing instruction, and determining resources to be arranged associated with the resource arrangement area;
determining the number of global blocks in the resource arrangement area and the number of resource blocks corresponding to the resources to be arranged;
constructing a resource allocation sequence based on the global block number and the resource block number;
and updating the resource allocation region according to the resource allocation sequence and the resources to be allocated, and generating a target region according to an updating result.
2. The method of claim 1, wherein the creating a resource allocation region in response to a resource processing instruction and determining the resource to be allocated associated with the resource allocation region comprises:
receiving the resource processing instruction;
analyzing the resource processing instruction to obtain resource arrangement region information and resource information to be arranged;
the resource arrangement region is created based on the resource arrangement region information, and the resource to be arranged associated with the resource arrangement region is determined based on the resource to be arranged information.
3. The method according to claim 2, wherein the creating the resource arrangement region based on the resource arrangement region information comprises:
analyzing the resource arrangement region information to obtain a side length parameter and a precision parameter;
constructing an initial resource arrangement area based on the side length parameter;
dividing the initial resource arrangement region based on the precision parameters to obtain a resource arrangement region containing resource blocks;
correspondingly, the determining the number of global blocks in the resource arrangement region includes:
determining the number of the resource blocks contained in the resource arrangement region as the global block number.
4. The method according to claim 3, wherein the determining the resource to be arranged associated with the resource arrangement region based on the resource to be arranged information comprises:
analyzing the resource information to be distributed to obtain a resource identification parameter and a resource proportion parameter;
determining the resources to be arranged associated with the resource arrangement area based on the resource identification parameters;
correspondingly, the determining the number of resource blocks corresponding to the resources to be arranged includes:
and determining the number of resource blocks corresponding to the resources to be distributed based on the resource proportion parameter and the global block number.
5. The method according to claim 4, wherein the determining the number of resource blocks corresponding to the resource to be arranged based on the resource occupancy parameter and the global number of blocks comprises:
acquiring density information carried in the resource processing instruction;
determining the total number of resource blocks according to the density information and the global block number;
and determining the number of the resource blocks corresponding to the resources to be distributed based on the resource proportion parameter and the total number of the resource blocks.
6. The method of claim 3, wherein the constructing a resource allocation sequence based on the number of global blocks and the number of resource blocks comprises:
constructing an initial resource sequence based on the global block number;
carrying out disorder processing on the initial resource sequence to obtain a disorder resource sequence;
and constructing a resource allocation sequence based on the number of the resource blocks and the out-of-order resource sequence.
7. The method of claim 6, wherein the constructing an initial resource sequence based on the global block number comprises:
constructing an initial index value based on the global block number, and creating initial resource sequence values in one-to-one correspondence with the resource blocks contained in the resource arrangement area;
creating an initial resource sequence pair based on the initial resource sequence value and the initial index value;
and constructing the initial resource sequence according to the initial resource sequence pair.
8. The method of claim 6, wherein the constructing a resource allocation sequence based on the number of resource blocks and the out-of-order resource sequence comprises:
dividing the out-of-order resource sequence based on the number of resource blocks;
and constructing a resource allocation sequence corresponding to the resources to be distributed based on the division result.
9. The method according to claim 7, wherein the updating the resource allocation region according to the resource allocation sequence and the resource to be allocated, and generating a target region according to an update result comprises:
extracting resource sequence values in the resource allocation sequence;
determining a target resource block corresponding to the resource sequence value in the resource allocation region and a resource index value corresponding to the resource sequence value based on the resource allocation sequence;
determining an incidence relation between the resource index value and the resource to be arranged based on an initial index value associated with the resource index value;
and updating the target resource block according to the incidence relation and the resources to be distributed, and generating the target area according to an updating result.
10. A data processing apparatus, comprising:
a response module configured to create a resource arrangement area in response to a resource processing instruction and determine a resource to be arranged associated with the resource arrangement area;
a determining module configured to determine the number of global blocks in the resource arrangement area and the number of resource blocks corresponding to the resources to be arranged;
a construction module configured to construct a resource allocation sequence based on the global block number and the resource block number;
and the updating module is configured to update the resource allocation region according to the resource allocation sequence and the resources to be allocated, and generate a target region according to an updating result.
11. A computing device, comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions to implement the steps of the data processing method of any one of claims 1 to 9.
12. A computer-readable storage medium storing computer instructions, which when executed by a processor implement the steps of the data processing method of any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210164690.9A CN115225588B (en) | 2022-02-22 | 2022-02-22 | Data processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210164690.9A CN115225588B (en) | 2022-02-22 | 2022-02-22 | Data processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115225588A true CN115225588A (en) | 2022-10-21 |
CN115225588B CN115225588B (en) | 2024-02-23 |
Family
ID=83606299
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210164690.9A Active CN115225588B (en) | 2022-02-22 | 2022-02-22 | Data processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115225588B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8441496B1 (en) * | 2008-09-30 | 2013-05-14 | Adobe Systems Incorporated | Method and system for modifying and rendering scenes via display lists |
US20170157510A1 (en) * | 2015-12-03 | 2017-06-08 | Disney Enterprises, Inc. | Systems and methods for procedural game content generation via interactive non-player game entities |
WO2017131071A1 (en) * | 2016-01-28 | 2017-08-03 | 日本電信電話株式会社 | Virtual environment construction device, video presentation device, model learning device, optimum depth determination device, method therefor, and program |
CN107832558A (en) * | 2017-11-29 | 2018-03-23 | 闽江学院 | Digital stage intention scene intelligent generation method |
CN107945280A (en) * | 2017-12-12 | 2018-04-20 | 苏州蜗牛数字科技股份有限公司 | A kind of method for simulating true celestial body ecologicaI distribution |
CN109806592A (en) * | 2019-01-18 | 2019-05-28 | 网易(杭州)网络有限公司 | A kind of monitoring method and device of game resource |
CN111343485A (en) * | 2020-01-17 | 2020-06-26 | 广州华多网络科技有限公司 | Method, device, equipment, system and storage medium for displaying virtual gift |
CN112102492A (en) * | 2020-08-21 | 2020-12-18 | 完美世界(北京)软件科技发展有限公司 | Game resource manufacturing method and device, storage medium and terminal |
CN112206534A (en) * | 2020-11-04 | 2021-01-12 | 网易(杭州)网络有限公司 | Vegetation object processing method, device, equipment and storage medium |
CN112402981A (en) * | 2020-11-11 | 2021-02-26 | 完美世界(北京)软件科技发展有限公司 | Game scene control method and device, storage medium and electronic equipment |
CN113495767A (en) * | 2020-03-20 | 2021-10-12 | 北京轻舟智航智能技术有限公司 | Interactive scene generation method and device and electronic equipment |
CN113569167A (en) * | 2021-02-03 | 2021-10-29 | 腾讯科技(深圳)有限公司 | Resource processing method and device, terminal equipment and storage medium |
-
2022
- 2022-02-22 CN CN202210164690.9A patent/CN115225588B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8441496B1 (en) * | 2008-09-30 | 2013-05-14 | Adobe Systems Incorporated | Method and system for modifying and rendering scenes via display lists |
US20170157510A1 (en) * | 2015-12-03 | 2017-06-08 | Disney Enterprises, Inc. | Systems and methods for procedural game content generation via interactive non-player game entities |
WO2017131071A1 (en) * | 2016-01-28 | 2017-08-03 | 日本電信電話株式会社 | Virtual environment construction device, video presentation device, model learning device, optimum depth determination device, method therefor, and program |
CN107832558A (en) * | 2017-11-29 | 2018-03-23 | 闽江学院 | Digital stage intention scene intelligent generation method |
CN107945280A (en) * | 2017-12-12 | 2018-04-20 | 苏州蜗牛数字科技股份有限公司 | A kind of method for simulating true celestial body ecologicaI distribution |
CN109806592A (en) * | 2019-01-18 | 2019-05-28 | 网易(杭州)网络有限公司 | A kind of monitoring method and device of game resource |
CN111343485A (en) * | 2020-01-17 | 2020-06-26 | 广州华多网络科技有限公司 | Method, device, equipment, system and storage medium for displaying virtual gift |
CN113495767A (en) * | 2020-03-20 | 2021-10-12 | 北京轻舟智航智能技术有限公司 | Interactive scene generation method and device and electronic equipment |
CN112102492A (en) * | 2020-08-21 | 2020-12-18 | 完美世界(北京)软件科技发展有限公司 | Game resource manufacturing method and device, storage medium and terminal |
CN112206534A (en) * | 2020-11-04 | 2021-01-12 | 网易(杭州)网络有限公司 | Vegetation object processing method, device, equipment and storage medium |
CN112402981A (en) * | 2020-11-11 | 2021-02-26 | 完美世界(北京)软件科技发展有限公司 | Game scene control method and device, storage medium and electronic equipment |
CN113569167A (en) * | 2021-02-03 | 2021-10-29 | 腾讯科技(深圳)有限公司 | Resource processing method and device, terminal equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
MESFIN A.DEMA: "3D Scene Generation by Learning from Examples", 《2012 IEEE INTERNATIONAL SYM[PSIUM ON MULTIMEDIA》 * |
武文杰: "基于虚拟现实技术的大场景自然环境仿真的研究", 《中国优秀硕士学位论文全文数据库》 * |
Also Published As
Publication number | Publication date |
---|---|
CN115225588B (en) | 2024-02-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111068314B (en) | NGUI resource rendering processing method and device based on Unity | |
CN110570506A (en) | Map resource management method and device, computing equipment and storage medium | |
CN110399446A (en) | Visualization method, device, equipment and storage medium for large-scale spatio-temporal data | |
CN113421312B (en) | Coloring method and device for black-and-white video, storage medium and terminal | |
CN113658085B (en) | Image processing method and device | |
JP2013026659A (en) | Super-resolution image processing device and dictionary creating device for super-resolution image processing | |
CN110210532A (en) | Background colour generation method, device and electronic equipment | |
CN111617480A (en) | Point cloud rendering method and device | |
CN111617483A (en) | Map editing method and device | |
CN114492599A (en) | Medical image preprocessing method and device based on Fourier domain adaptation | |
CN109257609B (en) | Data processing method and device, electronic equipment and storage medium | |
CN114820988A (en) | Three-dimensional modeling method, apparatus, equipment and storage medium | |
CN110975284A (en) | Unity-based NGUI resource rendering processing method and device | |
Yang et al. | Local tone mapping algorithm and hardware implementation | |
CN115225588A (en) | Data processing method and device | |
CN110446118B (en) | Video resource preprocessing method and device and video resource downloading method and device | |
CN110363733B (en) | Mixed image generation method and device | |
Yu et al. | Contextual algorithm for color quantization | |
CN110555816B (en) | Picture processing method and device, computing equipment and storage medium | |
CN113254000B (en) | Method, device, storage medium and equipment for generating 2D scene based on JSON data | |
CN117112090A (en) | Business page theme generation method, device, computer equipment, medium and product | |
CN111246046B (en) | Pattern encoding method and device, pattern decoding method and device | |
CN112819313A (en) | Target image generation method and device | |
CN104935647B (en) | A kind of sharing files method and device | |
CN114185915A (en) | Service processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |