Progress display method and device, electronic equipment and computer readable storage medium
By creating child threads in digital content creation software in real-time query and feedback task progress, the problem of slow interface response and no progress is solved, and intuitive display of task progress and user experience is achieved.
Patent Information
- Application Number
- CN202411140199.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-19
AI Technical Summary
In digital content creation software, the interface may be slow to respond or ‘fake death’ when executing repetitive tasks, causing users to be unable to intuitively grasp the task progress and affect the user experience.
By creating child threads in the main thread, including progress query functions, query and feedback the execution progress of repetitive tasks in real time, generate progress identifiers to display the current progress on the interface, avoiding the problem of main thread being blocked and progress not following task changes.
It realizes the implementation progress of repetitive tasks intuitively displayed on the digital content creation software interface, avoids the interface's fake death and the user's mistaken belief that task errors are made, and improves the user's accurate control of task progress.
Smart Images

Figure CN119045935A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and computer-readable storage medium for displaying progress. Background Art
[0002] In Digital Content Creation (DCC), users often encounter a lot of repetitive tasks 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. Currently, 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 large amounts of data or perform complex calculations, the software interface may respond slowly or even "fake freeze", which affects the user experience and workflow.
[0003] In order to solve the problem of interface freezing and provide better user feedback, progress information is usually obtained for repetitive tasks. In the related art, progress information is usually output to the console during the script execution of repetitive tasks to provide users with more detailed progress information. However, this method requires users to open the console window and keep paying attention to it in order to grasp the execution progress of repetitive tasks in real time, which is not intuitive and convenient. Summary of the invention
[0004] The present application provides a method, device, electronic device and computer-readable storage medium for displaying progress, which can intuitively display the script execution progress of repetitive tasks on the interface of digital content creation software, so that users can accurately control the progress of repetitive task execution. The specific scheme is as follows:
[0005] In a first aspect, an embodiment of 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 the digital content creation software, creating a child thread, wherein the child 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 including the current execution progress to the main thread through the child thread; and
[0009] The progress drawing instruction is received through the main thread, and a progress mark for representing the current execution progress is generated in the interface of the digital content creation software.
[0010] In a second aspect, an embodiment of the present application provides a device for displaying progress, the device for displaying progress comprising:
[0011] A creation unit, configured to create a sub-thread in response to executing a repetitive task through a main thread of the digital content creation software, wherein the sub-thread includes a progress query function;
[0012] A query unit, used to call the query function to query the current execution progress of the repetitive task in the main thread;
[0013] A generating unit is used to send a progress drawing instruction including the current execution progress to the main thread through the child thread; and to receive the progress drawing instruction through the main thread, and generate a progress mark for representing the current execution progress in the interface of the digital content creation software.
[0014] In a third aspect, the present application further provides an electronic device, including:
[0015] Processor; and
[0016] The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method described in the first aspect is executed.
[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing a data processing program, which 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 by the embodiment of the present application includes: in response to executing a repetitive task through the main thread of the digital content creation software, creating a child thread, wherein the child 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 child thread; and receiving the progress drawing instruction through the main thread to generate a progress identifier for 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 by the embodiment of the present application, when the main thread of the digital content creation software executes the repetitive task, creates a child 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 realizing the intuitive display of the current execution progress on the interface of the digital content creation software. The method for displaying progress provided in the embodiment of the present application, by creating a sub-thread to query and provide feedback on the execution progress of repetitive tasks performed in the main thread, can avoid the problem of the interface freezing when counting the repetitive tasks through the main thread, and the progress no longer changing with the execution of the repetitive tasks, causing the user to mistakenly believe that the execution of the repetitive tasks is wrong. In addition, the script execution progress of the repetitive tasks is intuitively displayed on the interface of the digital content creation software, which is convenient for users to accurately control the progress of the execution of the repetitive tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a structural diagram of a digital content creation software for implementing a method for displaying progress provided in an embodiment of the present application;
[0021] Figure 2 A flow chart of data interaction between the main thread, the sub-thread and the progress adding plug-in in the method for displaying progress provided in an embodiment of the present application;
[0022] Figure 3 is a flowchart of a method for displaying progress provided by an embodiment of the present application;
[0023] Figure 4 This is a schematic diagram of an interface of digital content creation software that is an example of a method for displaying progress provided in an embodiment of the present application;
[0024] Figure 5 is a structural block diagram of an example of a device for displaying progress provided in an embodiment of the present application;
[0025] Figure 6 It is a structural block diagram of an example of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0027] It should be noted that the terms "first", "second", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] It should be understood that in the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "Including A, B and / or C" means including any one, any two, or any 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 corresponds to B", or "B corresponds 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 determining B only according to A, and B can also be determined according to A and / or other information.
[0030] It should be noted that the instructions or operations that appear in the subsequent detailed introduction of the game interaction method provided in the embodiment of the present application can be regarded as instructions or operations triggered by the player through fingers or controlling a mouse, keyboard, game controller or stylus or voice. The specific triggering operation can be determined according to the type of electronic device. For example, when the electronic device is a touch screen device such as a mobile phone, a tablet computer, a game console, etc., the player can trigger instructions or operations on the touch screen through any suitable object or accessory such as a finger or stylus, or can trigger instructions or operations through voice. When the terminal device is a non-touch screen terminal device such as a desktop computer or a laptop computer, the player can trigger instructions or operations through external devices such as a mouse, keyboard, and game controller.
[0031] Before describing the implementation methods of the present application in detail, relevant concepts are first introduced and the prior art is further described.
[0032] Introduction to related concepts
[0033] 1. Digital Content Creation (DCC): DCC can be used to create digital media content. It is widely used in the fields of film, television, games, animation, architecture and industrial design. It can be used for 3D modeling, animation, special effects synthesis, video editing, audio editing and image processing. Commonly used DCC software includes but is not limited to Maya, Houdini, Nuke, 3Dmax, blender, etc.
[0034] 2. Thread: A thread is the smallest unit that the operating system can schedule operations on. It is contained in a process and is the actual operating unit in the process. A process has at least one thread. 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 description 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 texture merging and material modification, the DCC interface will freeze or even freeze, causing users to suspect that there is a problem with the execution of repetitive tasks.
[0037] In order to improve this situation, progress information is usually output to the console during the script execution of repetitive tasks, so that users can understand the execution progress of repetitive tasks. However, this method cannot intuitively display the execution progress of repetitive tasks on the interface, but requires users to open the console window for query. If the progress displayed in the console is displayed on the DCC interface, if the repetitive task takes a long time, it will cause the DCC interface to freeze, causing the progress displayed on the DCC interface to no longer change 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 that can intuitively and conveniently display the script execution progress of repetitive tasks.
[0039] Based on the above reasons, in order to intuitively display the script execution progress of repetitive tasks on the digital content creation interface, so that users can accurately control the progress of task execution, the first embodiment of the present application provides a method for displaying progress. The method is applied to electronic devices, which can be desktop computers, laptop computers, mobile phones, tablet computers, electronic watches, etc., or other electronic devices that can display progress bars, which are not specifically limited in the embodiments of the present application.
[0040] For example, in combination with the above introduction, Figure 1 A schematic diagram of the structure of a digital content creation software for implementing a method for displaying progress provided by an embodiment of the present application is shown. The digital content creation software 100 may include a main thread 101, a sub-thread 102, and a progress adding plug-in 103. The main thread 101 may be used to process tasks in the digital content creation software and support core functions. In the embodiment of the present application, the main thread 101 is used to execute repetitive tasks; the sub-thread 102 is an independent execution path running outside the main thread 101. Generally, the main thread is the first thread created when the program starts, and the sub-thread is an additional thread created by the main thread. In the embodiment of the present application, the sub-thread 102 is used to query the execution progress of repetitive tasks in the main thread and feed back the execution progress to the main thread 101; a plug-in is a software component that can expand or enhance the functions of existing software. Plug-ins are usually designed to be modular and pluggable, which means that they can be added, removed or replaced without affecting the core program. In the embodiment 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 a graphical user interface during the process of the main thread executing repetitive tasks, so that users can intuitively and conveniently clarify the execution progress of repetitive tasks.
[0041] The following 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 embodiment of the present application is introduced. Figure 2 As shown, the following steps S10-16 are included:
[0042] Step S10: when the digital content creation software 10 is started, the progress adding plug-in 103 is started, the UI registration function is called to generate a progress panel in a closed state at the progress adding position, and a functional control for executing repetitive tasks is generated;
[0043] Step S11: in response to a trigger operation on a functional control, executing a repetitive task through the main thread 101;
[0044] Step S12: in response to the main thread 101 executing the repetitive task, creating a child thread 102;
[0045] Step S13: calling a query function to query the current execution progress of the repetitive task and the target object currently being processed;
[0046] Step S14: Send a progress drawing instruction including the current execution progress and the target object;
[0047] Step S15: when the current execution progress is not 0, the progress panel is changed from a closed state to an open state; a UI drawing function is called to generate a progress mark 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 above steps S10 to S16 will be described in detail in the following description of the method for displaying progress provided in the embodiment of the present application.
[0050] The technical solution of the present application is described in detail below through 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, combined Figure 3 and Figure 4 The method for displaying progress provided by an embodiment of the present application is introduced.
[0052] like Figure 3 As shown, the method for displaying progress provided by the present application includes the following steps S101 to S104.
[0053] Step S101 (i.e. Figure 2 Step S12): In response to executing repetitive tasks through the main thread of the digital content creation software, a sub-thread is created, wherein the sub-thread includes a progress query function.
[0054] In digital content creation, such as 3D modeling, game development, animation production and other fields, there is often a need to perform repetitive tasks, which may include but are not limited to one or more of merging textures, modifying materials, and exporting assets.
[0055] Merging maps means that in the process of making 3D models, multiple different texture maps, such as diffuse maps, normal maps, and highlight maps, need to be applied to the same model. If users merge them manually 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, the diffuse map is used to define the basic color and pattern of the model surface; the normal map is used to simulate the tiny concave and convex details on the model surface, and create a more complex surface structure effect by changing the direction of light; the highlight map is used to control the reflective properties of the model surface and define which areas on 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 users modify them manually one by one, it will take a lot of time and lead to low efficiency. Therefore, scripts are usually written in scripting languages (such as Python) to achieve batch changes of material parameters.
[0057] Exporting assets means that in digital content creation projects, a large number of 3D models, textures, and material files need to be exported to a specific format for use in other software or games. Usually, users will set up automated export scripts to automatically export resources.
[0058] In an embodiment of the present application, a user can execute repetitive tasks in a digital content creation software through an automated script, and the execution of the automated script can be run in the main thread of the digital content creation software. When executing the repetitive task through the main thread, a sub-thread can be created, and the sub-thread can include a progress query function, and the sub-thread is used to query and feedback the execution progress of the repetitive task.
[0059] It should be noted that in the process of executing the repetitive task through the main thread, if the data volume of the repetitive task is large and the execution of the automation script takes a long time, it may cause the main thread to be blocked. The embodiment of the present application queries the progress of the main thread in executing the repetitive task through an additionally created sub-thread, thereby avoiding the problem of failure to respond when querying the execution progress of the repetitive task through the main thread due to the blockage of the main thread, making the query of the execution progress of the repetitive task more convenient and quick.
[0060] Step S102: calling the query function to query the current execution progress of the repetitive task in the main thread.
[0061] In an embodiment of the present application, the created child thread includes a query function. During the process of the main thread executing the repetitive task, the child thread can access the main thread and query the current execution progress of the repetitive task by calling the query function. The current execution progress refers to the execution progress corresponding to the repetitive task at the current query moment.
[0062] In a specific implementation, the query function can be called in real time to query the current execution progress of the repetitive task, or the query function can be called according to a preset period (such as 0.1 seconds, 0.2 seconds, etc.) to query the current execution progress of the repetitive task.
[0063] Step S103: Sending a progress drawing instruction including the current execution progress to the main thread through the child thread.
[0064] Step S104: receiving the progress drawing instruction through the main thread, and generating a progress mark 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 child thread can send a progress drawing instruction to the main thread, and the progress drawing instruction includes the current execution progress of the repetitive task that has been queried. 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 it is found that the current execution progress of the repetitive task is 20%, the child thread sends a progress drawing instruction containing the current execution progress of 20% to the main thread, thereby forcing the main thread to generate a progress indicator in the interface of the digital content creation software indicating that the current execution progress is 20%.
[0067] Optionally, the progress indicator includes at least one of a progress bar and a progress percentage, that is, the progress indicator may be only a progress bar in image form, or only a progress percentage in character form, or may include both a progress bar in image form and a progress percentage in character form.
[0068] In this way, when the progress indicator is presented in the interface of the digital content creation software, the user can intuitively and conveniently understand the current execution progress of the repetitive task.
[0069] The method for displaying progress provided by the embodiment of the present application includes: in response to executing a repetitive task through the main thread of the digital content creation software, creating a child thread, wherein the child 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 child thread; and receiving the progress drawing instruction through the main thread to generate a progress identifier for 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 by the embodiment of the present application, when the main thread of the digital content creation software executes the repetitive task, creates a child 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 realizing the intuitive display of the current execution progress on the interface of the digital content creation software. The method for displaying progress provided in the embodiment of the present application, by creating a sub-thread to query and provide feedback on the execution progress of repetitive tasks performed in the main thread, can avoid the problem of the interface freezing when counting the repetitive tasks through the main thread, and the progress no longer changing with the execution of the repetitive tasks, causing the user to mistakenly believe that the execution of the repetitive tasks is wrong. In addition, the script execution progress of the repetitive tasks is intuitively displayed on the interface of the digital content creation software, which is convenient for users to accurately control the progress of the execution of the repetitive tasks.
[0070] Method for displaying progress Method for displaying progress Method for displaying progress In an optional implementation, the digital content creation software is provided with a progress adding plug-in bound to the repetitive task, and the method for displaying progress provided in the embodiment of the present application may also include the following steps S201 (i.e. Figure 2 Step S10): 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 functional control for executing the repetitive task is generated.
[0071] Step S101 can be performed by the following steps (i.e. Figure 2 Step S11) in the embodiment is implemented as follows:
[0072] In response to a triggering operation on the function control, repetitive tasks are executed through the main thread of the digital content creation software, and a sub-thread is created.
[0073] In the embodiment of the present application, when developing the progress adding plug-in, the repetitive task can be written into the progress adding plug-in. For example, if the repetitive task is to merge 50 stickers, a progress adding plug-in bound with the repetitive task of merging 50 stickers 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 the user's trigger operation. The function control is displayed in the interface of the digital content creation software.
[0075] The user can perform a trigger operation on the function control, and the trigger operation includes but is not limited to a touch operation, an air gesture operation, a voice input operation, and a shortcut key operation of an external device. Among them, the touch operation can be a click operation, a slide operation, a press operation, or a drag operation, etc. This application does not specifically limit the trigger operation.
[0076] After receiving the trigger operation, the repetitive task can be executed through the main thread, and a child thread can be 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 display the current execution progress during the execution of the repetitive task, so that the user can track and control the execution progress of the repetitive task in real time.
[0077] In an optional implementation, the progress adding plug-in may include a UI registration function, and step S201 may 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 the progress adding position, and a functional control for executing the repetitive task is generated. The progress adding position can be, for example, the title bar position of the digital content creation software, or the bottom of the interface, etc., which is not limited in this application.
[0079] When the progress adding plug-in is started, UI (User Interface) elements are drawn in the interface of the digital content creation software by calling the UI registration function. The drawn UI elements may include but are not limited to a progress panel and functional controls for performing the repetitive tasks. The progress panel is initially in a closed state, that is, when the progress adding plug-in is started, the progress panel that is invisible to the user is generated.
[0080] The progress adding plug-in may include a progress adding position, so that the progress panel can be generated at the progress adding position, and a functional control can be added to the digital content creation interface to trigger the repetitive task and support the execution progress presentation of the repetitive task.
[0081] In an optional implementation, the creation of a child thread in step S101 may be implemented according to the following steps:
[0082] Creating a child thread based on a timer of the digital content creation software;
[0083] Step S102 can be implemented by the following steps:
[0084] 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.
[0085] The digital content creation software has a timer. In the embodiment of the present application, the timer of the digital content creation software can be used to create a child thread. Specifically, the trigger frequency of the timer can be set, so that after the timer is started, the query function can be called to query the current execution progress of the repetitive task in the first thread according to the trigger frequency of the timer.
[0086] Assuming that the trigger frequency of the timer is set to 100 times in 1 second (once every 0.01 seconds), the query function queries the current execution progress of the repetitive task once every 0.01 seconds; assuming that the trigger frequency of the timer is set to 50 times in 1 second (once every 0.02 seconds), the query function queries the current execution progress of the repetitive task once every 0.01 seconds.
[0087] In an embodiment of the present application, a timer of the digital content creation software is used to create a sub-thread, so that the sub-thread has encapsulated many functions and can directly and quickly access the main thread, making progress query more convenient and quick.
[0088] In an optional implementation, while querying the current execution progress, the currently processed object can also be queried. Step S102 can be performed by the following steps (i.e. Figure 2 Step S13) in the embodiment is implemented as follows:
[0089] The query function is called to query the current execution progress of the repetitive task in the main thread and the target object currently being processed.
[0090] Accordingly, step S103 may be implemented by the following steps: sending a progress drawing instruction (i.e., Figure 2 , step S14 in the process).
[0091] Step S104 can be implemented by the following steps: receiving the progress drawing instruction through the main thread, 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 query function can be used to access and query the current execution progress and the target object currently being processed, and the target object can be one of a material, a texture, an asset, etc. It should be noted that there is no execution order for querying the current execution progress and the target object currently being processed.
[0093] After acquiring the current execution progress and the target object, the sub-thread may send a progress drawing instruction including the current execution progress and the target object to the main thread, so as to draw a progress mark representing the current execution progress and an object mark corresponding to the target object on the interface of the digital content creation software.
[0094] By drawing the progress mark of the current execution progress and the object mark corresponding to the target object on the interface of the digital content creation software, it is convenient for users to understand the current execution progress of the repetitive task and the target object currently processed by the automation script in real time, and the progress display is more user-friendly.
[0095] In an optional specific implementation, the repetitive task is a processing task for a first object, and the first object includes at least one of a texture and a material, that is, the repetitive task is at least one of merging textures and modifying materials. The present application can implement the above step S102 in the following manner:
[0096] Acquiring the total number of the first objects in the repetitive task through the query function; and
[0097] Obtaining a first number of the first objects currently processed in the first thread;
[0098] The ratio of the first quantity to the total quantity is determined as the current execution progress of the repetitive task.
[0099] Alternatively, the present application may also implement the above step S102 in the following manner:
[0100] Acquiring the total number of the first objects in the repetitive task through the query function; and
[0101] Obtaining a second number of the first objects that are currently not processed in the first thread;
[0102] The difference between the total number and the second number and the ratio thereof to the total number are determined as the current execution progress of the repetitive task.
[0103] In an embodiment of the present application, a variable for maximum progress may be included in the child thread. After the child thread is created, the total number of first objects that need to be processed in the repetitive task may be assigned to the variable for maximum progress. In this way, the query function may obtain the variable for maximum progress and query the first number of first objects that have been processed by the repetitive task, thereby obtaining the current execution progress of the repetitive task. For example, in a task of merging maps in batches, the total number of maps that need to be merged is 100, and 60 maps have been merged so far. Then, it can be calculated that the current execution progress is 60%.
[0104] Alternatively, the query function may query the second number of the first objects that are not currently processed by the repetitive task, so as to obtain the current execution progress of the repetitive task. For example, in a task of batch merging textures, the total number of textures to be merged is 100, and the number of textures that are not currently merged is 40, then the current execution progress can be calculated to be 60%.
[0105] In an optional implementation, the step of “calling the query function to query the current execution progress of the repetitive task in the main thread according to the trigger frequency of the timer” may include the following steps:
[0106] If the i-th execution progress obtained by the child thread in the i-th query does not reach 100%, the query function is called to query the i+1th execution progress of the repetitive task in the main thread for the i+1th time according to the trigger frequency of the timer, where 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 a specific implementation, when the child thread obtains the i-th execution progress through the i-th query and the i-th execution progress has not reached 100%, it indicates that the repetitive task has not been completed, and the query function can be continuously called to continue to query the i+1th execution progress of the repetitive task in the main thread for the i+1th time according to the trigger frequency of the timer, until the current execution progress obtained by the child thread through the query reaches 100%, indicating that the repetitive task has been completed, and the child thread can be terminated, where i is an integer greater than 0.
[0109] In an optional implementation, the method for displaying progress provided in the embodiment of the present application may further include the following steps:
[0110] If the i-th execution progress obtained by the child thread in the i-th query does not reach 100%, remove the timer;
[0111] A progress indicator is generated in the interface of the digital content creation software to indicate that the repetitive task has been completed.
[0112] In an embodiment of the present application, when the child thread obtains the i-th execution progress through the i-th query and the i-th execution progress reaches 100%, it indicates that the repetitive task has been completed, and the timer can be removed, and the query function can be stopped from being called to query the execution progress of the repetitive task in the main thread. At this time, a progress indicator can be generated in the interface of the digital content creation software to indicate that the repetitive task has been completed, for example, a progress indicator such as "Task Completed" or "Progress 100%" can be displayed in the interface of the digital content creation software.
[0113] This setting method can promptly remove the timer when the repetitive task is completed, and promptly stop the query of the execution progress of the repetitive task, thereby reducing the performance consumption caused by data calculation. In addition, by generating a progress mark for indicating that the repetitive task has been completed in the interface of the digital content creation software, the user can promptly understand that the automation script of the repetitive task has been executed.
[0114] In addition, if the i-th execution progress obtained by the subthread in the i-th query does not reach 100%, removing the timer can also trigger the playing of audio data indicating that the repetitive task has been completed, further reminding the user that the automation script of the repetitive task has been executed.
[0115] In an optional implementation, the progress adding plug-in includes a UI drawing function, and the step of "generating a progress mark for representing the current execution progress in the interface of the digital content creation software" can be performed according to the following steps (i.e. Figure 2 Step S15) in the embodiment is implemented as follows:
[0116] When the current execution progress is not 0, changing the progress panel 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 an embodiment of the present application, the progress adding plug-in may include a UI drawing function, which is used to draw a UI on the interface of the digital content creation software, specifically including a progress panel, function controls, and a progress indicator displayed in the progress panel.
[0119] When the main thread receives the progress drawing instruction sent by the child thread containing the current execution progress and the target object currently being processed, it can be determined whether the current execution progress is 0. When the current specified progress is not 0, the progress panel can be changed from a closed state to an open state. In this way, calling the UI drawing function can draw the current execution progress and the target object currently being processed in the progress panel in the open state, so that the user can intuitively and conveniently understand the current execution progress of the repetitive task and the target object currently being processed.
[0120] In an optional implementation, the progress adding plug-in may further include a UI uninstall function, and the UI uninstall function is used to uninstall the registered UI. The method for displaying progress provided in the embodiment of the present application may further include the following steps (i.e. Figure 2 Step S16 in the above method):
[0121] When the digital content creation software is closed, the UI uninstall function is called to uninstall the progress panel and the function control.
[0122] In an 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 to the digital content creation software through the progress adding plug-in are uninstalled, and the UI elements include at least the progress panel and the function control.
[0123] By setting a UI registration function and a 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, thereby ensuring that the execution progress of the repetitive task is correctly displayed and hidden.
[0124] like Figure 4As shown, it is an interface diagram of a digital content creation software of an example of a method for displaying progress provided by an embodiment of the present application, including an interface (4-a) and an interface (4-c). 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 in a closed state (currently invisible) and a function control 21 bound to 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 child thread is created using the timer of the digital content creation software. During the execution of the repetitive task, the child thread queries the current execution progress of the repetitive task and the target object currently being processed according to the trigger frequency of the timer (for example, once every 0.01 seconds), 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 be changed to the open state, and the progress mark used to represent the current execution progress and the object mark of the target object are drawn in the progress panel. As shown in interface (4-b), if the current execution progress of the repetitive task is 25%, and the target object currently being processed is Cube.001, the progress panel 20 is changed from the closed state to the open state, and a progress bar 202 used to represent the current execution progress of 25% is displayed in the progress panel, and the object mark 201 of the target object Cube.001 is displayed. When the current execution progress of the repetitive task is 100% in a certain query, the timer is removed, and as shown in interface (4-c), a progress mark 203 used to represent that the repetitive task has been completed is displayed in the progress panel 20.
[0125] It can be seen that the display progress provided in the embodiment of the present application, when executing repetitive tasks through the main thread, creates a child thread to monitor the execution progress of repetitive tasks in the main thread, and feeds back to the graphical user interface of the DCC software, which can intuitively present the script execution progress of repetitive tasks to the user in real time. The user does not need to open the console window and keep paying attention to it in order to grasp the execution progress of the repetitive tasks in real time, which facilitates the user to accurately control the progress of the execution of repetitive tasks.
[0126] The above is an introduction to 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, such as Figure 5 As shown, the device 500 for displaying progress includes:
[0128] A creation unit 501 is used to create a sub-thread in response to executing a repetitive task through a main thread of the digital content creation software, wherein the sub-thread includes a progress query function;
[0129] A query unit 502, used to call the query function to query the current execution progress of the repetitive task in the main thread;
[0130] The generation unit 503 is used to send a progress drawing instruction containing the current execution progress to the main thread through the child thread; and receive the progress drawing instruction through the main thread to generate a progress identifier for representing the current execution progress in the interface of the digital content creation software.
[0131] Optionally, the creating unit 501 is specifically used for:
[0132] Creating a child thread based on a timer of the digital content creation software;
[0133] The query unit 502 is specifically used for:
[0134] 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.
[0135] Optionally, the digital content creation software is provided with a progress adding plug-in bound to the repetitive task, and the generating unit 503 is further used for:
[0136] 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 functional control for executing the repetitive task is generated;
[0137] The creation unit 501 is specifically used for:
[0138] In response to a triggering operation on the function control, repetitive tasks are executed through the main thread of the digital content creation software, and a sub-thread is created.
[0139] Optionally, the repetitive task is a task for processing a first object, and the first object includes at least one of a texture and a material; the query unit 502 is specifically used for:
[0140] Obtaining the total number of the first objects in the repetitive task;
[0141] Obtaining a first number of the first objects currently processed in the first thread;
[0142] The ratio of the first quantity to the total quantity is determined as the current execution progress of the repetitive task.
[0143] Optionally, the progress adding plug-in includes a UI drawing function, and the generating unit 503 is specifically used for:
[0144] When the current execution progress is not 0, changing the progress panel from a closed state to an open state;
[0145] The UI drawing function is called to generate a progress indicator representing the current execution progress in the progress panel.
[0146] Optionally, the progress adding plug-in includes a UI registration function, and the generating unit 503 is further specifically used for:
[0147] The UI registration function is called to generate a progress panel in a closed state at the progress adding position, and to generate a functional control for executing the repetitive task.
[0148] Optionally, the progress adding plug-in includes a UI uninstall function, and the apparatus 500 for displaying progress further includes an uninstall unit, and the uninstall unit is used to:
[0149] When the digital content creation software is closed, the UI uninstall function is called to uninstall the progress panel and the function control.
[0150] Optionally, the query unit 502 is specifically configured to:
[0151] If the i-th execution progress obtained by the child thread in the i-th query does not reach 100%, the query function is called to query the i+1th execution progress of the repetitive task in the main thread for the i+1th time according to the trigger frequency of the timer, where i is greater than 0.
[0152] Optionally, the progress display device 500 further includes a removing unit, and the removing unit is used to:
[0153] If the i-th execution progress obtained by the child thread in the i-th query does not reach 100%, remove the timer;
[0154] A progress indicator is generated in the interface of the digital content creation software to indicate that the repetitive task has been completed.
[0155] Optionally, the query unit 502 is specifically configured to:
[0156] Calling the query function to query the current execution progress of the repetitive task in the main thread and the target object currently being processed;
[0157] The generating unit 503 is specifically used for:
[0158] A progress drawing instruction including the current execution progress and the target object is sent to the main thread through the child thread; and the progress drawing instruction is received through the main thread to generate a progress identifier for representing the current execution progress and an object identifier corresponding to the target object in the digital content creation software.
[0159] Optionally, the progress indicator includes at least one of a progress bar and a progress percentage.
[0160] The device for displaying progress provided in the embodiment of the present application creates a child thread including 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 including the monitored current execution progress to the main thread, thereby realizing an intuitive display of the current execution progress on the interface of the digital content creation software. The device for displaying progress provided in the embodiment of the present application creates a child thread to query and feedback the execution progress of the repetitive task performed in the main thread, which can avoid the problem of the interface freezing when the main thread counts the repetitive tasks, and the progress no longer changes with the execution of the repetitive tasks, causing the user to mistakenly believe that the execution of the repetitive tasks is wrong, and intuitively displays the script execution progress of the repetitive tasks on the interface of the digital content creation software, which is convenient for users to accurately control the progress of the execution of the repetitive tasks.
[0161] Corresponding to the method for displaying progress provided in the first embodiment of the present application, the third embodiment of the present application further provides an electronic device for displaying progress. Figure 6 As shown, the electronic device 600 includes: a processor 601; and a memory 602, which is used to store a program of the method for displaying progress. After the device is powered on and the program of the method for displaying progress is run by the processor, the following steps are performed:
[0162] In response to executing a repetitive task through a main thread of the digital content creation software, creating a child thread, wherein the child thread includes a progress query function;
[0163] Calling the query function to query the current execution progress of the repetitive task in the main thread;
[0164] Sending a progress drawing instruction including the current execution progress to the main thread through the child thread; and
[0165] The progress drawing instruction is received through the main thread, and a progress mark for representing the current execution progress is generated in the interface of the digital content creation software.
[0166] Optionally, the electronic device 600 specifically performs the following steps:
[0167] Creating a child thread based on a timer of the digital content creation software;
[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 to the repetitive task, and the electronic device 600 may 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 functional control for executing the repetitive task is generated;
[0171] In response to a triggering operation on the function control, repetitive tasks are executed through the main thread of the digital content creation software, and a sub-thread is created.
[0172] Optionally, the repetitive task is a task for processing 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] Obtaining the total number of the first objects in the repetitive task;
[0174] Obtaining a first number of the first objects currently processed in the first thread;
[0175] The ratio of the first quantity to the total quantity 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, changing the progress panel from a closed state to an open state;
[0178] The UI drawing function is called to generate a progress indicator 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 the progress adding position, and to generate a functional control for executing the repetitive task.
[0181] Optionally, the progress adding plug-in includes a UI uninstall function, and the electronic device 600 may further perform 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 performs the following steps:
[0184] If the i-th execution progress obtained by the child thread in the i-th query does not reach 100%, the query function is called to query the i+1th execution progress of the repetitive task in the main thread for the i+1th time according to the trigger frequency of the timer, where i is greater than 0.
[0185] Optionally, the electronic device 600 may further perform the following steps:
[0186] If the i-th execution progress obtained by the child thread in the i-th query does not reach 100%, remove the timer;
[0187] A progress indicator is generated in the interface of the digital content creation software to indicate that the repetitive task has been completed.
[0188] Optionally, the electronic device 600 specifically performs the following steps:
[0189] Calling the query function to query the current execution progress of the repetitive task in the main thread and the target object currently being processed;
[0190] Sending a progress drawing instruction including the current execution progress and the target object to the main thread through the child thread;
[0191] The progress drawing instruction is received through the main thread, and a progress identifier for representing the current execution progress and an object identifier corresponding to the target object are generated in the digital content creation software.
[0192] Optionally, the progress indicator includes at least one of a progress bar and a progress percentage.
[0193] The electronic device for displaying progress provided by the embodiment of the present application, when the main thread of the digital content creation software executes the repetitive task, creates a sub-thread including 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 including the monitored current execution progress to the main thread, thereby realizing an intuitive display of the current execution progress on the interface of the digital content creation software. The electronic device for displaying progress provided by the embodiment of the present application, by creating a sub-thread to query and feedback the execution progress of the repetitive task performed in the main thread, can avoid the problem of interface pseudo-death when the main thread counts the repetitive tasks, and the progress no longer changes with the execution of the repetitive tasks, causing the user to mistakenly believe that the execution of the repetitive task is wrong, and intuitively displays the script execution progress of the repetitive task on the interface of the digital content creation software, so that the user can 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 for the method for displaying progress, the program being executed by a processor to perform the following steps:
[0195] In response to executing a repetitive task through a main thread of the digital content creation software, creating a child thread, wherein the child thread includes a progress query function;
[0196] Calling the query function to query the current execution progress of the repetitive task in the main thread;
[0197] Sending a progress drawing instruction including the current execution progress to the main thread through the child thread; and
[0198] The progress drawing instruction is received through the main thread, and a progress mark for representing the current execution progress is generated in the interface of the digital content creation software.
[0199] Optionally, the processor specifically performs the following steps:
[0200] Creating a child thread 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 to the repetitive task, and the processor may further perform the following steps:
[0203] 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 functional control for executing the repetitive task is generated;
[0204] In response to a triggering operation on the function control, repetitive tasks are executed through the main thread of the digital content creation software, and a sub-thread is created.
[0205] Optionally, the repetitive task is a task for processing a first object, and the first object includes at least one of a texture and a material; the processor specifically performs the following steps:
[0206] Obtaining the total number of the first objects in the repetitive task;
[0207] Obtaining a first number of the first objects currently processed in the first thread;
[0208] The ratio of the first quantity to the total quantity 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 performs the following steps:
[0210] When the current execution progress is not 0, changing the progress panel from a closed state to an open state;
[0211] The UI drawing function is called to generate a progress indicator 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 performs the following steps:
[0213] The UI registration function is called to generate a progress panel in a closed state at the progress adding position, and to generate a functional control for executing the repetitive task.
[0214] Optionally, the progress adding plug-in includes a UI uninstall function, and the processor may further perform the following steps:
[0215] When the digital content creation software is closed, the UI uninstall function is called to uninstall the progress panel and the function control.
[0216] Optionally, the processor specifically performs the following steps:
[0217] If the i-th execution progress obtained by the child thread in the i-th query does not reach 100%, the query function is called to query the i+1th execution progress of the repetitive task in the main thread for the i+1th time according to the trigger frequency of the timer, where i is greater than 0.
[0218] Optionally, the processor may further perform the following steps:
[0219] If the i-th execution progress obtained by the child thread in the i-th query does not reach 100%, remove the timer;
[0220] A progress indicator is generated in the interface of the digital content creation software to indicate that the repetitive task has been completed.
[0221] Optionally, the processor specifically performs the following steps:
[0222] Calling the query function to query the current execution progress of the repetitive task in the main thread and the target object currently being processed;
[0223] Sending a progress drawing instruction including the current execution progress and the target object to the main thread through the child thread;
[0224] The progress drawing instruction is received through the main thread, and a progress identifier for 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 indicator includes at least one of a progress bar and a progress percentage.
[0226] The computer-readable storage medium provided in the embodiment of the present application, when the main thread of the digital content creation software executes the repetitive task, creates a child thread including 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 including the monitored current execution progress to the main thread, thereby realizing an intuitive display of the current execution progress on the interface of the digital content creation software. The computer-readable storage medium provided in the embodiment of the present application, by creating a child thread to query and feedback the execution progress of the repetitive task performed in the main thread, can avoid the problem of interface pseudo-death when the main thread counts the repetitive tasks, and the progress no longer changes with the execution of the repetitive tasks, causing the user to mistakenly believe that the execution of the repetitive task is wrong, and intuitively displays the script execution progress of the repetitive task on the interface of the digital content creation software, so that the user can accurately control the progress of the execution of the repetitive task.
[0227] It should be noted that for the detailed description of the devices, electronic devices and computer-readable storage media provided in the second, third and fourth embodiments of the present application, reference can be made to the relevant description of the first embodiment of the present application, and no further details will be given here.
[0228] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0229] In a typical configuration, a node device in a blockchain includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0230] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0231] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. 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), random access memory (RAM) of other attributes, read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage media or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0232] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0233] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. A method for displaying progress, characterized in that: The method comprises: In response to executing a repetitive task through a main thread of the digital content creation software, creating a child thread, wherein the child 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 including the current execution progress to the main thread through the child thread; and The progress drawing instruction is received through the main thread, and a progress mark for representing the current execution progress is generated in the interface of the digital content creation software.
2. The method according to claim 1, characterized in that: The step of creating a child thread includes: Creating a child thread based on a timer of the digital content creation software; The calling of the query function to query the current execution progress of the repetitive task in the first thread includes: 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.
3. The method according to claim 1, characterized in that 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, the progress adding plug-in is started, a progress panel in a closed state is generated, and a functional control for executing the repetitive task is generated; The step of creating a sub-thread in response to executing a repetitive task through a main thread of the digital content creation software comprises: In response to a triggering operation on the function control, repetitive tasks are executed through the main thread of the digital content creation software, and a sub-thread is created.
4. The method according to claim 1, characterized in that: The repetitive task is a processing task for a first object, and the first object includes at least one of a texture and a material; the querying of the current execution progress of the repetitive task in the main thread includes: Obtaining the total number of the first objects in the repetitive task; Obtaining a first number of the first objects currently processed in the first thread; The ratio of the first quantity to the total quantity is determined as the current execution progress of the repetitive task.
5. The method according to claim 3, characterized in that: The progress adding plug-in includes a UI drawing function, and the generating of a progress mark for representing the current execution progress in the interface of the digital content creation software includes: When the current execution progress is not 0, changing the progress panel from a closed state to an open state; The UI drawing function is called to generate a progress indicator representing the current execution progress in the progress panel.
6. The method according to claim 3, characterized in that The progress adding plug-in includes a UI registration function, the generating of a progress panel in a closed state, and the generating of a function control for executing the repetitive task, including: The UI registration function is called to generate a progress panel in a closed state at the progress adding position, and to generate a functional control for executing the repetitive task.
7. The method according to claim 3, characterized in that The progress adding plug-in includes a UI uninstall function, and the method further includes: When the digital content creation software is closed, the UI uninstall function is called to uninstall the progress panel and the function control.
8. The method according to claim 2, characterized in that: The calling of the query function to query the current execution progress of the repetitive task in the main thread according to the trigger frequency of the timer includes: If the i-th execution progress obtained by the child thread in the i-th query does not reach 100%, the query function is called to query the i+1th execution progress of the repetitive task in the main thread for the i+1th time according to the trigger frequency of the timer, where i is greater than 0.
9. The method according to claim 8, characterized in that The method further comprises: If the i-th execution progress obtained by the child thread in the i-th query does not reach 100%, remove the timer; A progress indicator is generated in the interface of the digital content creation software to indicate that the repetitive task has been completed.
10. The method according to claim 1, characterized in that The calling of the query function to query the current execution progress of the repetitive task in the main thread includes: Calling the query function to query the current execution progress of the repetitive task in the main thread and the target object currently being processed; The sending the progress drawing instruction including the current execution progress to the main thread through the child thread includes: Sending a progress drawing instruction including the current execution progress and the target object to the main thread through the child thread; The receiving the progress drawing instruction through the main thread and generating a progress mark for representing the current execution progress in the interface of the digital content creation software includes: The progress drawing instruction is received through the main thread, and a progress identifier for representing the current execution progress and an object identifier corresponding to the target object are generated in the digital content creation software.
11. The method according to claim 1, characterized in that: The progress indicator includes at least one of a progress bar and a progress percentage.
12. A device for displaying progress, characterized in that: The device for displaying progress includes: A creation unit, configured to create a sub-thread in response to executing a repetitive task through a main thread of the digital content creation software, wherein the sub-thread includes a progress query function; A query unit, used to call the query function to query the current execution progress of the repetitive task in the main thread; A generating unit is used to send a progress drawing instruction including the current execution progress to the main thread through the child thread; and to receive the progress drawing instruction through the main thread, and generate a progress mark for representing the current execution progress in the interface of the digital content creation software.
13. An electronic device, characterized in that: include: processor; as well as The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method according to any one of claims 1 to 11 is executed.
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 to 11.
Citation Information
Patent Citations
Image scanning method and device
CN106534607A
Interface drawing method and device and mobile terminal
CN109669752A
Multi-thread concurrency monitoring method, device and apparatus and storage medium
CN111488255A
Display equipment and file copying progress display method
CN112631796A
Micro-front-end application running method and device, computing equipment and storage medium
CN117971465A
