Rendering card frame-based data chart statistical method and device and storage medium

By defining data collection and statistical scripts in the Java software framework, we perform stuck frame data analysis and visual display, which solves the problem that traditional methods cannot provide stuck frame proportion data, and achieves an intuitive display of the reasons for stuck frames and optimization of rendering effects. , which improves the user experience.

CN118537202APending Publication Date: 2024-08-23SHENZHEN RENDERBUS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410461455.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-17
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In the existing technology, the traditional stuck frame statistics method can only provide basic information such as rendering frame rate, but cannot provide intuitive and comprehensive stuck frame proportion data, and cannot effectively help developers locate the root cause of the stuck frame problem.

Method used

By defining data collection scripts and data processing statistics scripts in a software framework written in Java, we can obtain stuck frame data during the rendering process, conduct statistical analysis, and generate visual charts to display stuck frame proportion data, and use timers and databases for data collection. and analysis, providing intuitive display of the distribution and trends of frame stuck causes.

Benefits of technology

It achieves comprehensive statistics and analysis of frame stuck data during the rendering process, helping developers more accurately locate the root cause of frame stuck problems, optimize rendering effects, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537202A
    Figure CN118537202A
Patent Text Reader

Abstract

The invention relates to a data chart statistical method and device based on rendering card frames and a storage medium, and is applied to the technical field of image rendering, and the method comprises the steps: collecting card frame data in a rendering process through a data collection script, and analyzing the card frame data through a data statistical analysis script to obtain card frame proportion data of a corresponding time period, a rich data basis is provided for subsequent statistics and analysis; the card frame proportion data of the corresponding time period is displayed in a chart form through the data calling interface, so that a user can intuitively know the card frame condition and the proportion relationship; compared with an existing method which only provides basic frame rate information, the method has the advantages that distribution and trend of frame jamming reasons can be visually displayed, and developers are helped to more accurately position the root of the frame jamming problem.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image rendering technology, and in particular to a data chart statistics method, device and storage medium based on rendering card frames. Background Art

[0002] Rendering is an important step in computer graphics and image processing. During the rendering process, the computer needs to process a large amount of image data and multiple rendering algorithms; however, frame jamming may occur during the rendering process, that is, the image display is not smooth, which brings a bad experience to users.

[0003] The common existing method of counting stuck frames is to monitor the frame rate in the rendering process in real time based on performance monitoring tools. This method determines whether a stuck frame occurs by recording the rendering time of each frame. Although it can provide timely feedback on the frame rate information, it does not classify and count the specific causes of stuck frames, nor can it intuitively display the relationship between the proportion of stuck frames caused by different reasons.

[0004] Another common method of obtaining stuck frame statistics is based on log analysis, which records and analyzes log data during the rendering process to obtain stuck frame information. This method can focus on and record various information during the rendering process, but the processing and analysis of large-scale log data requires certain expertise and tools. It is not convenient in practice and cannot intuitively and comprehensively display the stuck frame situation. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a data chart statistics method, device and storage medium based on rendering stuck frames, so as to solve the problem in the prior art that traditional stuck frame statistics methods can only provide basic information such as rendering frame rate, but cannot provide intuitive and comprehensive stuck frame ratio data.

[0006] According to a first aspect of an embodiment of the present invention, a data chart statistics method based on a rendering card frame is provided, the method comprising:

[0007] A data acquisition script and a data processing and statistics script are defined in a software framework written in Java. The data acquisition script obtains the card frame data in the rendering process by calling the relevant rendering library or API;

[0008] The stuck frame data in the rendering process is saved in a first database, the data processing statistical script calls the stuck frame data of a preset time period from the first database, and performs statistical analysis on the stuck frame data of the preset time period to obtain the stuck frame ratio data of the preset time period;

[0009] The stuck frame ratio data of the preset time period is saved in a second database, and a relevant API is called in the second database through a preset data calling interface to generate a visual chart of the stuck frame ratio data of the preset time period;

[0010] The visual chart of the card frame data in the preset time period is embedded into a Web page or an application interface for display.

[0011] Preferably, it also includes:

[0012] Setting a timer in the Java-based software framework, and setting a first time parameter and a second time parameter in the timer;

[0013] The first time parameter is used to determine the time period of the card frame data acquired by the data acquisition script;

[0014] The second time parameter is used to determine the time point when the data processing statistics script calls the card frame data from the first database for statistical analysis.

[0015] Preferably, it also includes:

[0016] After acquiring the card frame data of the corresponding time period according to the first time parameter of the timer, determining whether the card frame data of the corresponding time period exists in the first database;

