Multi-process driving method, device, equipment and system of drawing file

By executing the second transaction when the first process is idle in the multi-process driven method of the drawing tool, parallel execution of multiple processes is achieved, which solves the problems of long processing time and lag in the drawing tool, and improves design efficiency and user experience.

CN122285191APending Publication Date: 2026-06-26HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-12-25
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing drawing tools require sequential scheduling when performing time-consuming tasks, resulting in long execution times, software interface lag, and impact on design efficiency.

Method used

By adopting a multi-process driven approach, the second process is driven to execute the second transaction during the idle time period when the first process of the drawing tool is executing the first transaction, thereby realizing the parallel execution of transactions by multiple processes and making full use of the idle time period.

Benefits of technology

It reduces the total execution time of multiple transactions, improves the design efficiency of drawing files by up to 60%, and operates without the user's awareness, preventing crashes in multi-threaded parallel scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122285191A_ABST
    Figure CN122285191A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, and system for driving multiple processes in drawing files, belonging to the field of drawing tool technology. The method includes: obtaining a task queue to be executed by the drawing tool, the task queue including a first transaction and a second transaction; while driving the first process of the drawing tool to execute the first transaction, executing the second transaction by driving the second process of the drawing tool during an idle time period, the idle time period being the idle time period during the execution of the first transaction by the first process. In this way, by driving one process to execute one transaction while driving another process to execute another transaction during an idle time period, it is possible to simultaneously drive multiple processes to execute transactions in parallel, fully utilizing the idle time period of the drawing tool itself, thereby reducing the total execution time of multiple transactions and improving the design efficiency of drawing files.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of drawing tools technology, and in particular to a method, apparatus, device and system for driving multiple processes of drawing files. Background Technology

[0002] During the operation of the drawing tools for drawing files, time-consuming tasks such as drawing file download, drawing file check-in / check-out, drawing file parameter write-back, and drawing file backup need to be scheduled sequentially by driving the main process. This results in long execution times, severe software interface lag, and long waiting times for users, seriously affecting the design efficiency of drawing files. Summary of the Invention

[0003] This application provides a multi-process driving method, apparatus, device, and system for drawing files, which improves the design efficiency of drawing files. The technical solution is as follows.

[0004] Firstly, a multi-process driving method for drawing files is provided. This method is applied to a drawing tool and includes: obtaining a task queue to be executed by the drawing tool, the task queue including a first transaction and a second transaction; while driving the first process of the drawing tool to execute the first transaction, executing the second transaction by driving the second process of the drawing tool during an idle time period, where the idle time period is the idle time period during the execution of the first transaction by the first process. In this way, by driving one process to execute one transaction while driving another process to execute another transaction during an idle time period, it is possible to drive multiple processes to execute transactions in parallel simultaneously, making full use of the idle time period of the drawing tool itself, thereby reducing the total execution time of multiple transactions and improving the design efficiency of the drawing file.

[0005] In one possible implementation, the second transaction is one that needs to call the drawing tool's interface. This means that the second transaction requires the drawing tool's resources; that is, the drawing tool needs to use its time to execute the second transaction while the driving process is executing it. In this way, the more time-consuming transaction is executed during the drawing tool's idle time slots, without waiting for execution, effectively reducing the total execution time of multiple transactions and improving efficiency.

[0006] In one possible implementation, the second transaction includes at least one of the following: drawing file download, drawing file loading, drawing file check-in / check-out, drawing file parameter write-back, drawing file backup, drawing file specification check, remote startup of drawing file, and drawing file feature parsing.

[0007] In one possible implementation, the second transaction includes backing up the drawing file. This second transaction is executed during idle periods by a second process that drives the drawing tool. This includes: driving the second process to traverse the drawing file in memory during the idle period; if the drawing file has been modified, creating a copy of the drawing file in memory; saving the copy to disk; and deleting it from memory. In the drawing file backup scenario, the backup function can operate independently of the drawing tool, compensating for the lack of backup functionality in some drawing tools and effectively preventing the loss of drawing files due to unforeseen factors causing the drawing tool to crash.

[0008] In one possible implementation, while the first process driving the drawing tool is executing a first transaction, a second transaction is executed by driving a second process of the drawing tool during an idle period. This includes: executing the first transaction by driving the first process; executing the second transaction by driving the second process during the idle period of the first process executing the first transaction; and, if the first process has completed the first transaction but the second process has not completed the second transaction, continuing to execute the second transaction by driving the first process. This allows different parts of the same transaction to be executed separately in the first and second processes, achieving multi-process scheduling and streamlining, which can effectively improve execution efficiency, even by up to 60%. Moreover, the multi-process scheduling and streamlining operation is performed without the user's awareness, achieving a seamless user experience. In addition, multi-process scheduling can effectively prevent drawing tool crashes caused by multi-threaded parallel scenarios, effectively solving the problem of drawing tool lag and improving the user experience.

