Method and device for displaying progress, electronic device and computer readable storage medium
By creating a sub-thread within the digital content creation software to monitor and provide feedback on the progress of repetitive tasks, the problem of the progress not being displayed intuitively on the interface was solved, enabling real-time display and precise control of task progress, thus improving the user experience.
Patent Information
- Application Number
- CN202411140199.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-08-19
AI Technical Summary
In digital content creation software, the progress of repetitive tasks cannot be displayed intuitively on the interface, resulting in a poor user experience. In particular, the interface may freeze during long-running tasks, affecting the user's judgment of task progress.
By creating a sub-thread in the main thread, the execution progress of repetitive tasks can be monitored in real time using a progress query function, and a progress indicator can be generated on the interface through the main thread to achieve intuitive display of task progress.
This avoids interface freezing, allowing users to monitor task progress in real time and accurately control task execution status, thus improving user experience.
Smart Images

Figure CN119045935B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a method and device for displaying progress, electronic equipment and computer readable storage medium. BACKGROUND
[0002] In the digital content creation (DCC) software, users often encounter a large amount of repetitive work when creating and editing assets. For example, the same material or texture needs to be applied to multiple models, or complex map merging needs to be performed. At present, the industry often uses automated scripts to perform repetitive tasks to reduce repetitive manual operations, thereby saving time and improving production efficiency. However, when these tools process a large amount of data or perform complex operations, the software interface may appear slow response or even "dead", which will affect the user experience and workflow.
[0003] In order to solve the interface lag problem and provide better user feedback, progress information is usually obtained for repetitive tasks. In related technologies, progress information is usually output to the console during the script execution of repetitive tasks, which is used to provide more detailed progress information for users. However, this method requires users to open the console window and keep attention to real-time grasp the execution progress of repetitive tasks, which is not intuitive and convenient. SUMMARY
[0004] The present application provides a method and device for displaying progress, electronic equipment and computer readable storage medium, which can intuitively display the script execution progress of repetitive tasks on the interface of digital content creation software, and facilitate users to accurately control the progress of repetitive task execution. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a method for displaying progress, the method comprising:
[0006] In response to executing a repetitive task through a main thread of a digital content creation software, creating a sub-thread, wherein the sub-thread includes a progress query function;
[0007] Calling the query function to query the current execution progress of the repetitive task in the main thread;
[0008] Sending a progress drawing instruction containing the current execution progress to the main thread through the sub-thread; and
[0009] Receiving the progress drawing instruction through the main thread, and generating a progress identifier representing the current execution progress in the interface of the digital content creation software.
[0010] Secondly, embodiments of this application provide a device for displaying progress, the device comprising:
[0011] A creation unit is configured to create a sub-thread in response to the execution of a repetitive task via the main thread of digital content creation software, wherein the sub-thread includes a progress query function;
[0012] The query unit is used to call the query function to query the current execution progress of the repetitive task in the main thread;
[0013] A generation unit is configured to send a progress drawing instruction containing the current execution progress to the main thread through the sub-thread; and to receive the progress drawing instruction through the main thread and generate a progress identifier in the interface of the digital content creation software to represent the current execution progress.
[0014] Thirdly, this application also provides an electronic device, including:
[0015] Processor; and
[0016] A memory for storing a data processing program, which, when the electronic device is powered on and runs through the processor, executes the method described in the first aspect.
[0017] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a data processing program that is executed by a processor to perform the method described in the first aspect.
[0018] Compared with the prior art, this application has the following advantages:
[0019] The method for displaying progress provided in this application includes: creating a sub-thread in response to the execution of a repetitive task by the main thread of digital content creation software, wherein the sub-thread includes a progress query function; calling the query function to query the current execution progress of the repetitive task in the main thread; sending a progress drawing instruction containing the current execution progress to the main thread through the sub-thread; and receiving the progress drawing instruction through the main thread to generate a progress identifier representing the current execution progress in the interface of the digital content creation software. It can be seen that the method for displaying progress provided in this application, when the main thread of the digital content creation software executes the repetitive task, creates a sub-thread containing a progress query function, monitors the execution progress of the repetitive task in the main thread by calling the progress query function, and then sends a progress drawing instruction containing the monitored current execution progress to the main thread, thereby achieving a visual display of the current execution progress on the interface of the digital content creation software. The progress display method provided in this application embodiment queries and reports the execution progress of repetitive tasks performed in the main thread by creating a sub-thread. This avoids the problem of the interface freezing and the progress no longer changing with the execution of repetitive tasks when the main thread counts the repetitive tasks, which could lead users to mistakenly believe that the execution of repetitive tasks has failed. Furthermore, the script execution progress of repetitive tasks is displayed intuitively on the interface of digital content creation software, making it easier for users to accurately control the execution progress of repetitive tasks. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the structure of digital content creation software for implementing a method for displaying progress, provided in an embodiment of this application;
[0021] Figure 2 A flowchart illustrating the data interaction between the main thread, sub-thread, and progress addition plugin in the progress display method provided in this application embodiment;
[0022] Figure 3 This is a flowchart of a method for displaying progress provided in an embodiment of this application;
[0023] Figure 4 This is a schematic diagram of the interface of a digital content creation software, which is an example of the method for displaying progress provided in the embodiments of this application.
[0024] Figure 5 This is a structural block diagram of an example of the progress display device provided in the embodiments of this application;
[0025] Figure 6 This is a structural block diagram of an example of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced without the specific details. In other instances, well-known methods have not been described in detail in order not to unnecessarily obscure aspects of the present application.
[0027] It should be noted that the terms "first", "second", "third", and the like in the description and in the claims, if any, are used for distinguishing between similar elements and not necessarily for describing a sequential or chronological order. It is to be understood that the use of these terms is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of efficient implementation irrespective of the terms used.
[0028] It is to be understood that the term "at least one" is used in the present application to define one or more, the term "multiple" is used to define two or more. The term "and / or" is used in the present application to describe a possible combination of associated objects, which means that there can be three relationships, for example, A and / or B, which means that A exists alone, A and B exist together, B exists alone. The character " / " generally represents an "or" relationship between the associated objects. "Including A, B and / or C" means including any one or any two or three of A, B and C.
[0029] It should be understood that in the embodiments of the present application, "B corresponding to A", "B corresponding to A", "A corresponding to B" or "B corresponding to A" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean that B is determined only according to A, but also can be determined according to A and / or other information.
[0030] It should be noted that the instructions or operations appearing in the subsequent detailed description of the game interaction method provided by the embodiments of the present application can be regarded as instructions or operations triggered by the player through fingers or control mouse, keyboard, gamepad or stylus or voice. The specific triggering operation can be determined according to the type of the electronic device. For example, when the electronic device is a touch screen device such as a mobile phone, tablet computer, game console, etc., the player can trigger instructions or operations on the touch screen by fingers, stylus or any suitable object or accessory, or can trigger instructions or operations by voice. When the terminal device is a non-touch screen terminal device such as a desktop computer, notebook computer, etc., the player can trigger instructions or operations by external devices such as a mouse, a keyboard, a gamepad, etc.
[0031] Before the embodiments of the present application are described in detail, the related concepts are first introduced, and the prior art is further described.
[0032] Introduction of relevant concepts
[0033] 1. Digital Content Creation (DCC): Digital content creation software can be used to create digital media content, and digital content creation software has a wide range of applications in the fields of film, television, games, animation, architecture and industrial design, etc. Digital content creation software can be used for 3D modeling, animation production, special effect synthesis, video editing, audio editing, image processing, etc. Commonly used digital content creation software may, for example, include but is not limited to Maya, Houdini, Nuke, 3Dmax, blender, etc.
[0034] 2. Thread: A thread is the smallest unit of operation scheduling that can be performed by an operating system, and it is contained in a process and is the actual operating unit in the process. A process has at least one thread, and if a process has multiple threads, these threads can share the resources of the process, such as memory space, file handles, etc. Threads are usually used to implement multitasking or concurrent execution of multiple tasks.
[0035] Further explanation of the prior art
[0036] In DCC software, users often need to perform repetitive tasks, in order to reduce repetitive manual operations and improve work efficiency, users often develop related tools to automatically perform repetitive tasks. However, in some time-consuming tool operations, such as batch map merging and material modification, the DCC interface will appear to be stuck or even dead, causing the user to suspect that the execution of the repetitive task has a problem.
[0037] In order to improve this situation, at present, progress information is usually output to the console in the script execution process of the repetitive task, so that the user can know the execution progress of the repetitive task. However, this way cannot intuitively show the execution progress of the repetitive task on the interface, but needs the user to open the console window for inquiry. If the progress shown in the console is displayed on the DCC interface, in the case that the repetitive task takes a long time, the DCC interface will be dead, so that the progress displayed on the DCC interface no longer changes with the execution of the repetitive task, causing the user to think that the execution of the repetitive task is wrong.
[0038] Therefore, there is an urgent need for a method of intuitively and conveniently showing the script execution progress of the repetitive task.
[0039] Based on the above reasons, in order to be able to intuitively show the script execution progress of the repetitive task on the interface of digital content creation, so that the user can accurately control the progress of the task execution, the first embodiment of the present application provides a method for displaying progress, which is applied to an electronic device, which can be a desktop computer, a notebook computer, a mobile phone, a tablet computer, an electronic watch, etc., or other electronic devices capable of displaying a progress bar. The embodiments of the present application are not specifically limited.
[0040] For example, in combination with the above description, Figure 1 A structure schematic diagram of a digital content creation software for implementing the method for displaying progress provided by the embodiments of the present application is shown, which can include a main thread 101, a sub-thread 102 and a progress adding plug-in 103. The main thread 101 can be used to process tasks in the digital content creation software and support core functions. In the embodiments of the present application, the main thread 101 is used to execute the repetitive task. The sub-thread 102 is an independent execution path running outside the main thread 101. In general, the main thread is the first thread created when the program is started, and the sub-thread is an additional thread created by the main thread. In the embodiments of the present application, the sub-thread 102 is used to query the execution progress of the repetitive task in the main thread and feed back the execution progress to the main thread 101. The plug-in is a software component that can extend or enhance the functions of the existing software. The plug-in is usually designed to be modular and pluggable, which means that they can be added, removed or replaced without affecting the core program. In the embodiments of the present application, the progress adding plug-in 103 is used to display the execution progress fed back by the sub-thread 102 in the graphical user interface during the execution of the repetitive task by the main thread, so that the user can intuitively and conveniently know the execution progress of the repetitive task.
[0041] The following will be described Figure 2 The data interaction process between the main thread, the sub-thread and the progress adding plug-in in the method for displaying progress provided by the embodiments of the present application will be introduced as followsFigure 2 As shown, the method comprises the following steps S10-S16:
[0042] Step S10: when the digital content creation software 10 is started, the progress adding plug-in 103 is started, a UI registration function is called to generate a progress panel in a closed state at a progress adding position, and a function control for executing a repetitive task is generated;
[0043] Step S11: in response to a triggering operation on the function control, the repetitive task is executed by the main thread 101;
[0044] Step S12: in response to the execution of the repetitive task by the main thread 101, a sub-thread 102 is created;
[0045] Step S13: a query function is called to query the current execution progress of the repetitive task and a target object currently processed;
[0046] Step S14: a progress drawing instruction containing the current execution progress and the target object is sent;
[0047] Step S15: when the current execution progress is not 0, the progress panel is changed from the closed state to the open state, and a UI drawing function is called to generate a progress identifier representing the current execution progress in the progress panel;
[0048] Step S16: when the digital content creation software is closed, the UI uninstall function is called to uninstall the progress panel and the function control.
[0049] The steps S10-S16 will be described in detail in the following description of the method for displaying progress provided by the embodiments of the present application.
[0050] The technical solutions of the present application will be described in detail below with specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0051] The following describes the method for displaying progress provided by the embodiments of the present application in combination with Figure 3 and Figure 4 The method for displaying progress provided by the embodiments of the present application.
[0052] As shown in Figure 3 , the method for displaying progress provided by the present application comprises the following steps S101-S104.
[0053] Step S101 (i.e. step S12 in Figure 2 ): in response to the execution of a repetitive task by a main thread of a digital content creation software, a sub-thread is created, wherein the sub-thread comprises a progress query function.
[0054] In the field of digital content creation, such as 3D modeling, game development, animation production, etc., there is usually a need to perform repetitive tasks, which can include but are not limited to one or more of merging maps, modifying materials, and exporting assets.
[0055] Among them, merging maps refers to the need to apply multiple different texture maps, such as diffuse maps, normal maps, and specular maps, to the same model during 3D model creation. If the user manually merges one by one, it will take a lot of time, so scripts (such as Python scripts) are usually used to automatically merge texture layers. Among them, diffuse maps are used to define the basic color and pattern of the model surface; normal maps are used to simulate the fine concave and convex details of the model surface, and by changing the light direction, a more complex surface structure effect is created; specular maps are used to control the reflectivity of the model surface, defining which areas of the model are smoother and which areas are rougher.
[0056] Modifying materials refers to adjusting a series of material properties of an object, such as changing color, roughness, etc. If the user manually modifies one by one, it will take a lot of time and result in low efficiency, so scripts (such as Python) are usually used to write scripts to implement batch changes of material parameters.
[0057] Exporting assets refers to the need to export a large number of 3D models, textures, and material files in a specific format for use in other software or games in digital content creation projects. Usually, users will set up an automated export script to automatically export resources.
[0058] In the embodiments of the present application, the user can perform repetitive tasks in a digital content creation software through an automated script, and the execution of the automated script can run in the main thread of the digital content creation software. When performing the repetitive task through the main thread, a sub-thread can be created, which can include a progress query function. The sub-thread is used to query and feedback the execution progress of the repetitive task.
[0059] It should be noted that during the execution of the repetitive task through the main thread, in the case of large data volume of the repetitive task and long execution time of the automated script, the main thread may be blocked. The embodiments of the present application query the progress of the main thread executing the repetitive task through the additional sub-thread, avoid the problem that the main thread cannot respond when querying the execution progress of the repetitive task through the main thread due to the blockage of the main thread, and make the query of the execution progress of the repetitive task more convenient and fast.
[0060] Step S102: calling the query function to query the current execution progress of the repetitive task in the main thread.
[0061] In the embodiment, the query function is included in the created sub-thread. During the execution of the repetitive task in the main thread, the sub-thread can access the main thread, query the current execution progress of the repetitive task by calling the query function, and the current execution progress refers to the execution progress of the repetitive task at the current query time.
[0062] In the specific implementation, the query function can be called to query the current execution progress of the repetitive task in real time, or the query function can be called to query the current execution progress of the repetitive task according to a preset period (such as 0.1 seconds, 0.2 seconds, etc.).
[0063] Step S103: sending the progress drawing instruction containing the current execution progress to the main thread by the sub-thread.
[0064] Step S104: receiving the progress drawing instruction by the main thread, and generating a progress identifier for representing the current execution progress in the interface of the digital content creation software.
[0065] When the current execution progress of the repetitive task is queried, the sub-thread can send a progress drawing instruction to the main thread, the progress drawing instruction contains the queried current execution progress of the repetitive task, and when the main thread receives the progress drawing instruction, a progress identifier for representing the current execution progress can be generated in the interface of the digital content creation software.
[0066] For example, if the current execution progress of the repetitive task is 20%, the sub-thread sends a progress drawing instruction containing the current execution progress of 20% to the main thread, so as to force the main thread to generate a progress identifier representing the current execution progress of 20% in the interface of the digital content creation software.
[0067] Optionally, the progress identifier includes at least one of a progress bar and a progress percentage, that is, the progress identifier can be only a progress bar in the form of an image, or only a progress percentage in the form of characters, or both a progress bar in the form of an image and a progress percentage in the form of characters.
[0068] In this way, when the progress identifier is presented in the interface of the digital content creation software, the user can intuitively and conveniently determine the current execution progress of the repetitive task.
[0069] The method for displaying progress provided in the embodiments of the present application comprises: creating a sub-thread in response to a main thread of digital content creation software executing a repetitive task, wherein the sub-thread comprises a progress query function; calling the query function to query a current execution progress of the repetitive task in the main thread; sending a progress drawing instruction containing the current execution progress to the main thread through the sub-thread; and receiving the progress drawing instruction through the main thread to generate a progress identifier for representing the current execution progress in an interface of the digital content creation software. It can be seen that the method for displaying progress provided in the embodiments of the present application creates a sub-thread containing a progress query function when the main thread of the digital content creation software executes the repetitive task, monitors the execution progress of the repetitive task in the main thread by calling the progress query function, and then sends a progress drawing instruction containing the monitored current execution progress to the main thread, thereby realizing intuitive display of the current execution progress on the interface of the digital content creation software. The method for displaying progress provided in the embodiments of the present application can query and feed back the execution progress of the repetitive task in the main thread by creating a sub-thread, thereby avoiding the problem that the interface appears to be dead, the progress no longer changes with the execution of the repetitive task, and the user mistakenly thinks that the execution of the repetitive task is wrong, and intuitively displaying the script execution progress of the repetitive task on the interface of the digital content creation software, thereby facilitating the user to accurately control the progress of the repetitive task.
[0070] The method for displaying progress The method for displaying progress The method for displaying progress In an optional embodiment, the digital content creation software is provided with a progress adding plug-in bound with the repetitive task, and the method for displaying progress provided in the embodiments of the present application can further comprise the following step S201 (i.e. step S10 in Figure 2 When the digital content creation software is started, the progress adding plug-in is started to generate a progress panel in a closed state and generate a function control for executing the repetitive task.
[0071] Step S101 can be implemented by the following steps (i.e. step S11 in Figure 2
[0072] In response to a triggering operation on the function control, the main thread of the digital content creation software executes the repetitive task and creates a sub-thread.
[0073] In the embodiments of the present application, when the progress adding plug-in is developed, the repetitive task can be written in the progress adding plug-in. For example, if the repetitive task is to merge 50 pictures, a progress adding plug-in that is bound to the repetitive task of merging 50 pictures can be developed. In this way, the developed progress adding plug-in is related to the repetitive task.
[0074] When the digital content creation software is started, the progress adding plug-in can be triggered to start. After the progress adding plug-in is started, a progress panel can be generated by the plug-in. The progress panel is in a closed state by default, and a function control is generated. The function control is used to automatically execute the repetitive task in response to a triggering operation of a user. The function control is displayed in the interface of the digital content creation software.
[0075] The user can perform a triggering operation on the function control. The triggering operation includes but is not limited to a touch operation, a gesture operation, a voice input operation, and a shortcut key operation of an external device. The touch operation can be a click operation, a sliding operation, a pressing operation, or a dragging operation, and the present application does not make a specific limitation on the triggering operation.
[0076] After the triggering operation is received, the repetitive task can be executed by the main thread, and a sub-thread is created to query the execution progress of the repetitive task. It should be noted that through the progress adding plug-in, the user can trigger the automatic execution of the repetitive task, and the current execution progress can be displayed during the execution of the repetitive task, so as to facilitate the user to track and control the execution progress of the repetitive task in real time.
[0077] In an optional embodiment, the progress adding plug-in can include a UI registration function, and step S201 can be implemented by the following steps:
[0078] When the digital content creation software is started, the progress adding plug-in is started, the UI registration function is called to generate a progress panel in a closed state at a progress adding position, and a function control for executing the repetitive task is generated. The progress adding position can be, for example, a title bar position of the digital content creation software, or a bottom of the interface, and the present application does not make a limitation thereon.
[0079] When the progress adding plug-in is started, the UI registration function is called to draw UI (User Interface) elements in the interface of the digital content creation software. The drawn UI elements can include but are not limited to a progress panel and a function control for executing the repetitive task. The progress panel is initially in a closed state, that is, when the progress adding plug-in is started, the progress panel is generated and is invisible to the user.
[0080] The progress adding plug-in can comprise a progress adding position, so that the progress panel can be generated at the progress adding position, and a function control is added in the digital content creation interface to trigger the repetitive task and support the execution progress presentation of the repetitive task.
[0081] In an optional embodiment, the creating of the sub-thread in step S101 can be implemented according to the following steps:
[0082] Creating a sub-thread based on the timer of the digital content creation software.
[0083] Step S102 can be implemented according to the following steps:
[0084] Starting the timer and calling the query function to query the current execution progress of the repetitive task in the first thread according to the triggering frequency of the timer.
[0085] The digital content creation software has a timer, and in the embodiments of the present application, the sub-thread can be created by using the timer of the digital content creation software. Specifically, the triggering frequency of the timer can be set, so that after starting the timer, the query function can be called to query the current execution progress of the repetitive task in the first thread according to the triggering frequency of the timer.
[0086] Suppose the triggering frequency of the timer is set to 100 times per second (triggered once every 0.01 seconds), then the query function queries the current execution progress of the repetitive task once every 0.01 seconds; suppose the triggering frequency of the timer is set to 50 times per second (triggered once every 0.02 seconds), then the query function queries the current execution progress of the repetitive task once every 0.01 seconds.
[0087] In the embodiments of the present application, the sub-thread is created by using the timer of the digital content creation software, so that the sub-thread has encapsulated many functions and can quickly and directly access the main thread to make the progress query more convenient and fast.
[0088] In an optional embodiment, while querying the current execution progress, the current processing object can also be queried. Step S102 can be implemented according to the following steps (i.e., step S13 in Figure 2
[0089] Calling the query function to query the current execution progress of the repetitive task in the main thread and the current processing target object.
[0090] Correspondingly, the step S103 can be implemented by the following steps: sending, by the sub-thread, the progress drawing instruction containing the current execution progress and the target object to the main thread (i.e. Figure 2 the step S14 in the method 1000).
[0091] The step S104 can be implemented by the following steps: receiving, by the main thread, the progress drawing instruction, generating a progress identifier for representing the current execution progress and an object identifier corresponding to the target object in the digital content creation software.
[0092] In the embodiment of the present application, the current execution progress and the target object currently processed can be accessed by the query function. The target object can be one of a material, a map, an asset, etc. It should be noted that the query of the current execution progress and the target object currently processed does not have an execution sequence.
[0093] After obtaining the current execution progress and the target object, the sub-thread can send the progress drawing instruction containing the current execution progress and the target object to the main thread. Thus, the progress identifier representing the current execution progress and the object identifier corresponding to the target object are drawn on the interface of the digital content creation software.
[0094] By drawing the progress identifier of the current execution progress and the object identifier corresponding to the target object on the interface of the digital content creation software, the user can know the current execution progress of the repetitive task and the target object currently processed by the automation script in real time. The progress display is more humanized.
[0095] In an optional specific implementation manner, the repetitive task is a processing task on a first object, the first object includes at least one of a map and a material, i.e., the repetitive task is at least one of merging a map and modifying a material. The present application can implement the above step S102 in the following manner:
[0096] obtaining a total number of the first objects in the repetitive task by the query function; and
[0097] obtaining a first number of the first objects currently processed and completed in the first thread;
[0098] determining a ratio of the first number to the total number as the current execution progress of the repetitive task.
[0099] Alternatively, the present application can also implement the above step S102 in the following manner:
[0100] obtaining a total number of the first objects in the repetitive task by the query function; and
[0101] obtaining a second number of the first objects in the first thread which are currently not processed;
[0102] determining a current execution progress of the repetitive task according to a difference between the total number and the second number, and a ratio of the total number.
[0103] In the embodiment, the sub-thread can include a progress maximum value variable, and after the sub-thread is created, the total number of the first objects which need to be processed in the repetitive task can be assigned to the progress maximum value variable. In this way, the query function can obtain the progress maximum value variable and query the first number of the first objects which have been processed in the repetitive task, so as to obtain the current execution progress of the repetitive task. For example, in the task of batch merging maps, the total number of maps which need to be merged is 100, and 60 maps have been merged, so the current execution progress can be calculated as 60%.
[0104] Alternatively, the query function can query the second number of the first objects which are currently not processed in the repetitive task, so as to obtain the current execution progress of the repetitive task. For example, in the task of batch merging maps, the total number of maps which need to be merged is 100, and the number of maps which have not been merged is 40, so the current execution progress can be calculated as 60%.
[0105] In an optional embodiment, the step of "invoking the query function to query the current execution progress of the repetitive task in the main thread according to the triggering frequency of the timer" can include the following steps:
[0106] If the i th execution progress obtained by the i th query of the sub-thread does not reach 100%, the query function is invoked to query the i+1 th execution progress of the repetitive task in the main thread according to the triggering frequency of the timer for the i+1 th time, and i is greater than 0.
[0107] The i th execution progress is the current execution progress corresponding to the i th query, and the i+1 th execution progress is the current execution progress corresponding to the i+1 th query.
[0108] In the specific implementation, in the case that the i th execution progress obtained by the i th query of the sub-thread does not reach 100%, it indicates that the repetitive task has not been executed completely, and the query function can be continuously invoked to query the i+1 th execution progress of the repetitive task in the main thread according to the triggering frequency of the timer for the i+1 th time, until the current execution progress obtained by the query of the sub-thread reaches 100%, which indicates that the repetitive task has been executed completely, and then the sub-thread can be ended, wherein i is an integer greater than 0.
[0109] In an alternative implementation, the method for displaying progress provided by the embodiments of the present application can further include the following steps:
[0110] If the i th execution progress obtained by the i th query of the sub-thread does not reach 100%, the timer is removed;
[0111] A progress identifier representing that the repetitive task has been completed is generated in the interface of the digital content creation software.
[0112] In the embodiments of the present application, if the i th execution progress obtained by the i th query of the sub-thread reaches 100%, it means that the repetitive task has been executed completely, and then the timer can be removed, and the query function for querying the execution progress of the repetitive task in the main thread is stopped. At this time, a progress identifier representing that the repetitive task has been completed can be generated in the interface of the digital content creation software, such as displaying “task completed” or “progress 100%” in the interface of the digital content creation software.
[0113] In this way, the timer can be removed in time when the repetitive task is executed completely, and the query of the execution progress of the repetitive task is stopped in time, thereby reducing the performance consumption caused by data calculation. Moreover, by generating a progress identifier representing that the repetitive task has been completed in the interface of the digital content creation software, the user can know in time that the automation script of the repetitive task has been executed completely.
[0114] In addition, if the i th execution progress obtained by the i th query of the sub-thread does not reach 100%, the timer is removed, and the playing of audio data representing that the repetitive task has been completed is triggered, thereby further reminding the user that the automation script of the repetitive task has been executed completely.
[0115] In an alternative implementation, the progress adding plug-in includes a UI drawing function, and the step of “generating a progress identifier representing the current execution progress in the interface of the digital content creation software” can be implemented according to the following steps (i.e., step S15 in the following steps): Figure 2
[0116] When the current execution progress is not 0, the progress panel is changed from a closed state to an open state;
[0117] The UI drawing function is called to generate a progress identifier representing the current execution progress and an object identifier of a target object in the progress panel.
[0118] In the embodiment of the present application, the progress adding plug-in can include a UI drawing function, which is used to draw a UI on the interface of the digital content creation software, and specifically includes a progress panel, a function control, and a progress identifier displayed in the progress panel.
[0119] When the main thread receives the progress drawing instruction sent by the sub-thread, which contains the current execution progress and the target object currently processed, it can be determined whether the current execution progress is 0. If the current execution progress is not 0, the progress panel can be changed from a closed state to an open state. In this way, the UI drawing function can be called to draw the current execution progress and the target object currently processed in the progress panel in the open state, so as to facilitate the user to intuitively and conveniently determine the current execution progress of the repetitive task and the target object currently processed.
[0120] In an optional embodiment, the progress adding plug-in can further include a UI uninstallation function, which is used to uninstall the registered UI. The method for displaying progress provided in the embodiment of the present application can further include the following step (i.e., step S16 in Figure 2
[0121] When the digital content creation software is closed, the UI uninstallation function is called to uninstall the progress panel and the function control.
[0122] In the embodiment of the present application, in response to a closing instruction of the digital content creation software, the digital content creation software is closed, and at the same time, UI elements added in the digital content creation software by the progress adding plug-in are uninstalled, and the UI elements at least include the progress panel and the function control.
[0123] By setting the UI registration function and the UI uninstallation function for the progress adding plug-in, when the progress adding plug-in is started, the UI registration function is called to generate UI elements in the interface of the digital content creation software, and when the progress adding plug-in is closed along with the digital content creation software, the UI uninstallation function is called to uninstall the UI elements generated in the interface of the digital content creation software, so that the execution progress of the repetitive task can be correctly displayed and hidden.
[0124] As Figure 4 As shown in the interface diagram of the digital content creation software, which is an example of the method for displaying progress provided in the embodiment of the present application, the interface (4-a) and the interface (4-c) are included. In the interface (4-a), in response to the successful startup of the digital content creation software, a progress adding plug-in is started, and a progress panel (not visible at present) in a closed state and a function control 21 bound with the repetitive task are generated on the interface of the digital content creation software. The user can trigger the function control 21 to execute the repetitive task through the main thread of the digital content creation software. When the repetitive task starts to be executed, a timer of the digital content creation software is used to create a sub-thread. During the execution of the repetitive task, the sub-thread queries the current execution progress of the repetitive task and a target object currently processed according to the triggering frequency of the timer (for example, 1 time per 0.01 second), and sends a progress drawing instruction containing the current execution progress and the target object to the main thread. After the main thread receives the progress drawing instruction, when the current execution progress is not 0, the progress panel in the closed state can be controlled to change to an open state, and a progress identifier for representing the current execution progress and an object identifier of the target object are drawn in the progress panel. As shown in the interface (4-b), if the current execution progress of the repetitive task is 25% and the target object currently processed is Cube.001, the progress panel 20 changes from the closed state to the open state, and a progress bar 202 for representing that the current execution progress is 25% and the object identifier 201 of the target object Cube.001 are displayed in the progress panel. When the current execution progress of the repetitive task is 100% in a certain query, the timer is removed, and as shown in the interface (4-c), a progress identifier 203 for representing that the repetitive task has been completed is displayed in the progress panel 20.
[0125] It can be seen that, when the repetitive task is executed through the main thread, the execution progress of the repetitive task in the main thread is monitored by the sub-thread, and feedback is given to the graphical user interface of the DCC software, so that the script execution progress of the repetitive task can be intuitively presented to the user in real time, the user does not need to open a console window and keep attention to grasp the execution progress of the repetitive task in real time, and the user can accurately control the execution progress of the repetitive task.
[0126] The above is the introduction of the method for displaying progress provided in the first embodiment of the present application.
[0127] Corresponding to the method for displaying progress provided in the first embodiment of the present application, the second embodiment of the present application further provides a device for displaying progress, as shown in Figure 5 The device 500 for displaying progress includes:
[0128] The creating unit 501 is configured to create a sub-thread in response to a main thread of the digital content creation software executing a repetitive task, wherein the sub-thread comprises a progress query function;
[0129] The querying unit 502 is configured to invoke the query function to query a current execution progress of the repetitive task in the main thread;
[0130] The generating unit 503 is configured to send, by the sub-thread, a progress drawing instruction comprising the current execution progress to the main thread, and receive, by the main thread, the progress drawing instruction to generate a progress identifier for representing the current execution progress in an interface of the digital content creation software.
[0131] Optionally, the creating unit 501 is specifically configured to:
[0132] create a sub-thread based on a timer of the digital content creation software;
[0133] The querying unit 502 is specifically configured to:
[0134] start the timer, and invoke the query function to query the current execution progress of the repetitive task in the first thread according to a triggering frequency of the timer.
[0135] Optionally, the digital content creation software is provided with a progress adding plug-in bound with the repetitive task, and the generating unit 503 is further configured to:
[0136] start the progress adding plug-in to generate a progress panel in a closed state and a function control for executing the repetitive task when the digital content creation software is started;
[0137] The creating unit 501 is specifically configured to:
[0138] execute the repetitive task by a main thread of the digital content creation software and create a sub-thread in response to a triggering operation on the function control.
[0139] Optionally, the repetitive task is a processing task on a first object, and the first object comprises at least one of a texture and a material; and the querying unit 502 is specifically configured to:
[0140] obtain a total number of the first object in the repetitive task;
[0141] obtain a first number of the first object that is currently processed and completed in the first thread;
[0142] determine a ratio of the first number to the total number as the current execution progress of the repetitive task.
[0143] Optionally, the progress adding plug-in comprises a UI drawing function, and the generating unit 503 is specifically configured to:
[0144] when the current execution progress is not 0, change the progress panel from a closed state to an open state;
[0145] invoke the UI drawing function to generate a progress identifier representing the current execution progress in the progress panel.
[0146] Optionally, the progress adding plug-in comprises a UI registration function, and the generating unit 503 is further configured to:
[0147] invoke the UI registration function to generate a progress panel in a closed state at a progress adding position, and generate a function control for executing the repetitive task.
[0148] Optionally, the progress adding plug-in comprises a UI uninstallation function, and the progress display device 500 further comprises an uninstalling unit, configured to:
[0149] when the digital content creation software is closed, invoke the UI uninstallation function to uninstall the progress panel and the function control.
[0150] Optionally, the querying unit 502 is specifically configured to:
[0151] if the i-th execution progress obtained by the sub-thread through the i-th query does not reach 100%, invoke the querying function to query the i+1-th execution progress of the repetitive task in the main thread according to the triggering frequency of the timer for the i+1-th time, i being greater than 0.
[0152] Optionally, the progress display device 500 further comprises a removing unit, configured to:
[0153] if the i-th execution progress obtained by the sub-thread through the i-th query does not reach 100%, remove the timer;
[0154] generate a progress identifier representing that the repetitive task has been completed in the interface of the digital content creation software.
[0155] Optionally, the querying unit 502 is specifically configured to:
[0156] invoke the querying function to query the current execution progress of the repetitive task in the main thread and the target object currently processed;
[0157] the generating unit 503 is specifically configured to:
[0158] sending, by the sub-thread, the progress drawing instruction containing the current execution progress and the progress drawing instruction of the target object to the main thread; and receiving, by the main thread, the progress drawing instruction, generating a progress identifier representing the current execution progress and an object identifier corresponding to the target object in the digital content creation software.
[0159] Optionally, the progress identifier comprises at least one of a progress bar and a progress percentage.
[0160] The device for displaying progress provided by the embodiment of the present application creates a sub-thread containing a progress query function when the main thread of the digital content creation software executes the repetitive task, monitors the execution progress of the repetitive task in the main thread by calling the progress query function, and then sends the progress drawing instruction containing the monitored current execution progress to the main thread, thereby realizing the intuitive display of the current execution progress on the interface of the digital content creation software. The device for displaying progress provided by the embodiment of the present application can query and feedback the execution progress of the repetitive task in the main thread by creating a sub-thread, thereby avoiding the problem that the interface appears to be dead, the progress no longer changes with the execution of the repetitive task, and the user mistakenly thinks that the execution of the repetitive task is wrong, and intuitively displaying the script execution progress of the repetitive task on the interface of the digital content creation software, thereby facilitating the user to accurately control the progress of the repetitive task.
[0161] Corresponding to the method for displaying progress provided by the first embodiment of the present application, the third embodiment of the present application further provides an electronic device for displaying progress. As shown in Figure 6 The electronic device 600 comprises a processor 601 and a memory 602 for storing the program of the method for displaying progress. After the device is powered on and the processor runs the program of the method for displaying progress, the following steps are performed:
[0162] In response to executing the repetitive task by the main thread of the digital content creation software, a sub-thread is created, wherein the sub-thread comprises a progress query function;
[0163] The query function is called to query the current execution progress of the repetitive task in the main thread;
[0164] The sub-thread sends the progress drawing instruction containing the current execution progress to the main thread; and
[0165] The main thread receives the progress drawing instruction, and generates a progress identifier representing the current execution progress in the interface of the digital content creation software.
[0166] Optionally, the electronic device 600 specifically performs the following steps:
[0167] Based on the timer of the digital content creation software, a sub-thread is created;
[0168] The timer is started, and the query function is called to query the current execution progress of the repetitive task in the first thread according to the triggering frequency of the timer.
[0169] Optionally, the digital content creation software is provided with a progress adding plug-in bound with the repetitive task, and the electronic device 600 can further perform the following steps:
[0170] When the digital content creation software is started, the progress adding plug-in is started, a progress panel in a closed state is generated, and a function control for executing the repetitive task is generated;
[0171] In response to a triggering operation on the function control, the repetitive task is executed through the main thread of the digital content creation software, and a sub-thread is created.
[0172] Optionally, the repetitive task is a processing task on a first object, and the first object includes at least one of a texture and a material; the electronic device 600 specifically performs the following steps:
[0173] The total number of the first objects in the repetitive task is obtained;
[0174] The first number of the first objects that are currently processed and completed in the first thread is obtained;
[0175] The ratio of the first number to the total number is determined as the current execution progress of the repetitive task.
[0176] Optionally, the progress adding plug-in includes a UI drawing function, and the electronic device 600 specifically performs the following steps:
[0177] When the current execution progress is not 0, the progress panel is changed from a closed state to an open state;
[0178] The UI drawing function is called to generate a progress identifier representing the current execution progress in the progress panel.
[0179] Optionally, the progress adding plug-in includes a UI registration function, and the electronic device 600 specifically performs the following steps:
[0180] The UI registration function is called to generate a progress panel in a closed state at a progress adding position, and a function control for executing the repetitive task is generated.
[0181] Optionally, the progress adding plug-in comprises a UI uninstall function, and the electronic device 600 further executes the following steps:
[0182] When the digital content creation software is closed, the UI uninstall function is called to uninstall the progress panel and the function control.
[0183] Optionally, the electronic device 600 specifically executes the following steps:
[0184] If the i-th execution progress obtained by the i-th query of the sub-thread does not reach 100%, the query function is called to query the i+1-th execution progress of the repetitive task in the main thread according to the triggering frequency of the timer, i is greater than 0.
[0185] Optionally, the electronic device 600 further executes the following steps:
[0186] If the i-th execution progress obtained by the i-th query of the sub-thread does not reach 100%, the timer is removed.
[0187] A progress identifier for representing that the repetitive task is completed is generated in the interface of the digital content creation software.
[0188] Optionally, the electronic device 600 specifically executes the following steps:
[0189] The query function is called to query the current execution progress of the repetitive task in the main thread and a target object currently processed;
[0190] The sub-thread sends progress drawing instructions containing the current execution progress and the target object to the main thread;
[0191] The main thread receives the progress drawing instructions, and generates a progress identifier for representing the current execution progress and an object identifier corresponding to the target object in the digital content creation software.
[0192] Optionally, the progress identifier comprises at least one of a progress bar and a progress percentage.
[0193] The electronic device for displaying progress provided in the embodiments of the present application creates a sub-thread containing a progress query function when the main thread of the digital content creation software executes the repetitive task, monitors the execution progress of the repetitive task in the main thread by calling the progress query function, and then sends a progress drawing instruction containing the monitored current execution progress to the main thread, so as to realize intuitive display of the current execution progress on the interface of the digital content creation software. The electronic device for displaying progress provided in the embodiments of the present application can avoid the problems of interface freezing, progress no longer following the change of the execution of the repetitive task, and the user mistakenly thinking that the execution of the repetitive task is wrong, by querying and feeding back the execution progress of the repetitive task in the main thread through the sub-thread, and intuitively displays the script execution progress of the repetitive task on the interface of the digital content creation software, so as to facilitate the user to accurately control the progress of the execution of the repetitive task.
[0194] Corresponding to the method for displaying progress provided in the first embodiment of the present application, the fourth embodiment of the present application provides a computer readable storage medium storing a program of the method for displaying progress, and the program is run by a processor to execute the following steps:
[0195] In response to executing the repetitive task through the main thread of the digital content creation software, a sub-thread is created, wherein the sub-thread includes a progress query function;
[0196] The query function is called to query the current execution progress of the repetitive task in the main thread;
[0197] The progress drawing instruction containing the current execution progress is sent to the main thread through the sub-thread; and
[0198] The progress drawing instruction is received through the main thread, and a progress identifier for representing the current execution progress is generated in the interface of the digital content creation software.
[0199] Optionally, the processor specifically executes the following steps:
[0200] A sub-thread is created based on a timer of the digital content creation software;
[0201] The timer is started, and the query function is called to query the current execution progress of the repetitive task in the first thread according to the triggering frequency of the timer.
[0202] Optionally, the digital content creation software is provided with a progress adding plug-in bound with the repetitive task, and the processor can further execute the following steps:
[0203] The progress adding plug-in is started when the digital content creation software is started, a progress panel in a closed state is generated, and a function control for executing the repetitive task is generated;
[0204] In response to a triggering operation on the function control, the repetitive task is executed by a main thread of the digital content creation software, and a sub-thread is created.
[0205] Optionally, the repetitive task is a processing task on a first object, the first object including at least one of a texture and a material; the processor specifically executes the following steps:
[0206] The total number of the first objects in the repetitive task is obtained;
[0207] The first number of the first objects that are currently processed and completed in the first thread is obtained;
[0208] The ratio of the first number to the total number is determined as the current execution progress of the repetitive task.
[0209] Optionally, the progress adding plug-in includes a UI drawing function, and the processor specifically executes the following steps:
[0210] When the current execution progress is not 0, the progress panel is changed from the closed state to the open state;
[0211] The UI drawing function is called to generate a progress identifier representing the current execution progress in the progress panel.
[0212] Optionally, the progress adding plug-in includes a UI registration function, and the processor specifically executes the following steps:
[0213] The UI registration function is called to generate the progress panel in the closed state and the function control for executing the repetitive task at a progress adding position.
[0214] Optionally, the progress adding plug-in includes a UI uninstallation function, and the processor can further execute the following steps:
[0215] When the digital content creation software is closed, the UI uninstallation function is called to uninstall the progress panel and the function control.
[0216] Optionally, the processor specifically executes the following steps:
[0217] If the i-th execution progress obtained by the i-th query of the sub-thread does not reach 100%, the query function is called to query the (i+1)-th execution progress of the repetitive task in the main thread according to the triggering frequency of the timer for the (i+1)-th time, i being greater than 0.
[0218] Optionally, the processor further executes the following steps:
[0219] If the i th query of the sub-thread obtains that the i th execution progress does not reach 100%, the timer is removed;
[0220] A progress identifier representing that the repetitive task is completed is generated in the interface of the digital content creation software.
[0221] Optionally, the processor specifically executes the following steps:
[0222] The query function is called to query the current execution progress of the repetitive task in the main thread and the target object currently processed;
[0223] The progress drawing instruction containing the current execution progress and the target object is sent to the main thread by the sub-thread;
[0224] The progress drawing instruction is received by the main thread, and a progress identifier representing the current execution progress and an object identifier corresponding to the target object are generated in the digital content creation software.
[0225] Optionally, the progress identifier includes at least one of a progress bar and a progress percentage.
[0226] The computer readable storage medium provided by the embodiment of the present application creates a sub-thread containing a progress query function when the main thread of the digital content creation software executes the repetitive task, monitors the execution progress of the repetitive task in the main thread by calling the progress query function, and then sends a progress drawing instruction containing the monitored current execution progress to the main thread, so as to realize intuitive display of the current execution progress on the interface of the digital content creation software. The computer readable storage medium provided by the embodiment of the present application can avoid the problem that the interface is dead, the progress no longer changes with the execution of the repetitive task, and the user mistakenly thinks that the execution of the repetitive task is wrong by querying and feeding back the execution progress of the repetitive task in the main thread through the sub-thread. In addition, the script execution progress of the repetitive task is intuitively displayed on the interface of the digital content creation software, which facilitates the user to accurately control the progress of the repetitive task.
[0227] It should be noted that the detailed description of the apparatus, electronic device and computer readable storage medium provided by the second embodiment, the third embodiment and the fourth embodiment of the present application can refer to the related description of the first embodiment of the present application, which will not be repeated here.
[0228] Although the present application is disclosed with reference to the preferred embodiments above, it is not intended to limit the present application, and any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application, and the scope of protection of the present application should be defined by the scope of claims.
[0229] In one typical configuration, a node device in the blockchain includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0230] The memory can include non-persistent memory in computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.
[0231] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other properties of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage media or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition herein, computer-readable media does not include non-transitory computer-readable media (transitory media), such as modulated data signals and carriers.
[0232] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as a method, system or computer program product. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0233] Although the present application is disclosed with reference to the preferred embodiments above, it is not intended to limit the present application, and any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application, and the scope of protection of the present application should be defined by the scope of claims.
Claims
1. A method of displaying progress, characterized by, The method comprises: in response to the main thread of the digital content creation software executing a repetitive task, creating a sub-thread based on a timer of the digital content creation software, wherein the sub-thread comprises a progress query function; calling the query function to query the current execution progress of the repetitive task in the main thread, comprising: calling the query function to query the current execution progress of the repetitive task in the main thread according to the triggering frequency of the timer; sending progress drawing instructions containing the current execution progress from the sub-thread to the main thread; and receiving the progress drawing instructions through the main thread to generate a progress identifier in the interface of the digital content creation software to represent the current execution progress.
2. The method of claim 1, wherein, The calling of the query function to query the current execution progress of the repetitive task in the main thread comprises: starting the timer and calling the query function to query the current execution progress of the repetitive task in the main thread according to the triggering frequency of the timer.
3. The method of claim 1, wherein, The digital content creation software is provided with a progress adding plug-in bound with the repetitive task, and the method further comprises: when the digital content creation software is started, starting the progress adding plug-in, generating a progress panel in a closed state, and generating a function control for executing the repetitive task; The response to the main thread of the digital content creation software executing a repetitive task based on the timer of the digital content creation software comprises: in response to a triggering operation on the function control, executing a repetitive task through the main thread of the digital content creation software and creating a sub-thread.
4. The method of claim 1, wherein, The repetitive task is a processing task for a first object, and the first object comprises at least one of a texture and a material; the querying of the current execution progress of the repetitive task in the main thread comprises: obtaining the total number of the first objects in the repetitive task; obtaining the first number of the first objects currently processed in the main thread; determining the ratio of the first number to the total number as the current execution progress of the repetitive task.
5. The method of claim 3, wherein, The progress adding plug-in comprises a UI drawing function, and the generation of a progress identifier in the interface of the digital content creation software to represent the current execution progress comprises: when the current execution progress is not 0, changing the progress panel from a closed state to an open state; calling the UI drawing function to generate a progress identifier representing the current execution progress in the progress panel.
6. The method of claim 3, wherein, The progress adding plug-in comprises a UI registration function, and the generation of a progress panel in a closed state and a function control for executing the repetitive task comprises: calling the UI registration function to generate a progress panel in a closed state and a function control for executing the repetitive task at a progress adding location.
7. The method of claim 3, wherein, The progress adding plug-in comprises a UI uninstallation function, and the method further comprises: when the digital content creation software is closed, calling the UI uninstallation function to uninstall the progress panel and the function control.
8. The method of claim 2, wherein, The calling the query function queries the current execution progress of the repetitive task in the main thread according to the triggering frequency of the timer, including: If the i th query of the sub-thread obtains that the i th execution progress does not reach 100%, the calling the query function queries the i+1 th execution progress of the repetitive task in the main thread according to the triggering frequency of the timer, i is greater than 0.
9. The method of claim 8, wherein, The method further includes: If the i th query of the sub-thread obtains that the i th execution progress does not reach 100%, the timer is removed; A progress identifier for representing that the repetitive task is completed is generated in the interface of the digital content creation software.
10. The method of claim 1, wherein, The calling the query function queries the current execution progress of the repetitive task in the main thread, including: The calling the query function queries the current execution progress of the repetitive task in the main thread and the target object currently processed; The sending, by the sub-thread, of the progress drawing instruction containing the current execution progress to the main thread, including: The sending, by the sub-thread, of the progress drawing instruction containing the current execution progress and the target object to the main thread; The receiving, by the main thread, of the progress drawing instruction and the generating, in the interface of the digital content creation software, of a progress identifier for representing the current execution progress, including: The receiving, by the main thread, of the progress drawing instruction and the generating, in the digital content creation software, of a progress identifier for representing the current execution progress and an object identifier corresponding to the target object.
11. The method of claim 1, wherein, The progress identifier includes at least one of a progress bar and a progress percentage.
12. A device for displaying progress, characterized in that, The display progress device includes: A creating unit configured to create a sub-thread based on a timer of a digital content creation software in response to execution of a repetitive task by a main thread of the digital content creation software, wherein the sub-thread includes a progress query function; A querying unit configured to call the query function to query the current execution progress of the repetitive task in the main thread, including calling the query function to query the current execution progress of the repetitive task in the main thread according to the triggering frequency of the timer; A generating unit configured to send, by the sub-thread, a progress drawing instruction containing the current execution progress to the main thread, and receive, by the main thread, the progress drawing instruction to generate a progress identifier for representing the current execution progress in the interface of the digital content creation software.
13. An electronic device, comprising: including: a processor; and a memory configured to store a data processing program, and the electronic device, after being powered on and running the program by the processor, executes the method according to any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, A data processing program is stored, and the program is run by a processor to execute the method according to any one of claims 1-11.
Citation Information
Patent Citations
Display equipment and file copying progress display method
CN112631796A