[0017] If it exists, the card frame data of the corresponding time period in the first database is overwritten with the card frame data of the corresponding time period currently acquired;

[0018] If it does not exist, the currently acquired card frame data of the corresponding time period is saved in the first database.

[0019] Preferably, it also includes:

[0020] A time period for the summary data is set, all the stuck frame ratio data within the summary data time period are summarized, and a visualization chart of the stuck frame ratio data of the summary data is generated by calling a related API through the preset data calling interface.

[0021] Preferably,

[0022] The acquisition of the card frame data in the rendering process includes:

[0023] Get the number of stuck frames, the corresponding reason for each stuck frame, the number of rendered frames, the number of stuck machines, and the number of rendering machines.

[0024] Preferably,

[0025] The card frame ratio data includes:

[0026] Determine the proportion of different stuck frame reasons according to the stuck frame reason corresponding to each stuck frame;

[0027] Determine the stuck frame ratio according to the stuck frame number and the rendered frame number;

[0028] The proportion of stuck frame machines is determined according to the number of stuck frame machines and the number of rendering machines.

[0029] According to a second aspect of an embodiment of the present invention, a data chart statistics device based on a rendering card frame is provided, the device comprising:

[0030] Data acquisition module: used to define data acquisition scripts and data processing statistics scripts in a software framework written in Java. The data acquisition script acquires the card frame data in the rendering process by calling the relevant rendering library or API;

[0031] A stuck frame analysis module is used to save the stuck frame data in the rendering process into a first database, and the data processing statistics script calls the stuck frame data of a preset time period from the first database, and performs statistical analysis on the stuck frame data of the preset time period to obtain the stuck frame ratio data of the preset time period;

[0032] A chart generation module: used to save the stuck frame ratio data of the preset time period into a second database, and generate a visual chart of the stuck frame ratio data of the preset time period by calling a related API through a preset data calling interface in the second database;

[0033] Display module: used to embed the visual chart of the card frame data in the preset time period into a Web page or application interface for display.

[0034] According to a third aspect of an embodiment of the present invention, there is provided a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, each step in the above method is implemented.

[0035] The technical solution provided by the embodiments of the present invention may have the following beneficial effects:

[0036] This application collects the stuck frame data during the rendering process through a data collection script, and analyzes the stuck frame data through a data statistical analysis script to obtain the stuck frame ratio data for the corresponding time period, providing a rich data basis for subsequent statistics and analysis; the stuck frame ratio data for the corresponding time period is displayed in a graphical form through a data call interface, so that users can intuitively understand the stuck frame situation and ratio relationship; compared with the existing method that only provides basic frame rate information, this application can intuitively display the distribution and trend of the reasons for the stuck frames, helping developers to more accurately locate the root cause of the stuck frame problem.

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

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0039] Figure 1 It is a flowchart of a data chart statistics method based on rendering card frames according to an exemplary embodiment;

[0040] Figure 2 is a system schematic diagram of a data chart statistics device based on rendering card frames according to another exemplary embodiment;

[0041] In the attached figure: 1-data acquisition module, 2-card frame analysis module, 3-chart generation module, 4-display module. DETAILED DESCRIPTION

[0042] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0043] Embodiment 1

[0044] Figure 1 is a flow chart showing a data chart statistics method based on a rendering card frame according to an exemplary embodiment. Figure 1 As shown, the method includes:

[0045] S1, defining a data acquisition script and a data processing and statistics script in a software framework written in Java, wherein the data acquisition script acquires the card frame data in the rendering process by calling a related rendering library or API;

[0046] S2, saving the stuck frame data in the rendering process into a first database, the data processing statistical script calling the stuck frame data of a preset time period from the first database, and performing statistical analysis on the stuck frame data of the preset time period to obtain stuck frame percentage data of the preset time period;

[0047] S3, saving the stuck frame ratio data of the preset time period into a second database, and in the second database, calling a related API through a preset data calling interface to generate a visual chart of the stuck frame ratio data of the preset time period;

[0048] S4, embedding a visualization chart of the card frame data in the preset time period into a Web page or application interface for display;

[0049] It can be understood that on a computer with a Java runtime environment installed, ensure that the hardware equipment meets the rendering requirements; use Java to write a software framework, and use Spring or other Java frameworks to organize the code structure; use a timer function in the code, such as Java's ScheduledExecutorService or Quartz and other timed task tools. The present invention uses the timer of xxl-job, create a timer in the framework, and set a fixed time interval, where the time interval includes a first time parameter and a second time parameter; define a data collection method, which is called when a timed task is triggered, and obtains the card frame data of the corresponding time period (first time parameter) in the rendering process by calling a related rendering library or API, including different card frame reasons, card frame number, rendering frame number, card frame machine number, etc.;