[0009] In one possible implementation, the first transaction includes downloading drawing files, and the second transaction includes loading drawing files. The first transaction is executed by driving a first process, including downloading drawing files from a server. During the idle time period of the first process executing the first transaction, the second transaction is executed by driving a second process, including loading a portion of the drawing file into the drawing tool during the idle time period, after partially downloading the drawing file. If the first process completes the first transaction but the second process does not, the second transaction continues by driving the first process, including loading another portion of the drawing file into the drawing tool if the first process has finished downloading the drawing file but the second process has not finished loading the drawing file. In this scenario, the first process performs the transaction of downloading drawing files, and the second process performs the transaction of loading drawing files. After the first process finishes downloading the drawing file, it can execute the loading of the unloaded portion of the drawing file, allowing different parts of the same transaction to be executed in parallel, improving the performance of the drawing tool in launching drawing files, i.e., the performance of opening drawings. Furthermore, the multi-process scheduling and diversion operations can effectively improve execution efficiency. Moreover, the multi-process scheduling and diversion operations are performed without the user's awareness, achieving a seamless user experience.

[0010] In one possible implementation, obtaining the task queue to be executed by the drawing tool includes: during the execution of the first transaction by the first process, in response to a triggering operation on the second transaction, determining whether the second transaction has an interaction relationship with the drawing tool; if the second transaction has an interaction relationship with the drawing tool, adding the second transaction to the task queue. Adding the second transaction to the task queue when it has an interaction relationship with the drawing tool implies that the second transaction is a time-consuming transaction, thus adding it to the task queue to await scheduling by the second process.

[0011] Secondly, a driving device is provided, which is applied to a drawing tool. The device includes: an acquisition module for acquiring a task queue to be executed by the drawing tool, the task queue including a first transaction and a second transaction; and an execution module for executing a second transaction by driving a second process of the drawing tool during an idle time period while the first process of the drawing tool is executing the first transaction, the idle time period being the idle time period during the execution of the first transaction by the first process.

[0012] In one possible implementation, the second transaction is the transaction that needs to call the interface of the drawing tool.

[0013] In one possible implementation, the second transaction includes at least one of the following: drawing file download, drawing file loading, drawing file check-in / check-out, drawing file parameter write-back, drawing file backup, drawing file specification check, remote startup of drawing file, and drawing file feature parsing.

[0014] In one possible implementation, the second transaction includes drawing file backup, and an execution module is used to: drive a second process to traverse the drawing files in memory during idle periods; create a copy of the drawing file in memory if the drawing file has been modified; save the copy to disk and delete it from memory.

[0015] In one possible implementation, the execution module is configured to: drive a first process to execute a first transaction; drive a second process to execute a second transaction during an idle period when the first process is executing the first transaction; and drive the first process to continue executing the second transaction if the first process has completed the first transaction but the second process has not completed the second transaction.

[0016] In one possible implementation, the first transaction includes downloading the drawing file, and the second transaction includes loading the drawing file; the execution module is configured to: download the drawing file from the server by driving the first process; if part of the drawing file has been downloaded, load a portion of the drawing file into the drawing tool by driving the second process during an idle period; if the first process has finished downloading the drawing file and the second process has not finished loading the drawing file, load another portion of the drawing file into the drawing tool by driving the first process.

[0017] In one possible implementation, the acquisition module is configured to: determine whether the second transaction interacts with the drawing tool in response to a triggering operation on the second transaction during the execution of the first transaction by driving the first process; and add the second transaction to the task queue if the second transaction interacts with the drawing tool.

[0018] Thirdly, an electronic device is provided for implementing the method of the first aspect.

[0019] Fourthly, a driving system is provided, which includes a drawing tool for implementing the method of the first aspect.

[0020] Fifthly, a computer program (product) is provided, comprising: computer program code, which, when executed by a computer, causes the computer to perform the methods described in the above aspects.

[0021] In a sixth aspect, a computer-readable storage medium is provided that stores a program or instructions, wherein when the program or instructions are run on a computer, the methods described in the preceding aspects are executed.

[0022] In a seventh aspect, a chip is provided, including a processor for retrieving and executing instructions stored in a memory, causing a computer equipped with the chip to perform the methods described in the preceding aspects.

[0023] Eighthly, another chip is provided, comprising: an input interface, an output interface, a processor, and a memory, wherein the input interface, the output interface, the processor, and the memory are connected via an internal connection path, the processor is used to execute code in the memory, and when the code is executed, a computer with the chip installed performs the methods in the above aspects.

[0024] It should be understood that the beneficial effects of the technical solutions and corresponding possible implementations of the second to eighth aspects of this application can be found in the above description of the technical effects of the first aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description

[0025] Figure 1 A flowchart illustrating a multi-process driving method for drawing files provided in related technologies;

[0026] Figure 2 A flowchart illustrating a multi-process driving method for drawing files provided in an embodiment of this application;

[0027] Figure 3 A flowchart illustrating another method for driving multiple processes of drawing files provided in an embodiment of this application;

[0028] Figure 4 A flowchart illustrating another method for driving multiple processes of drawing files provided in an embodiment of this application;

[0029] Figure 5 A flowchart illustrating another method for driving multiple processes of drawing files provided in an embodiment of this application;

[0030] Figure 6 A flowchart illustrating another method for driving multiple processes of drawing files provided in an embodiment of this application;

[0031] Figure 7 A flowchart illustrating another method for driving multiple processes of drawing files provided in an embodiment of this application;

