CN117689759B - Adaptive storage method for image rendering data - Google Patents
Adaptive storage method for image rendering data Download PDFInfo
- Publication number
- CN117689759B CN117689759B CN202410145238.7A CN202410145238A CN117689759B CN 117689759 B CN117689759 B CN 117689759B CN 202410145238 A CN202410145238 A CN 202410145238A CN 117689759 B CN117689759 B CN 117689759B
- Authority
- CN
- China
- Prior art keywords
- rendering
- file
- target rendering
- target
- importance
- 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.)
- Active
Links
- 238000009877 rendering Methods 0.000 title claims abstract description 628
- 238000000034 method Methods 0.000 title claims abstract description 86
- 230000003044 adaptive effect Effects 0.000 title claims description 9
- 230000008569 process Effects 0.000 claims abstract description 57
- 230000002159 abnormal effect Effects 0.000 claims abstract description 38
- 238000007906 compression Methods 0.000 claims description 17
- 230000006835 compression Effects 0.000 claims description 17
- 230000004044 response Effects 0.000 claims description 15
- 238000010606 normalization Methods 0.000 claims description 6
- 230000000694 effects Effects 0.000 abstract description 17
- 238000013144 data compression Methods 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 3
- 238000005286 illumination Methods 0.000 description 3
- 230000015572 biosynthetic process Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/174—Redundancy elimination performed by the file system
- G06F16/1744—Redundancy elimination performed by the file system using compression, e.g. sparse files
-
- 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)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to the field of rendering data compression storage, in particular to a self-adaptive storage method for image rendering data. Firstly, acquiring a rendering data file and a log file in an image rendering process; obtaining the initial importance of the rendering data file according to the difference between the maximum timestamp and the minimum timestamp in the log file, the number of the timestamps and the number of the abnormal timestamps; dividing the rendering process into different stages, and taking the stage where the rendering data file is located as a target rendering stage; analyzing the difference of the storage space of the target rendering file between each target rendering stage and the previous stage and the initial importance of the target rendering file to obtain the real importance of the target rendering file; and compressing each rendering data file according to the real importance, and storing the compressed files. The invention ensures the data precision of the compressed key rendering data while efficiently utilizing the storage space, and improves the effect of storing the image rendering data.
Description
Technical Field
The invention relates to the field of rendering data compression storage, in particular to a self-adaptive storage method for image rendering data.
Background
The image rendering is a process of converting three-dimensional light energy into a two-dimensional image, is the most important research topic in computer graphics, and along with the occurrence of more and more rendering engines, the quantity and the variety of rendering data become more and more huge, so that the storage of the image rendering data is particularly important for meeting the real-time performance of rendering and improving the quality of rendering results.
Because the rendering data generally exists in the form of computer files, in order to improve the utilization rate of storage space, the rendering data files are generally compressed in a unified mode in the related art, and the compressed files are stored, but because the types and the data volumes of the rendering data generated in the whole image rendering process are huge and the importance of different rendering data files in the rendering work is different, the existing method cannot simultaneously ensure the high-efficiency utilization of the storage space and the precision of the compressed rendering data, and further reduce the effect of storing the image rendering data.
Disclosure of Invention
In order to solve the technical problem that the existing method cannot simultaneously ensure the high-efficiency utilization of the storage space and the precision of the compressed rendering data and further reduce the effect of storing the image rendering data, the invention aims to provide a self-adaptive storage method for the image rendering data, which adopts the following specific technical scheme:
The invention provides a self-adaptive storage method for image rendering data, which comprises the following steps:
acquiring rendering data files in different formats in an image rendering process and log files for recording different time stamps in the generation process of each rendering data file, wherein the time stamps comprise abnormal time stamps;
Taking any one rendering data file as a target rendering file, and obtaining the initial importance of the target rendering file according to the difference between the maximum timestamp and the minimum timestamp in the log file of the target rendering file, the number of the timestamps and the number of the abnormal timestamps;
Dividing an image rendering process into different image rendering stages according to preset time length, and taking the image rendering stage where a target rendering file is located as a target rendering stage; obtaining the stage importance of the target rendering file in each target rendering stage according to the difference of the storage space of the target rendering file between each target rendering stage and the previous image rendering stage, the number of the rendering data files in the same format as the target rendering file in the corresponding target rendering stage and the number of all the rendering data file format types in the corresponding target rendering stage; acquiring the real importance of the target rendering file based on the phase importance of the target rendering file in all target rendering phases and the initial importance of the target rendering file;
And compressing each rendering data file in different modes according to the real importance, obtaining a compressed rendering file, and storing the compressed rendering file.
Further, the obtaining the initial importance of the target rendering file according to the difference between the maximum timestamp and the minimum timestamp in the log file of the target rendering file, the number of timestamps and the number of abnormal timestamps includes:
Taking the difference value between the maximum timestamp and the minimum timestamp in the log file of the target rendering file as the generation time of the target rendering file; taking the generation time length as a numerator, taking the difference value between the number of all time stamps in a log file of a target rendering file and a constant 1 as a denominator, and taking the ratio as an adjustment period parameter of the target rendering file;
taking the ratio of the number of abnormal time stamps in the log file of the target rendering file to the total number of all time stamps as an abnormal response parameter of the target rendering file;
And obtaining the initial importance of the target rendering file according to the adjustment period parameter and the abnormal response parameter.
Further, the obtaining the initial importance of the target rendering file according to the adjustment period parameter and the abnormal response parameter includes:
and carrying out inversely related normalization on the ratio of the adjustment period parameter to the abnormal response parameter to obtain the initial importance of the target rendering file.
Further, the obtaining the stage importance of the target rendering file in each target rendering stage according to the difference of the storage space of the target rendering file between each target rendering stage and the previous image rendering stage, the number of the rendering data files with the same format as the target rendering file in the corresponding target rendering stage, and the number of all the rendering data file format types in the corresponding target rendering stage includes:
Taking the difference value between the storage space of the target rendering file in each target rendering stage and the storage space of the previous image rendering stage as the storage space variation of the target rendering file in each target rendering stage;
In each target rendering stage, taking the number of rendering data files in the same format as the target rendering files as a first number and taking the number of all the rendering data file format types in each target rendering stage as a second number;
And obtaining the phase importance of the target rendering file in each target rendering phase according to the storage space variation, the first quantity and the second quantity.
Further, the obtaining the phase importance of the target rendering file in each target rendering phase according to the storage space variation, the first quantity and the second quantity includes:
normalizing the storage space variation to obtain variation parameters of the target rendering file in each target rendering stage;
normalizing the sum of the first quantity and the second quantity to obtain the quantity parameter of the target rendering file in each target rendering stage;
And taking the product value of the variable quantity parameter and the quantity parameter as the stage importance of the target rendering file in each target rendering stage.
Further, the obtaining the true importance of the target rendering file based on the phase importance of the target rendering file in all the target rendering phases and the initial importance of the target rendering file includes:
Taking the average value of the phase importance of the target rendering file in all the target rendering phases as the overall importance of the target rendering file;
And obtaining the real importance of the target rendering file according to the overall importance and the initial importance of the target rendering file.
Further, the obtaining the true importance of the target rendering file according to the overall importance and the initial importance of the target rendering file includes:
and normalizing the product value of the overall importance of the target rendering file and the initial importance to obtain the true importance of the target rendering file.
Further, the compressing each rendering data file in different manners according to the real importance, and obtaining the compressed rendering file includes:
And if the real importance is larger than a preset importance threshold, performing lossless compression on the rendering data file, otherwise, performing lossy compression on the rendering data file, and taking the compressed file as a compressed rendering file.
Further, storing the compressed rendering file includes:
Adding metadata to each compressed rendering file, wherein the metadata comprises a file compression mode and a file compression date;
and storing the compressed rendering file and the corresponding metadata in a folder together.
Further, the preset duration is two hours.
The invention has the following beneficial effects:
According to the invention, the problem that in the prior art, the rendering data files are compressed and stored in a unified mode generally is solved, so that the storage space and the precision of the compressed rendering data cannot be effectively utilized, and the effect of storing the image rendering data is reduced; according to the method, firstly, the rendering data files and the log files generated in the whole image rendering process are acquired, the rendering parameters are continuously adjusted in the image rendering process so as to meet the final effect, the rendering data files are gradually generated along with the progress of rendering work, the time stamp corresponding to each adjusting operation of the rendering data files in the generating process is recorded in the log files in detail, the more frequently the adjusting operation indicates that the rendering data files are more important in the whole image rendering process, the more the number of abnormal time stamps indicates that the rendering parameters need to be repeatedly adjusted, the more important the rendering data files are needed, therefore, the difference between the maximum time stamp and the minimum time stamp in the log files, the number of time stamps and the number of abnormal time stamps can be analyzed, the importance of the object rendering files in the rendering process can be preliminarily reflected through the acquired initial importance, the importance of the object rendering files in the rendering process is considered, if the object rendering stages are more important than the previous image rendering stages, the storage space of the object files is increased, the object rendering files are more important files, the importance files are considered to be more important in the important stages, the object rendering files can be compressed and the data can be stored in the real rendering process after the image rendering process, the data can be further compressed, the importance is further, and the data can be stored in the real rendering mode is more important when the object rendering files are more important, and the data are more important is more important when the object rendering files are more important.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an adaptive storage method for image rendering data according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a relationship between log files and rendering data files according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purposes, the following detailed description refers to specific embodiments, structures, features and effects of an adaptive storage method for image rendering data according to the present invention, with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the adaptive storage method for image rendering data provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for adaptively storing image rendering data according to an embodiment of the present invention is shown, where the method includes:
step S1: and acquiring rendering data files in different formats in the image rendering process and log files for recording different time stamps in the generation process of each rendering data file, wherein the time stamps comprise abnormal time stamps.
Image rendering is an important research topic in computer graphics, with the advent of more and more rendering engines, the number and variety of rendering data become more and more huge, rendering data are generally stored in a computer in a file form, in order to meet the real-time performance of rendering and improve the quality of rendering results, in related technologies, rendering data files are generally compressed in a unified way, and the compressed files are stored, so that the compressed files are directly decompressed at a later time, and corresponding image rendering work is performed, but due to the fact that the variety and data amount of rendering data generated in the whole image rendering process are huge, and the importance of different rendering data files in the rendering work is different, the existing method cannot simultaneously ensure the high-efficiency utilization of storage space and the precision of the compressed rendering data, and further reduce the effect of storing the image rendering data, the embodiment of the invention provides an adaptive storage method for the image rendering data, so as to solve the problem.
Image rendering is usually performed on a rendering engine, and the image rendering process is to continuously adjust a large number of rendering parameters such as color, illumination, shadow, etc. to meet the final effect, for example, adjust illumination of a certain type to illumination of another type, adjust the position of a light source from place to place, and a complete rendering data file is gradually generated along with the image rendering process, so that the embodiment of the invention firstly obtains all the rendering data files and corresponding log files generated in the whole image rendering process in the rendering engine software, wherein the rendering data files have different formats, for example, the image files may include a. Tiff format and a. Bmp format, etc., and the log files record details of the adjustment operation of the rendering parameters and time stamps of each adjustment in the generating process of the rendering data files, wherein the time stamps are corresponding moments when the rendering parameters are adjusted each time, and refer to fig. 2, and fig. 2 is a graph of the log file and the corresponding log file, wherein the left side is the rendering data file, the rendering details of which is recorded information, and the right side is the rendering file; meanwhile, part of abnormal response time stamps exist in all time stamps in the generation process of the rendering data files, namely abnormal time stamps, if abnormal time stamps exist, the fact that the adjustment of a certain rendering parameter is insufficient is indicated, the adjustment needs to be continued, the adjustment needs to be repeated to achieve a desired effect, the time stamps in the log files and the abnormal time stamps exist in the follow-up steps, and the importance of each rendering data file in image rendering is analyzed.
After the rendering data file and the corresponding log file are acquired, the importance of the rendering data file in the image rendering process can be analyzed based on the number of time stamps of the rendering data file recorded by the log file in the generating process, so that the rendering data file is adaptively compressed and stored.
Step S2: and taking any one rendering data file as a target rendering file, and obtaining the initial importance of the target rendering file according to the difference between the maximum timestamp and the minimum timestamp in the log file of the target rendering file, the number of the timestamps and the number of the abnormal timestamps.
Because a plurality of rendering data files with different formats are generated in the whole image rendering process, the aim of the embodiment of the invention is to carry out self-adaptive compression storage on each rendering data file, so that any one rendering data file can be used as a target rendering file for facilitating subsequent analysis, and the analysis process of other rendering data files is identical to the analysis of the target rendering file; because the generating process of the target rendering file is actually adjusting various rendering parameters to meet the final rendering effect, if the adjusting of various rendering parameters is more frequent in the whole generating process of the target rendering file, the target rendering file is more important in image rendering work, the frequency of the adjusting operation of the rendering parameters in the target rendering file can be reflected by the total time length of generating the target rendering file and the number of adjusting operations, the time stamp corresponding to each adjusting operation in the generating process of the target rendering file is recorded in the log file, wherein the minimum time stamp and the maximum time stamp in all time stamps can determine the total time length of generating the target rendering file, the number of time stamps can reflect the number of adjusting operations, the occurrence of abnormal time stamps indicates that the adjusting of a certain rendering parameter is insufficient, the adjusted rendering effect is poor, and therefore the target rendering file needs to be repeatedly adjusted until the final effect is met, the more abnormal time stamps indicate that the texture of a relatively fine part such as the surface of an object is processed, and the maximum time stamp and the minimum time stamp in the log file can be analyzed, and the number of the important difference between the initial time stamp and the initial time stamp in the initial rendering process can be reflected by the number of the initial rendering file.
Preferably, in one embodiment of the present invention, the method for acquiring the initial importance of the target rendering file specifically includes:
Because the time stamp recorded in the log file is the time for adjusting the rendering parameters each time, the difference between the maximum time stamp and the minimum time stamp in the log file of the target rendering file can be used as the generation time of the target rendering file; taking the generation time length as a numerator, taking the difference value between the number of all time stamps in the log file of the target rendering file and the constant 1 as a denominator, and taking the ratio as an adjustment period parameter of the target rendering file; taking the ratio of the number of abnormal time stamps in the log file of the target rendering file to the total number of all time stamps as an abnormal response parameter of the target rendering file; and carrying out negative correlation normalization on the ratio of the adjustment period parameter and the abnormal response parameter to obtain the initial importance of the target rendering file. The expression of initial importance may specifically be, for example:
,
,
,
Wherein, Representing an initial importance of the target rendering file; /(I)An adjustment period parameter representing a target rendering file; Abnormal response parameters representing the target rendering file; /(I) Representing a maximum timestamp in a log file of the target rendering file; /(I)A minimum timestamp in a log file representing the target rendering file; /(I)Representing the number of timestamps in the log file of the target rendering file,/>;/>Representing the number of abnormal time stamps in the log file of the target rendering file,;/>Expressed as natural constant/>An exponential function of the base.
In the process of acquiring the initial importance of the target rendering file, the initial importanceThe larger the description target rendering file is, the more important it is in the whole image rendering process, wherein the generation duration/>Time taken from start of creation to complete file formation for target rendering file,/>Representing the number of time stamps adjacent to each other, due to/>The number of time stamps in the log file representing the target rendering file, that is, the number of times of adjusting the rendering parameters, is that in the image rendering process, the formation of the target rendering file requires a large amount of adjustment operations on the rendering parameters, so/>WhileAnd/>The ratio reflects the average time interval between two adjacent adjustment operations in the target rendering file, thus adjusting the cycle parameter/>The smaller the target rendering file, the more frequent the adjustment operation is performed in the target rendering file, and the more important the target rendering file is in the image rendering process, the initial importance/>The larger the abnormal response parameter/>The larger the ratio of the abnormal time stamp in all time stamps is, the target rendering file needs to repeatedly adjust rendering parameters, the target rendering file needs to render relatively fine parts, and then the more important the target rendering file is in the image rendering process, the initial importance/>The larger and in actual image rendering work, an abnormal response, i.e., an abnormal timestamp/>, must occur in a large number of adjustment operations to rendering parametersTherefore/>Thus, natural constant/>, can be usedThe exponential function as a base adjusts the cycle parameters and the abnormal response parameters/>Is normalized by the ratio of negative correlations, and the initial importance/>Defined at/>And in the range, the subsequent evaluation and analysis are convenient.
After the initial importance of the target rendering file in the whole image rendering process is obtained, the target rendering file can be comprehensively evaluated and analyzed based on the initial importance in the follow-up process by combining the importance of each stage.
Step S3: dividing an image rendering process into different image rendering stages according to preset time length, and taking the image rendering stage where a target rendering file is located as a target rendering stage; obtaining the stage importance of the target rendering file in each target rendering stage according to the difference of the storage space of the target rendering file between each target rendering stage and the previous image rendering stage, the number of the rendering data files in the same format as the target rendering file in the corresponding target rendering stage and the number of all the rendering data file format types in the corresponding target rendering stage; and obtaining the real importance of the target rendering file based on the phase importance of the target rendering file in all target rendering phases and the initial importance of the target rendering file.
In the embodiment of the invention, the whole image rendering process is divided into different image rendering stages according to preset time length, wherein the specific value of the preset time length can be set by an implementer according to specific implementation scenes, and if the last stage is less than 2 hours, the last stage is also regarded as an image rendering stage, and not described in detail herein, because a complete target rendering file may not be generated in the first image rendering stage, and meanwhile, the generation process of the target rendering file may span a plurality of continuous image rendering stages from the beginning to the end, so that the image rendering stage where the target rendering file is located can be used as the target rendering stage, for the purpose of conveniently analyzing the stage importance of the target rendering file later, for example, the whole image rendering process is divided into 10 image rendering stages, and the target rendering file may be generated from the 2 nd image rendering stage to the 5 th image rendering stage, and the 2 nd image rendering stage is the target rendering stage which is the target rendering stage.
The importance of the target rendering files in different target rendering stages is different when the importance of the rendering tasks in each target rendering stage is different, the file size of the target rendering files in the generation process, namely the storage space is gradually increased, the target rendering files are more important in a certain target rendering stage, the fact that the storage space of the target rendering files in the target rendering stage is relatively large in change relative to the storage space of the target rendering stage is explained, and rendering data files in other formats are generated in each target rendering stage, so that the difference of the storage space of the target rendering files between each target rendering stage and the previous image rendering stage, the number of the rendering data files in the same format as the target rendering files in the corresponding target rendering stages and the number of all the rendering data file format types in the corresponding target rendering stages can be analyzed, the importance degree of the target rendering files in each target rendering stage is reflected through the acquired stage importance, and more accurate evaluation analysis is conveniently carried out by combining the stage importance and initial importance of the target rendering files, and the adaptive compression storage effect of the rendering data files is improved.
Preferably, in one embodiment of the present invention, the method for acquiring the phase importance of the target rendering file in each target rendering phase specifically includes:
In the whole target rendering stage, the storage space of the target rendering file is continuously increased along with the time, so that the difference between the storage space of the target rendering file in each target rendering stage and the storage space of the target rendering file in the previous image rendering stage can be used as the storage space variation of the target rendering file in each target rendering stage, and it is required to be noted that the first target rendering stage is the initial stage of generating the target rendering file, the target rendering file does not exist in the previous image rendering stage, and the storage space of the target rendering file in the previous image rendering stage can be set to be 0; taking the number of the rendering data files in the same format as the target rendering files in each target rendering stage as a first number, wherein the first number comprises the target rendering files per se, and taking the number of all the rendering data file format types in each target rendering stage as a second number; normalizing the storage space variation to obtain variation parameters of the target rendering file in each target rendering stage; normalizing the sum of the first quantity and the second quantity to obtain the quantity parameter of the target rendering file in each target rendering stage; and taking the product value of the variable quantity parameter and the quantity parameter as the stage importance of the target rendering file in each target rendering stage. The expression of the stage importance may specifically be, for example:
,
Wherein, Representing the target rendering file at/>The phase importance of the individual target rendering phases; /(I)Representing the target rendering file at/>Storage space for each target rendering stage; /(I)Representing the target rendering file at/>A memory space of a previous image rendering stage of the target rendering stage; /(I)Represents the/>/>, In a target rendering stageThe rendering data file is at/>Storage space for each target rendering stage; /(I)Represents the/>/>, In a target rendering stageThe rendering data file is at/>A memory space of a previous image rendering stage of the target rendering stage; /(I)Represents the/>The number of rendering data files present in the individual target rendering phases, wherein/>Including the target rendering file itself; /(I)Expressed in/>In the target rendering stage, the number of rendering data files in the same format as the target rendering files, namely, the first number; /(I)Represents the/>The number of all rendering data file format categories in the target rendering stage, i.e. the second number.
If it is whenIn this case, since the target rendering file is not present in the previous image rendering stage of the 1 st target rendering stage, i.e. the 1 st target rendering stage is the initial stage of generating the target rendering file, the method can cause; Meanwhile, for a certain rendering data file in a certain target rendering stage, if the rendering data file does not exist in the previous image rendering stage of the target rendering stage, that is, the target rendering stage is the initial stage of generating the rendering data file, the/>; And if the 1 st target rendering stage is the 1 st image rendering stage, and the previous image rendering stage of the 1 st target rendering stage is not present, the 1 st target rendering stage is the initial stage of generating all the rendering data files appearing in the target rendering stage, and the/>And/>。
In the process of acquiring the phase importance of each target rendering phase, the larger the phase importance of the target rendering file, the more important the target rendering file is in the target rendering phase, which means that the target rendering file needs to be used for carrying out key rendering work in the target rendering phase, and further the more important the target rendering file is in the target rendering phase, wherein the storage space variation of the target rendering file is calculatedThe larger the memory space that accounts for the target rendering file, the larger the increase in memory space from the previous image rendering stage to the target rendering stage, and thus the variance parameter/>The larger the target rendering file is, the more obvious the change of the storage space of the target rendering file is relative to other rendering data files in the target rendering stage is, and the more important the target rendering file is in the target rendering stage when the target rendering file needs to be used for carrying out the key rendering work in the target rendering stage is, the more important the target rendering file is in the target rendering stage is, and the stage importance/>The larger is, wherein/>For storage space variation/>Normalization,/>The larger the number of rendering data files in the same format as the target rendering file in the target rendering stage, the larger the number of the types of the rendering data file in the target rendering stage, and the more the operation tasks of rendering by using the rendering data file in the target rendering stage, the more the pair/>Normalization processing is carried out to obtain quantity parameters/>The quantity parameter is defined at/>Within the scope, if the result of multiplying the quantity parameter and the variation parameter still remains larger at this time, it is stated that in the target rendering stage, the target rendering file is more important than other rendering data files, so the product value of the variation parameter and the quantity parameter can be taken as the stage importance/>。
After the phase importance of the target rendering file in each target rendering phase is obtained, the phase importance of the target rendering file in all target rendering phases and the initial importance of the target rendering file can be combined, the importance degree of the target rendering file in the image rendering process is reflected through the obtained true importance, the target rendering file can be compressed in different modes conveniently based on the true importance, and the storage effect of image rendering data is improved.
Preferably, in one embodiment of the present invention, the method for acquiring the true importance of the target rendering file specifically includes:
Taking the average value of the phase importance of the target rendering file in all the target rendering phases as the overall importance of the target rendering file; and normalizing the product value of the overall importance and the initial importance of the target rendering file to obtain the true importance of the target rendering file. The expression of the true importance may specifically be, for example:
,
Wherein, Representing the true importance of the target rendering file; /(I)Representing an initial importance of the target rendering file; /(I)Representing the target rendering file at/>The phase importance of the individual target rendering phases; /(I)Representing a number of target rendering phases of the target rendering file; /(I)Representing the normalization function.
In the process of acquiring the true importance of the target rendering file, the greater the true importance, the more important the target rendering file is in image rendering work, wherein the initial importance is shownThe larger the target rendering file is, the more important the target rendering file is in the generation process and the image rendering process is, the real importance/>The greater the phase importance/>The larger the target rendering file is, the more important the target rendering file is in the target rendering stage, so the average value of the stage importance of the target rendering file in all the target rendering stages is calculatedAs the overall importance, the greater the contribution of the target rendering file to the image rendering work in all target rendering phases is illustrated, and further the greater the importance of the target rendering file is illustrated, the true importance/>The larger the product value of the initial importance and the overall importance can be normalized, limiting the true importance to/>In the range, the target rendering file is convenient to evaluate and analyze later, and compression processing in different modes is carried out.
The real importance of the target rendering file can be obtained through the steps, for other rendering data files, the real importance corresponding to each rendering data file can be obtained based on the same analysis process, and in the follow-up process, the corresponding rendering data files can be compressed in different modes according to the real importance, so that the data precision of the compressed rendering data files is guaranteed while the storage space is efficiently utilized, and the effect of storing the image rendering data is further improved.
Step S4: and compressing each rendering data file in different modes according to the real importance, obtaining a compressed rendering file, and storing the compressed rendering file.
Because image rendering can generate a large amount of rendering data, in order to efficiently utilize the disk space of a computer, the rendering data files are usually required to be compressed and stored, and the accuracy of the compressed data is required to be ensured to be higher for more important rendering data, so that the rendering effect of using decompressed rendering data can be ensured, and the real importance can reflect the importance of the corresponding rendering data files in the image rendering work, so that each rendering data file can be compressed in different modes according to the real importance, and the compressed rendering files are stored.
Preferably, in one embodiment of the present invention, the method for acquiring the compressed rendering file specifically includes:
if the real importance is greater than a preset importance threshold, the corresponding rendering data file is more important in the image rendering process, in order to ensure the accuracy of the compressed rendering data, the rendering data file may be subjected to lossless compression, otherwise, the rendering data file is subjected to lossy compression, the compressed file is used as a compressed rendering file, the preset importance threshold is set to 0.8, a specific value of the preset importance threshold can also be set by an implementer according to a specific implementation scene, and the method is not limited herein, and the lossy compression and the lossless compression are all technical means well known to those skilled in the art and are not repeated herein.
After each rendering data file is compressed to obtain a corresponding compressed rendering file, the compressed rendering file can be stored in a computer, preferably, metadata is added to each compressed rendering file in one embodiment of the invention, so that the compressed rendering file can be conveniently identified and searched by related personnel, and the metadata comprises a file compression mode and a file compression date; and storing the compressed rendering file and the corresponding metadata in a folder together.
In summary, the embodiment of the invention obtains the rendering data files and the log files in different formats in the image rendering process; taking any one rendering data file as a target rendering file, and obtaining the initial importance of the target rendering file according to the difference between the maximum timestamp and the minimum timestamp in the log file of the target rendering file, the number of the timestamps and the number of the abnormal timestamps; dividing an image rendering process into different image rendering stages according to preset time length, and taking the image rendering stage where a target rendering file is located as a target rendering stage; obtaining the stage importance of the target rendering file in each target rendering stage according to the difference of the storage space of the target rendering file between each target rendering stage and the previous image rendering stage, the number of the rendering data files in the same format as the target rendering file in the corresponding target rendering stage and the number of all the rendering data file format types in the corresponding target rendering stage; acquiring the real importance of the target rendering file based on the phase importance of the target rendering file in all target rendering phases and the initial importance of the target rendering file; and compressing each rendering data file in different modes according to the real importance, obtaining a compressed rendering file, and storing the compressed rendering file.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
Claims (6)
1. A method for adaptive storage of image rendering data, the method comprising:
acquiring rendering data files in different formats in an image rendering process and log files for recording different time stamps in the generation process of each rendering data file, wherein the time stamps comprise abnormal time stamps;
Taking any one rendering data file as a target rendering file, and obtaining the initial importance of the target rendering file according to the difference between the maximum timestamp and the minimum timestamp in the log file of the target rendering file, the number of the timestamps and the number of the abnormal timestamps;
Dividing an image rendering process into different image rendering stages according to preset time length, and taking the image rendering stage where a target rendering file is located as a target rendering stage; obtaining the stage importance of the target rendering file in each target rendering stage according to the difference of the storage space of the target rendering file between each target rendering stage and the previous image rendering stage, the number of the rendering data files in the same format as the target rendering file in the corresponding target rendering stage and the number of all the rendering data file format types in the corresponding target rendering stage; acquiring the real importance of the target rendering file based on the phase importance of the target rendering file in all target rendering phases and the initial importance of the target rendering file;
compressing each rendering data file in different modes according to the real importance, obtaining a compressed rendering file, and storing the compressed rendering file;
The obtaining the initial importance of the target rendering file according to the difference between the maximum timestamp and the minimum timestamp in the log file of the target rendering file, the number of timestamps and the number of abnormal timestamps comprises:
Taking the difference value between the maximum timestamp and the minimum timestamp in the log file of the target rendering file as the generation time of the target rendering file; taking the generation time length as a numerator, taking the difference value between the number of all time stamps in a log file of a target rendering file and a constant 1 as a denominator, and taking the ratio as an adjustment period parameter of the target rendering file;
taking the ratio of the number of abnormal time stamps in the log file of the target rendering file to the total number of all time stamps as an abnormal response parameter of the target rendering file;
Obtaining the initial importance of the target rendering file according to the adjustment period parameter and the abnormal response parameter;
The obtaining the initial importance of the target rendering file according to the adjustment period parameter and the abnormal response parameter includes:
Carrying out inversely related normalization on the ratio of the adjustment period parameter to the abnormal response parameter to obtain the initial importance of the target rendering file;
the obtaining the phase importance of the target rendering file in each target rendering phase according to the difference of the storage space of the target rendering file between each target rendering phase and the previous image rendering phase, the number of the rendering data files with the same format as the target rendering file in the corresponding target rendering phase, and the number of all the rendering data file format types in the corresponding target rendering phase includes:
Taking the difference value between the storage space of the target rendering file in each target rendering stage and the storage space of the previous image rendering stage as the storage space variation of the target rendering file in each target rendering stage;
In each target rendering stage, taking the number of rendering data files in the same format as the target rendering files as a first number and taking the number of all the rendering data file format types in each target rendering stage as a second number;
Obtaining the phase importance of the target rendering file in each target rendering phase according to the storage space variation, the first quantity and the second quantity;
the obtaining the phase importance of the target rendering file in each target rendering phase according to the storage space variation, the first quantity and the second quantity comprises:
normalizing the storage space variation to obtain variation parameters of the target rendering file in each target rendering stage;
normalizing the sum of the first quantity and the second quantity to obtain the quantity parameter of the target rendering file in each target rendering stage;
And taking the product value of the variable quantity parameter and the quantity parameter as the stage importance of the target rendering file in each target rendering stage.
2. The method according to claim 1, wherein the obtaining the true importance of the target rendering file based on the phase importance of the target rendering file at all target rendering phases and the initial importance of the target rendering file comprises:
Taking the average value of the phase importance of the target rendering file in all the target rendering phases as the overall importance of the target rendering file;
And obtaining the real importance of the target rendering file according to the overall importance and the initial importance of the target rendering file.
3. The method according to claim 2, wherein the obtaining the true importance of the target rendering file according to the overall importance and the initial importance of the target rendering file comprises:
and normalizing the product value of the overall importance of the target rendering file and the initial importance to obtain the true importance of the target rendering file.
4. The method according to claim 1, wherein the compressing each rendering data file differently according to the real importance, and obtaining a compressed rendering file comprises:
And if the real importance is larger than a preset importance threshold, performing lossless compression on the rendering data file, otherwise, performing lossy compression on the rendering data file, and taking the compressed file as a compressed rendering file.
5. An adaptive storage method for image rendering data according to claim 1, wherein storing the compressed rendering file comprises:
Adding metadata to each compressed rendering file, wherein the metadata comprises a file compression mode and a file compression date;
and storing the compressed rendering file and the corresponding metadata in a folder together.
6. The method for adaptively storing image rendering data according to claim 1, wherein the preset time period is two hours.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410145238.7A CN117689759B (en) | 2024-02-02 | 2024-02-02 | Adaptive storage method for image rendering data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410145238.7A CN117689759B (en) | 2024-02-02 | 2024-02-02 | Adaptive storage method for image rendering data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117689759A CN117689759A (en) | 2024-03-12 |
CN117689759B true CN117689759B (en) | 2024-05-03 |
Family
ID=90133718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410145238.7A Active CN117689759B (en) | 2024-02-02 | 2024-02-02 | Adaptive storage method for image rendering data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117689759B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111459895A (en) * | 2020-03-31 | 2020-07-28 | 杭州云象网络技术有限公司 | Method and system for hierarchical compression and storage of block chain data |
CN112270756A (en) * | 2020-11-24 | 2021-01-26 | 山东汇颐信息技术有限公司 | Data rendering method applied to BIM model file |
CN113886193A (en) * | 2021-10-26 | 2022-01-04 | Oppo广东移动通信有限公司 | Log data processing method and device, electronic equipment and storage medium |
CN115272548A (en) * | 2022-07-29 | 2022-11-01 | 商汤国际私人有限公司 | Rendering parameter adjusting method and device, electronic equipment and storage medium |
CN115495427A (en) * | 2022-11-22 | 2022-12-20 | 青岛远洋船员职业学院 | Log data storage method based on intelligent security management platform |
CN116301635A (en) * | 2023-03-22 | 2023-06-23 | 无锡数科云软件有限公司 | Data storage platform |
CN117390322A (en) * | 2023-10-25 | 2024-01-12 | 中国电信股份有限公司 | Virtual space construction method and device, electronic equipment and nonvolatile storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7516145B2 (en) * | 2003-03-31 | 2009-04-07 | Microsoft Corporation | System and method for incrementally transforming and rendering hierarchical data files |
CN109493410B (en) * | 2018-09-25 | 2023-05-16 | 叠境数字科技(上海)有限公司 | Real-time rendering method of gigabit-level pixel image |
US12039661B2 (en) * | 2019-06-02 | 2024-07-16 | Apple Inc. | Parameterized generation of two-dimensional images from a three-dimensional model |
-
2024
- 2024-02-02 CN CN202410145238.7A patent/CN117689759B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111459895A (en) * | 2020-03-31 | 2020-07-28 | 杭州云象网络技术有限公司 | Method and system for hierarchical compression and storage of block chain data |
CN112270756A (en) * | 2020-11-24 | 2021-01-26 | 山东汇颐信息技术有限公司 | Data rendering method applied to BIM model file |
CN113886193A (en) * | 2021-10-26 | 2022-01-04 | Oppo广东移动通信有限公司 | Log data processing method and device, electronic equipment and storage medium |
CN115272548A (en) * | 2022-07-29 | 2022-11-01 | 商汤国际私人有限公司 | Rendering parameter adjusting method and device, electronic equipment and storage medium |
CN115495427A (en) * | 2022-11-22 | 2022-12-20 | 青岛远洋船员职业学院 | Log data storage method based on intelligent security management platform |
CN116301635A (en) * | 2023-03-22 | 2023-06-23 | 无锡数科云软件有限公司 | Data storage platform |
CN117390322A (en) * | 2023-10-25 | 2024-01-12 | 中国电信股份有限公司 | Virtual space construction method and device, electronic equipment and nonvolatile storage medium |
Non-Patent Citations (3)
Title |
---|
New image compression techniques using multiwavelets and multiwavelet packets;Michael B Martin;《IEEE Transactions on Image Processing》;20011231;摘要 * |
WebGIS系统中矢量数据的压缩与化简方法综述;杨建宇, 杨崇俊, 明冬萍, 任应超, 李津平;计算机工程与应用;20060801(32);全文 * |
基于光场的渲染技术研究;胡孔明;于瀛洁;张之江;;微计算机应用;20080215(02);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN117689759A (en) | 2024-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8842891B2 (en) | Ultra-low dimensional representation for face recognition under varying expressions | |
CN111212245B (en) | Method and device for synthesizing video | |
JP2013110734A (en) | Space image dimension reduction system and method | |
US11735199B2 (en) | Method for modifying a style of an audio object, and corresponding electronic device, computer readable program products and computer readable storage medium | |
US11417024B2 (en) | Systems and methods for hue based encoding of a digital image | |
CN116760908B (en) | Agricultural information optimization management method and system based on digital twin | |
CN104427341A (en) | Image processing method and apparatus, and terminal | |
CN111866518A (en) | Self-adaptive three-dimensional point cloud compression method based on feature extraction | |
CN117689759B (en) | Adaptive storage method for image rendering data | |
CN116975503B (en) | Soil erosion information management method and system | |
CN115857823A (en) | Distributed compression storage method based on data sharing | |
Ioannou et al. | Depth-aware neural style transfer using instance normalization | |
US20060143142A1 (en) | Logic arrangement, data structure, system and method for multilinear representation of multimodal data ensembles for synthesis, rotation and compression | |
CN111681309B (en) | Edge computing platform for generating voxel data and edge image feature ID matrix | |
Li et al. | Adaptive two-step procedure of providing desired visual quality of compressed image | |
CN118152389A (en) | Intelligent processing method for energy system data | |
JPWO2011155288A1 (en) | Data index dimension reduction method and data search method and apparatus using the same | |
CN114328394A (en) | Campus data acquisition method and device, storage medium and equipment | |
CN114004952A (en) | Data processing method of point cloud with high-density noise based on statistical manifold curvature | |
CN116977652B (en) | Workpiece surface morphology generation method and device based on multi-mode image generation | |
CN117668269B (en) | Vehicle audit information optimized storage method based on manifold learning | |
CN117635791B (en) | 3D model presentation method and system, storage medium and electronic equipment | |
US20240233102A1 (en) | A system and method for assessing the quality of a high-dynamic range (hdr) image | |
Sreedevi et al. | An examplar-based approach for texture compaction synthesis and retrieval | |
CN117541460A (en) | Blind super-resolution method and device for infrared image |
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 |