[0050] The collected card frame data is saved in a first database, which may be a relational database or a non-relational database, such as MySQL, MongoDB, etc.;

[0051] Define a data processing and statistics method, which is called when the daily scheduled task (second time parameter) is triggered. This method obtains the stuck frame data within a certain period of time from the first database, processes and counts the stuck frame data, and calculates the proportion of different stuck frame reasons, the proportion of stuck frames to the number of rendering frames, the proportion of stuck frame machines to the total rendering machines, etc.; Java collections and algorithms can be used to implement data processing and analysis; in simple terms, the first time parameter determines the time period for calling the stuck frame data, such as the stuck frame data of the previous day (this time period), and the second time parameter determines the time point for obtaining the stuck frame data from the first database for processing and analysis, such as retrieving the stuck frame data from the first database at 12:00 every day for statistical analysis;

[0052] The processed and analyzed stuck frame ratio data is saved in the second database, and Java data visualization libraries such as JFreeChart and JavaFX are integrated to generate line graphs and other charts by calling relevant APIs; since the first time parameter can be set independently, that is, two hours can be used as a segment of data, then there will be multiple segments of data in a day, so the time period for summarizing the data is set, such as a whole day, and the stuck frame ratio data of the whole day is summarized and reflected in the same chart;

[0053] Embed data visualization charts into web pages or application interfaces. Users can visit relevant pages or interfaces to intuitively view the stuck frame data and charts and understand the stuck frame situation during the rendering process.

[0054] It is worth emphasizing that since the first time parameter can be set freely, that is, if user 1 determines that the first time parameter is the previous month and saves the card frame data of the previous month in the first database, and user 2 determines that the first time parameter is the previous day, at this time, the card frame data obtained by user 1 already has the card frame data of the previous day. After user 2 obtains the card frame data of the previous day, the card frame data of user 1 corresponding to this day in the previous month will be overwritten in the first database by the card frame data of user 2; and if the first time parameter set by user 1 is the morning of the previous day, and the first time parameter of user 2 is the afternoon of the previous day, the card frame data do not conflict, and the card frame data of user 2 will be directly saved in the first database;

[0055] Compared with the existing stuck frame statistics method, the technical solution of the present application can realize comprehensive statistics and analysis of stuck frame data in the rendering process.

[0056] The timer is used to collect the stuck frame data during the rendering process, and record the different stuck frame reasons, number of stuck frames, number of rendered frames, number of stuck frame machines, etc., providing a rich data basis for subsequent statistics and analysis.

[0057] Intuitive display of the proportion of stuck frame reasons:

[0058] The technical solution of the present application calculates the proportion of different reasons for stuck frames, the proportion of stuck frames to the number of rendered frames, the proportion of stuck frames to the total number of rendered frames, etc. through data processing and analysis.

[0059] The data visualization module displays these data in the form of charts, including line graphs, so that users can intuitively understand the frame jamming situation and proportion relationship.

[0060] Compared with the existing methods that only provide basic frame rate information, the technical solution of the present application can intuitively display the distribution and trend of the reasons for stuck frames, helping developers to more accurately locate the root cause of the stuck frame problem; optimize rendering effects and improve user experience: through comprehensive statistics and analysis of stuck frame data, developers can have a deeper understanding of the stuck frame problems in the rendering process, such as insufficient hardware device performance and high complexity of rendering algorithms; based on actual statistics and analysis results, developers can take corresponding optimization measures for different stuck frame reasons, such as adjusting algorithms, optimizing hardware configurations, etc., to improve rendering effects and user experience; after optimization and improvement, when the stuck frame problem is reduced and the rendering frame rate is improved, users can use related applications or games more smoothly;

[0061] In order to facilitate the understanding of the present application, this embodiment also provides the code required for implementing the present application, as shown below:

[0062]

[0063]

[0064]

[0065] Embodiment 2:

[0066] Figure 2 is a system schematic diagram of a data chart statistics device based on a rendering card frame according to another exemplary embodiment, the device comprising:

[0067] Data acquisition module 1: used to define data acquisition scripts and data processing statistics scripts in a software framework written in Java. The data acquisition script acquires the card frame data in the rendering process by calling the relevant rendering library or API;

[0068] Stuck frame analysis module 2: used to save the stuck frame data in the rendering process into the first database, the data processing statistics script calls the stuck frame data of a preset time period from the first database, and performs statistical analysis on the stuck frame data of the preset time period to obtain the stuck frame percentage data of the preset time period;