[0032] Figure 8 A flowchart illustrating another method for driving multiple processes of drawing files provided in an embodiment of this application;

[0033] Figure 9 A flowchart illustrating another method for driving multiple processes of drawing files provided in this application embodiment;

[0034] Figure 10 A schematic diagram of a multi-process driving device for drawing files provided in an embodiment of this application;

[0035] Figure 11 This is a schematic diagram of a drive system provided in an embodiment of this application. Detailed Implementation

[0036] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.

[0037] Drawing tools, especially 3D drawing tools, need to handle time-consuming tasks during the drawing process, such as downloading drawing files, checking in and out of drawing files, writing back parameters of drawing files, and backing up drawing files. However, the main process of the drawing tool does not support the parallel execution of multiple threads within the main process, resulting in the need to execute multiple tasks sequentially. For example, the drawing tool drives the main process. During its execution, the main process sequentially schedules multiple processes (e.g., processes 1 to n, where n is a positive integer greater than 1) to run the aforementioned tasks. For example, after process 1 completes, process 2 runs, and so on, until process n runs. Therefore, the total execution time is the sum of the execution times of each task. For example, Figure 1 This is a flowchart illustrating a multi-process driving method for drawing files provided in related technologies. For example... Figure 1 As shown, the drawing tool drives the main process (i.e., the first process) to execute transaction 1. After executing transaction 1, the drawing tool drives the main process to execute transaction 2. Therefore, the execution time t of the main process is the sum of the execution times of transaction 1 and transaction 2. It is evident that scheduling multiple transactions driven by the main process results in long execution times, severe software interface lag, and prolonged user wait times, significantly impacting the design efficiency of the drawing files.

[0038] To address the aforementioned technical problems, this application provides a multi-process driving method for drawing files. This method can be applied to drawing tools. The method includes obtaining a task queue to be executed by the drawing tool, the task queue including a first transaction and a second transaction. While driving the first process of the drawing tool to execute the first transaction, a second process is driven to execute the second transaction during an idle time period, where the idle time period is the idle time period during the execution of the first transaction by the first process. In this way, by driving one process to execute one transaction while driving another process to execute another transaction during an idle time period, multiple processes can be driven to execute transactions in parallel simultaneously, fully utilizing the idle time period of the drawing tool itself, thereby reducing the total execution time of multiple transactions and improving the design efficiency of the drawing file.

[0039] This application introduces asynchronous processes. Figure 2 A flowchart illustrating a multi-process driving method for drawing files provided in this application embodiment is shown below. Figure 2 As shown, the drawing tool can drive multiple processes to schedule the aforementioned transactions. For example, these multiple processes can include a first process and a second process. The drawing tool drives the first process to execute one of the aforementioned transactions, i.e., transaction 1. While the first process is executing transaction 1, the drawing tool drives the second process to execute the other transaction, i.e., transaction 2, during idle periods. This means that while the first process is executing transaction 1, the second process is also executing transaction 2, achieving simultaneous parallel execution of transactions by multiple processes. Therefore, the total execution time t is greater than or equal to the execution time of the first process, and less than the sum of the execution times of the two processes (the first process and the second process), as shown below. Figure 2 As shown, the total execution time t is significantly less than Figure 1 The duration t1+t2 shown is sufficient. It is evident that this reduces the total execution time of multiple transactions, thus improving the design efficiency of the drawing files.

[0040] In some embodiments, if the first process completes the first transaction but the second process does not complete the second transaction, the first process is driven to execute the unfinished portion of the second transaction. For example, the second transaction includes a first part and a second part. While driving the first process to execute the first transaction, the second process is driven to execute the second transaction. If the first process completes the first transaction, the second process completes the first part of the second transaction but not the second part. At this point, driving the first process to execute the second part of the second transaction allows different parts of the same transaction to be executed in parallel, achieving a multi-process scheduling splitting operation, which can effectively improve execution efficiency, even by up to 60%. Moreover, the multi-process scheduling splitting operation is performed without the user's awareness, achieving a user-unobtrusive operation.

[0041] Of course, the execution entity of the multi-process driving method for drawing files provided in this application embodiment can also be an electronic device that has the above-mentioned drawing tools installed or integrated. In this application embodiment, the drawing tools are used as an example for description. The above-mentioned drawing tools can be understood as three-dimensional drawing tools, which may include, but are not limited to, three-dimensional design software such as computer-aided design (CAD).

[0042] The following describes in detail, with reference to examples, a multi-process driving method for drawing files provided in this application. Figure 3 This is a flowchart illustrating a multi-process driving method for drawing files provided in an embodiment of this application. Figure 3 As shown, this method is applied to a drawing tool and may include S301-S302.

[0043] S301. Obtain the task queue to be executed by the drawing tool. The task queue includes the first transaction and the second transaction.

[0044] The first and second transactions can be different parts of the same transaction or different transactions; this application does not specifically limit this. The first transaction can be a time-consuming transaction or a time-free transaction. The second transaction is a time-consuming transaction. For example, the second transaction can be a transaction that requires calling the interface of the drawing tool, meaning that the second transaction needs to occupy the resources of the drawing tool. That is, the drawing tool needs to occupy the time of the drawing tool when the driving process executes the second transaction. In this way, the more time-consuming transaction is executed during the idle time period of the drawing tool, without waiting for execution, effectively reducing the total execution time of multiple transactions and improving efficiency.