[0069] Chart generation module 3: used to save the stuck frame ratio data of the preset time period into a second database, and generate a visual chart of the stuck frame ratio data of the preset time period by calling a related API through a preset data calling interface in the second database;

[0070] Display module 4: used to embed a visual chart of the card frame data in the preset time period into a Web page or application interface for display;

[0071] It can be understood that the data acquisition module 1 is used to define a data acquisition script and a data processing statistics script in a software framework written in Java, and the data acquisition script acquires the card frame data in the rendering process by calling the relevant rendering library or API; the card frame analysis module 2 is used to save the card frame data in the rendering process into a first database, and the data processing statistics script calls the card frame data of a preset time period from the first database, and performs statistical analysis on the card frame data of the preset time period to obtain the card frame proportion data of the preset time period; the chart generation module 3 is used to save the card frame proportion data of the preset time period into a second database, and in the second database, a relevant API is called through a preset data call interface to generate a visual chart of the card frame proportion data of the preset time period; the display module 4 is used to embed the visual chart of the card frame data of the preset time period into a Web page or application interface for display.

[0072] Embodiment three:

[0073] This embodiment provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, each step in the above method is implemented;

[0074] It is understandable that the storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0075] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0076] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0077] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0078] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0079] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0080] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0081] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0082] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0083] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A data chart statistics method based on rendering card frames, characterized in that: The method comprises: A data acquisition script and a data processing and statistics script are defined in a software framework written in Java. The data acquisition script obtains the card frame data in the rendering process by calling the relevant rendering library or API; The stuck frame data in the rendering process is saved in a first database, the data processing statistical script calls the stuck frame data of a preset time period from the first database, and performs statistical analysis on the stuck frame data of the preset time period to obtain the stuck frame ratio data of the preset time period; The stuck frame ratio data of the preset time period is saved in a second database, and a relevant API is called in the second database through a preset data calling interface to generate a visual chart of the stuck frame ratio data of the preset time period; The visual chart of the card frame data in the preset time period is embedded into a Web page or an application interface for display.

2. The method according to claim 1, characterized in that: Also includes: Setting a timer in the Java-based software framework, and setting a first time parameter and a second time parameter in the timer; The first time parameter is used to determine the time period of the card frame data acquired by the data acquisition script; The second time parameter is used to determine the time point when the data processing statistics script calls the card frame data from the first database for statistical analysis.

3. The method according to claim 2, characterized in that Also includes: After acquiring the card frame data of the corresponding time period according to the first time parameter of the timer, determining whether the card frame data of the corresponding time period exists in the first database; If it exists, the card frame data of the corresponding time period in the first database is overwritten with the card frame data of the corresponding time period currently acquired; If it does not exist, the currently acquired card frame data of the corresponding time period is saved in the first database.

4. The method according to claim 3, characterized in that Also includes: A time period for the summary data is set, all the stuck frame ratio data within the summary data time period are summarized, and a visualization chart of the stuck frame ratio data of the summary data is generated by calling a related API through the preset data calling interface.

5. The method according to claim 4, characterized in that The acquisition of the card frame data in the rendering process includes: Get the number of stuck frames, the corresponding reason for each stuck frame, the number of rendered frames, the number of stuck machines, and the number of rendering machines.

6. The method according to claim 5, characterized in that The card frame ratio data includes: Determine the proportion of different stuck frame reasons according to the stuck frame reason corresponding to each stuck frame; Determine the stuck frame ratio according to the stuck frame number and the rendered frame number; The proportion of stuck frame machines is determined according to the number of stuck frame machines and the number of rendering machines.

7. A data chart statistics device based on rendering card frames, characterized in that: The device comprises: Data acquisition module: used to define data acquisition scripts and data processing statistics scripts in a software framework written in Java. The data acquisition script acquires the card frame data in the rendering process by calling the relevant rendering library or API; A stuck frame analysis module is used to save the stuck frame data in the rendering process into a first database, and the data processing statistics script calls the stuck frame data of a preset time period from the first database, and performs statistical analysis on the stuck frame data of the preset time period to obtain the stuck frame ratio data of the preset time period; A chart generation module: used to save the stuck frame ratio data of the preset time period into a second database, and generate a visual chart of the stuck frame ratio data of the preset time period by calling a related API through a preset data calling interface in the second database; Display module: used to embed the visual chart of the card frame data in the preset time period into a Web page or application interface for display.

8. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the main controller, each step of the data chart statistics method based on rendering card frames as described in any one of claims 1-6 is implemented.