[0045] For example, the second transaction may include at least one of the following: drawing file download, drawing file loading, drawing file check-in / check-out, drawing file parameter write-back, drawing file backup, drawing file specification check, remotely launching a drawing file, and drawing file feature parsing. Here, drawing file download can be understood as the drawing tool needing to obtain a drawing file from a server. Drawing file loading can be understood as the drawing tool caching or storing the obtained drawing file on the device where the drawing tool resides. Drawing file check-in / check-out can be understood as the acquisition of drawing files from outside the device (check-in), which needs to be recorded, registered, or marked for the device to track and manage. Conversely, the removal of drawing files from the device (check-out) also needs to be recorded, registered, or marked for the device to track and manage, ensuring the compliant and orderly flow of documents or resources, and improving security and traceability. Drawing file parameter write-back can be understood as follows: during the drawing and design process, when user 1 modifies the parameters of a drawing file using drawing tools, the updated parameters need to be synchronized to the server. If the updated parameters are not uploaded to the server, when user 2 opens the same drawing file, inconsistencies in parameters will occur. In this case, the latest parameters need to be retrieved from the server and written to the old drawing file. Drawing file backup can be understood as backing up drawing files on the device. Drawing file standardization check can be understood as checking the standardization of drawing files. Remote drawing file launch can be understood as multiple users on different devices requesting to launch a specific drawing file from the server using their accounts. Drawing file feature parsing can be understood as analyzing the correlation or interrelationship of connected parts in a drawing file.

[0046] The task queue contains multiple pending transactions, which can be either time-consuming or non-time-consuming. If the task queue includes time-consuming transactions, how can these time-consuming transactions be identified and added to the task queue? For example, during the execution of the first transaction by the first process, in response to a triggering operation on the second transaction, it is determined whether the second transaction interacts with the drawing tool. If the second transaction interacts with the drawing tool, it is added to the task queue. For example, the second transaction is downloading a drawing file. A control for downloading the drawing file is displayed on the drawing tool's interface. When the user clicks this control, the device containing the drawing tool responds to the user's click operation and determines that "downloading the drawing file" requires calling the drawing tool's interface, thus confirming an interaction between "downloading the drawing file" and the drawing tool. At this point, the drawing tool adds "downloading the drawing file" to the task queue, waiting to be scheduled during idle time.

[0047] S302. During the execution of the first transaction by the first process driving the drawing tool, the second transaction is executed by the second process driving the drawing tool during the idle time period.

[0048] The idle time period refers to the idle time period during the execution of the first transaction by the first process. This means that the idle time period is a collection of fragmented idle times during the execution of the first transaction by the first process. For example, during the process of a user drawing on the interface of a drawing tool, the interval between the user performing operation 1 and operation 2 can be determined as fragmented idle time. As another example, during the process of a user drawing on the interface of a drawing tool, if the user is thinking and not performing any operation, the time the user is thinking can be determined as fragmented idle time. Of course, the embodiments in this application are not limited to the examples listed above, and will not be listed one by one here.

[0049] Exemplarily, a detailed description is provided of the method for driving multiple processes of drawing files provided in the embodiments of this application using a drawing tool. Figure 4 This is a flowchart illustrating a multi-process driving method for drawing files provided in an embodiment of this application. Figure 4 As shown, the drawing tool drives the main process (i.e., the first process) to run its user interface design (UI) thread, which creates the user interface. A daemon process runs to handle task scheduling. When the user's operation meets the scheduling conditions, the drawing tool drives an asynchronous process (i.e., the second process) to run. The asynchronous process starts running and initializes the configuration file and command-line modules. Then, the asynchronous process enters a transaction loop to generate a task queue. For example, when the user triggers a drawing file download operation on the interface, it's determined that "drawing file download" requires calling the drawing tool's interface, thus establishing an interaction between "drawing file download" and the drawing tool. At this point, "drawing file download" is added to the task queue. Therefore, the task queue can include transactions such as "drawing file download," "drawing file loading," "drawing file backup," etc. When the drawing tool is in an idle period, it drives the second process to execute one or more transactions in the task queue. After a transaction is completed, the task queue is updated. When the drawing tool is in the next idle period, it polls the task queue to drive the second process to execute another one or more transactions in the task queue. This continues until the drawing file is completed. It is evident that multi-process scheduling of transactions can effectively prevent crashes caused by multi-threaded parallel scenarios, effectively solve the problem of UI thread lag, and improve user experience.

[0050] In this application, by driving one process to execute a transaction while driving another process to execute another transaction during an idle time period, it is possible to drive multiple processes to execute transactions in parallel, making full use of the idle time period of the drawing tool itself, thereby reducing the total time of multiple transactions and improving the design efficiency of drawing files.

[0051] In the above embodiments, the first process executes the first transaction, and the second process executes the second transaction. After the first process completes the first transaction, it can execute the third transaction. Of course, after the first process completes the first transaction, it can also execute the unfinished portion of the second transaction. For example, if the first process completes the first transaction but the second process has not completed the second transaction, the first process can be driven to continue executing the second transaction. Therefore, even if the second process has not completed the second transaction, the first process can continue executing the second transaction after completing the first transaction, allowing different parts of the same transaction to be executed in parallel, thus improving the performance of the drawing tool.

[0052] For example, a drawing tool can drive multiple processes to schedule the aforementioned transactions. If one process completes the first transaction while another process has not yet completed the second transaction, one process can continue executing the second transaction that the other process has not yet completed. For example, as... Figure 5 As shown, multiple processes can include a first process and a second process. The drawing tool drives the first process to execute one of the aforementioned transactions, namely transaction 1. While the first process is executing transaction 1, the drawing tool drives the second process to execute the other transaction, namely transaction 2, during idle periods. This means that while the first process is executing transaction 1, the second process is also executing transaction 2, achieving simultaneous parallel execution of transactions by multiple processes. However, after the first process completes transaction 1, it finds that the second process has only completed the first part of transaction 2. Therefore, the first process is driven to continue executing the second part of transaction 2. Thus, the total execution time t2 is the sum of the time the first process takes to execute transaction 1 and the time the first process takes to execute the second part of transaction 2. The total execution time t2 is significantly less than [the time required for the first process to execute transaction 1]. Figure 1 The duration t shown illustrates that reducing the total time for multiple transactions improves the design efficiency of drawing files.

[0053] The following describes in detail the multi-process driving method for drawing files provided in the embodiments of this application, combined with specific scenarios.

[0054] Scenario 1: Drawing file backup scenario.

[0055] For example, the second transaction could include backing up drawing files. Then, as... Figure 6As shown, S302 can be implemented as follows: S3021, during the idle period, drive the second process to traverse the drawing files in memory. S3022, determine whether the drawing files have been modified. If the drawing files have been modified, execute S303; if the drawing files have not been modified, terminate the process. S3023, if the drawing files have been modified, create a copy of the drawing files in memory. S3024, save the copy to disk and delete it from memory. In the drawing file backup scenario, the drawing file backup function can be independent of the drawing tool, making up for the lack of backup function in the drawing tool, and effectively avoiding the problem of drawing file loss due to unpredictable factors causing the drawing tool to crash.

[0056] Before executing S3021, the drawing tools also perform the following steps, such as... Figure 7 As shown, the drawing tool starts, registers an account, and runs the task manager. The drawing tool polls the task manager to see if a session process exists. If no session process exists, it starts an asynchronous process (i.e., the second process). The asynchronous process starts and initializes the configuration file, initializes the working directory to set the process context, creates the initial database, and performs other operations. Then, the drawing tool drives the asynchronous process into a transaction loop to generate a task queue. For example, when a user triggers a drawing file download operation on the interface, it is determined that "drawing file download" requires calling the drawing tool's interface, thus confirming an interaction between "drawing file download" and the drawing tool, or in other words, "drawing file download" needs to connect to the drawing tool. At this time, "drawing file download" is added to the task queue. Therefore, the task queue can include transactions such as "drawing file download," "drawing file loading," "drawing file backup," etc. Then, S3021 is executed. When the drawing tool is in an idle period, it drives a thread in the second process to execute a transaction in the task queue, such as drawing file backup, as described above and will not be repeated here.

[0057] Scenario 2: Drawing file download and drawing file loading scenario.

[0058] For example, the first transaction may include downloading drawing files, and the second transaction may include loading drawing files. Then, as... Figure 8 As shown, S302 can be implemented as follows: S3025, downloading drawing files from the server by driving the first process. S3026, after downloading part of the drawing file, loading a portion of the drawing file into the drawing tool by driving the second process during an idle period. S3027, if the first process has finished downloading the drawing file and the second process has not finished loading the drawing file, loading another portion of the drawing file into the drawing tool by driving the first process.

[0059] like Figure 9As shown, the main process of the drawing tool requests drawing files from the server, which may include file A and file B. The server downloads files A and B based on this request; that is, the first process of the drawing tool executes the download of files A and B. After file A is downloaded, the drawing tool adds the drawing file loading transaction to the task queue. The first process of the drawing tool continues to download file B, while the second process of the drawing tool loads file A. After the first process of the drawing tool completes the download of files A and B, it finds that the second process of the drawing tool has not finished loading file A, so the first process of the drawing tool loads file B. After the first process loads file B, the second process of the drawing tool executes the operation of writing back the drawing file. Additionally, after the first process loads file B, the user can operate the drawing tool.

[0060] As can be seen, in this scenario, the first process handles the downloading of the drawing file, while the second process handles the loading of the drawing file. After the first process finishes downloading the drawing file, it can load the unloaded parts of the drawing file, allowing different parts of the same transaction to be executed in parallel, thus improving the performance of the drawing tool in launching drawing files, i.e., the drawing opening performance. Furthermore, the multi-process scheduling and routing operations can effectively improve execution efficiency, even by up to 60%. Moreover, the multi-process scheduling and routing operations are performed without the user's awareness, achieving a seamless user experience.

[0061] The above describes a multi-process driving method for drawing files provided in embodiments of this application. Corresponding to the above method, embodiments of this application also provide a multi-process driving device for drawing files. This device is applied to a drawing tool. This device is used to drive... Figure 10 Each module shown performs the above... Figure 3 The multi-process driving method for drawing files executed by Chinese drawing tools. For example... Figure 10 As shown, the multi-process driving device 1000 for drawing files provided in this application embodiment includes the following modules.

[0062] The acquisition module 1001 is used to acquire the task queue to be executed by the drawing tool. The task queue includes the first transaction and the second transaction.

[0063] The execution module 1002 is used to execute a second transaction by driving a second process of the drawing tool during an idle time period while the first process of the drawing tool is executing the first transaction. The idle time period is the idle time period during the execution of the first transaction by the first process.

[0064] In this embodiment, by driving one process to execute one transaction while driving another process to execute another transaction during an idle time period, it is possible to drive multiple processes to execute transactions in parallel, making full use of the idle time period of the drawing tool itself, thereby reducing the total time of multiple transactions and improving the design efficiency of drawing files.

[0065] In one possible implementation, the second transaction is one that requires calling the drawing tool's interface. This means that the second transaction needs to consume the drawing tool's resources; that is, the drawing tool needs to use its time to execute the second transaction while the driving process is running. In this way, the more time-consuming transaction is executed during the drawing tool's idle time slots, without waiting for execution, effectively reducing the total execution time of multiple transactions and improving efficiency.

[0066] In one possible implementation, the second transaction includes at least one of the following: drawing file download, drawing file loading, drawing file check-in / check-out, drawing file parameter write-back, drawing file backup, drawing file specification check, remote startup of drawing file, and drawing file feature parsing.

[0067] In one possible implementation, the second transaction includes drawing file backup. Execution module 1002 is used to: drive a second process to traverse the drawing files in memory during idle periods; create a copy of the drawing file in memory if the drawing file has been modified; save the copy to disk; and delete it from memory. In the drawing file backup scenario, the drawing file backup function can be independent of the drawing tool, compensating for the lack of backup functionality in the drawing tool and effectively avoiding the problem of drawing file loss due to unforeseen factors causing the drawing tool to crash.

[0068] In one possible implementation, the execution module 1002 is used to: drive a first process to execute a first transaction; drive a second process to execute a second transaction during the idle time period of the first process executing the first transaction; and drive the first process to continue executing the second transaction if the first process has completed the first transaction but the second process has not completed the second transaction. This allows different parts of the same transaction to be executed in parallel, realizing the multi-process scheduling and diversion operation, which can effectively improve execution efficiency, even by 60%. Moreover, the multi-process scheduling and diversion operation is performed without the user's awareness, achieving a user-unobtrusive operation.

[0069] In one possible implementation, the first transaction includes downloading drawing files, and the second transaction includes loading drawing files. The execution module 1002 is used to: drive the first process to download drawing files from the server; if part of the drawing file has been downloaded, load a portion of the drawing file into the drawing tool during an idle period by driving the second process; if the first process has finished downloading the drawing file, but the second process has not finished loading the drawing file, load the remaining portion of the drawing file into the drawing tool by driving the first process. In this scenario, the first process performs the transaction of downloading drawing files, and the second process performs the transaction of loading drawing files. After the first process finishes downloading the drawing file, it can execute the loading of the unloaded portion of the drawing file, allowing different parts of the same transaction to be executed in parallel, improving the performance of the drawing tool in launching drawing files, i.e., the performance of opening drawings. Furthermore, the multi-process scheduling and routing operation can effectively improve execution efficiency. Moreover, the multi-process scheduling and routing operation is performed without the user's awareness, achieving a user-unobtrusive operation.

[0070] In one possible implementation, the acquisition module 1001 is used to: determine whether the second transaction has an interaction relationship with the drawing tool in response to the triggering operation of the second transaction during the process of driving the first process to execute the first transaction; and add the second transaction to the task queue if the second transaction has an interaction relationship with the drawing tool.

[0071] It should be understood that the above Figure 10 The beneficial effects that the provided device possesses in performing its function are... Figure 10 The multi-process drive mechanism provided with the drawing files has the same beneficial effects, which will not be elaborated here. Additionally, Figure 10 The provided device, in implementing its functions, is only illustrated by the above-described division of functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the device provided in the above embodiments and the device embodiments belong to the same concept, and their specific implementation process is detailed in the device embodiments, which will not be repeated here.

[0072] See Figure 11 , Figure 11 A schematic diagram of the structure of an exemplary electronic device 1100 of this application is shown. The electronic device 1100 includes at least one processor 1101, a memory 1103, and at least one network interface 1104.

[0073] Processor 1101 may be, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a GPU, a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits or application-specific integrated circuits (ASICs), programmable logic devices (PLDs), other general-purpose processors or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components, or any combination thereof for implementing the scheme of this application. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor. It is worth noting that the processor may be a processor supporting an advanced reduced instruction set machine (RISC) machine (ARM) architecture. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0074] Optionally, the electronic device 1100 also includes a bus 1102. The bus 1102 is used to transmit information between the various components of the electronic device 1100. The bus 1102 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 1102 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 11 The symbol is represented by only one line, but this does not mean that there is only one bus or one type of bus.

[0075] The memory 1103 may be, for example, volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache.

[0076] By way of example, but not limitation, many forms of ROM and RAM are available. For example, ROM is a compact disc read-only memory (CD-ROM). RAM includes, but is not limited to, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0077] The memory 1103 may also be other types of storage devices capable of storing static information and instructions. Alternatively, it may be other types of dynamic storage devices capable of storing information and instructions. It may also be other optical disc storage, optical disk storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. The memory 1103 may exist independently, for example, and be connected to the processor 1101 via bus 1102. The memory 1103 may also be integrated with the processor 1101.

[0078] Network interface 1104 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), or wireless local area network (WLAN). Network interface 1104 may include wired network interfaces and wireless network interfaces. Specifically, network interface 1104 can be an Ethernet interface, such as Fast Ethernet (FE), Gigabit Ethernet (GE), Asynchronous Transfer Mode (ATM), WLAN, cellular network, or combinations thereof. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. In some embodiments of this application, network interface 1104 can be used by electronic device 1100 to communicate with other devices.

[0079] In specific implementations, as some embodiments, the processor 1101 may include one or more CPUs, such as Figure 11 The CPU0 and CPU1 shown are examples of processors. Each of these processors can be a single-core processor or a multi-core processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0080] In specific implementations, as some embodiments, the electronic device 1100 may include multiple processors, such as Figure 11 The processors 1101 and 1105 shown are illustrated. Each of these processors may be a single-core processor or a multi-core processor. Here, "processor" may refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0081] In some embodiments, memory 1103 is used to store program instructions 1110 for executing the scheme of this application, and processor 1101 can execute the program instructions 1110 stored in memory 1103. That is, electronic device 1100 can implement the device provided in the device embodiment through processor 1101 and program instructions 1110 in memory 1103, i.e. Figure 11 The execution device. The program instructions 1110 may include one or more software modules. Optionally, the processor 1101 itself may also store program instructions for executing the scheme of this application.

[0082] In specific implementation, the electronic device 1100 of this application can correspond to a first network element device for executing the above-mentioned device. The processor 1101 in the electronic device 1100 reads the instructions in the memory 1103 and makes... Figure 11 The electronic device 1100 shown is capable of performing all or part of the steps in the device embodiment.

[0083] Electronic device 1100 can also correspond to the device shown in the multi-process driver of the above-mentioned drawing file, where each functional module is implemented by software of electronic device 1100. In other words, the functional modules included in the device shown in the multi-process driver of the drawing file are generated by the processor 1101 of electronic device 1100 after reading the program instructions 1110 stored in memory 1103.

[0084] in, Figure 11 Each step of the illustrated device is completed by the integrated logic circuitry of the hardware or by instructions in the form of software in the processor of the electronic device 1100. The steps of the device embodiments disclosed in this application can be directly implemented by the hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other storage media mature in the art. Since this storage medium is located in memory, the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above-described device embodiments. To avoid repetition, these steps will not be described in detail here.

[0085] In an exemplary embodiment, an electronic device is provided for performing... Figure 3 The methods performed by the drawing tools in the text.

[0086] In an exemplary embodiment, a driving system is provided, the system including a drawing tool, the drawing tool being used to perform... Figure 3 The method shown.

[0087] In an exemplary embodiment, a computer program (product) is provided, comprising: computer program code, which, when executed by a computer, causes the computer to perform... Figure 3 The method in the middle.

[0088] In an exemplary embodiment, a computer-readable storage medium is provided that stores a program or instructions, which, when executed on a computer, cause the computer to perform the aforementioned actions. Figure 3 The method in the middle.

[0089] In an exemplary embodiment, a chip is provided, including a processor for recalling and executing instructions stored in memory, causing a computer with the chip installed to perform... Figure 3 The method in the middle.

[0090] In an exemplary embodiment, another chip is provided, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected via internal interconnection paths. The processor is used to execute code in the memory. When the code is executed, a computer with the chip installed performs... Figure 3 The method in the middle.

[0091] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive).

[0092] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the setting results involved in this application were obtained with full authorization.

[0093] Those skilled in the art will recognize that the method steps and modules described in conjunction with the embodiments disclosed herein can be implemented in software, hardware, firmware, or any combination thereof. To clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0094] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0095] When implemented using software, it can be implemented wholly or partially as a computer program product. This computer program product includes one or more computer program instructions. As an example, the methods of this application embodiment can be described in the context of machine-executable instructions, such as program modules that execute on a device on a real or virtual processor of the target. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., which perform specific tasks or implement specific abstract data structures. In various embodiments, the functionality of program modules can be combined or divided among the described program modules. The machine-executable instructions for the program modules can execute within a local or distributed device. In a distributed device, the program modules can reside on both local and remote storage media.

[0096] Computer program code used to implement the methods of the embodiments of this application may be written in one or more programming languages. This computer program code may be provided to the processor of a determined device of a general-purpose computer, a special-purpose computer, or other programmable agent node, such that when executed by the computer or other programmable agent node, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a computer, partially on a computer, as a standalone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server.

[0097] In the context of the embodiments of this application, computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, etc.

[0098] Examples of signals may include electrical, optical, radio, sound, or other forms of propagation signals, such as carrier waves, infrared signals, etc.

[0099] A machine-readable medium can be any tangible medium that contains or stores programs for or relating to an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. More detailed examples of machine-readable storage media include electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0100] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be found in the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0101] In the embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or modules, or they may be electrical, mechanical, or other forms of connection.

[0102] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0103] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0104] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0105] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items that have substantially the same function and purpose. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or order of execution. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms. These terms are merely used to distinguish one element from another. For example, without departing from the various examples described, a first image can be referred to as a second image, and similarly, a second image can be referred to as a first image. Both the first image and the second image can be images, and in some cases, they can be separate and distinct images.

[0106] It should also be understood that, in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0107] In this application, the term "at least one" means one or more, and the term "multiple" means two or more. For example, multiple second messages refer to two or more second messages. The terms "system" and "network" are often used interchangeably in this document.

[0108] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0109] It should also be understood that the term "and / or" as used herein refers to and covers any and all possible combinations of one or more of the associated listed items. The term "and / or" describes an association between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects are in an "or" relationship.

[0110] It should also be understood that the term “comprising” (also referred to as “includes”, “including”, “comprises” and / or “comprising”) as used in this specification specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0111] It should also be understood that the terms “if” and “if” can be interpreted as meaning “when” or “upon”, or “in response to determination” or “in response to detection”. Similarly, depending on the context, the phrases “if determination…” or “if detection [the stated condition or event]” can be interpreted as meaning “when determination…”, or “in response to determination…”, or “when detection [the stated condition or event]” or “in response to detection [the stated condition or event]”.

[0112] It should be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.

[0113] It should also be understood that the phrases "an embodiment," "an embodiment," and "a possible implementation" used throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment or implementation is included in at least one embodiment of this application. Therefore, the phrases "in an embodiment," "an embodiment," or "a possible implementation" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

Claims

1. A multi-process driving method for drawing files, characterized in that, The method is applied to a drawing tool, and the method includes: Obtain the task queue to be executed by the drawing tool, the task queue including a first transaction and a second transaction; During the execution of the first transaction by the first process of the drawing tool, the second transaction is executed by the second process of the drawing tool during an idle time period, wherein the idle time period is the idle time period during the execution of the first transaction by the first process.

2. The method according to claim 1, characterized in that, The second transaction is the transaction that needs to call the interface of the drawing tool.

3. The method according to claim 1 or 2, characterized in that, The second transaction includes at least one of the following: drawing file download, drawing file loading, drawing file check-in / check-out, drawing file parameter write-back, drawing file backup, drawing file specification check, remotely starting a drawing file, and drawing file feature parsing.

4. The method according to any one of claims 1-3, characterized in that, The second transaction includes backing up drawing files. The execution of the second transaction during an idle period by driving a second process of the drawing tool includes: During the idle time period, the second process is driven to traverse the drawing files in memory; If the drawing file is modified, a copy of the drawing file is created in memory. The copy is saved to disk and then deleted from memory.

5. The method according to any one of claims 1-3, characterized in that, The step of executing the second transaction by driving the second process of the drawing tool during the idle time period during the first process of driving the drawing tool to execute the first transaction includes: The first transaction is executed by driving the first process; During the idle time period when the first process executes the first transaction, the second process is driven to execute the second transaction; If the first process has completed the first transaction but the second process has not completed the second transaction, the first process is driven to continue executing the second transaction.

6. The method according to claim 5, characterized in that, The first transaction includes downloading drawing files, and the second transaction includes loading drawing files; The step of driving the first process to execute the first transaction includes: The first process is driven to download drawing files from the server; The step of driving the second process to execute the second transaction during the idle time period when the first process executes the first transaction includes: After downloading part of the drawing file, during the idle time period, a portion of the drawing file is loaded into the drawing tool by driving the second process. The step of driving the first process to continue executing the second transaction when the first process has completed the first transaction but the second process has not completed the second transaction includes: If the first process has finished downloading the drawing file, but the second process has not finished loading the drawing file, the first process is driven to load another part of the drawing file into the drawing tool.

7. The method according to any one of claims 1-6, characterized in that, The step of obtaining the task queue to be executed by the drawing tool includes: During the process of driving the first process to execute the first transaction, in response to the triggering operation of the second transaction, it is determined whether the second transaction has an interaction relationship with the drawing tool; If the second transaction interacts with the drawing tool, the second transaction is added to the task queue.

8. A driving device, characterized in that, The device is used with a drawing tool, and the device includes: The acquisition module is used to acquire the task queue to be executed by the drawing tool, the task queue including a first transaction and a second transaction; The execution module is configured to execute the second transaction by driving the second process of the drawing tool during an idle time period while the first process of the drawing tool is executing the first transaction, wherein the idle time period is the idle time period during the execution of the first transaction by the first process.

9. An electronic device, characterized in that, The electronic device is used to implement the method described in any one of claims 1-7.

10. A drive system, characterized in that, The driving system includes a drawing tool, which is used to implement the method described in any one of claims 1-7.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement the method as described in any one of claims 1-7.

12. A computer program product, characterized in that, The computer program product includes a computer program / instruction that is executed by a processor to cause a computer to perform the method described in any one of claims 1-7.