Remote Transaction Processing Method and System Based on Revit Engine Service Deployment

CN122412110BActive Publication Date: 2026-09-18ZHEJIANG JIAOTONG UNIVERSITY ENGINEERING DIGITAL TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610845883.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-12
Publication Date
2026-09-18
Estimated Expiration
2046-06-12

AI Technical Summary

Technical Problem

然而,该类方案通常不涉及Revit事务处理能力的远程服务化执行,也不具备基于无界面Revit运行环境的自动事务调度机制,难以满足工程场景下批量模型计算、自动参数更新及远程模型计算服务的需求

Benefits of technology

[0031]Compared to existing technologies, this invention eliminates the need for clients to run Revit software locally, significantly reducing terminal device resource consumption and improving the efficiency and automation of complex BIM model transaction processing. Furthermore, unlike existing BIM collaborative modeling platforms, this invention is not geared towards multi-user online parametric modeling and collaborative design, but rather towards remote invocation, automatic scheduling, and centralized calculation of Revit transaction execution capabilities. It is applicable to various BIM models, including bridges, buildings, and municipal engineering projects, for remote parameter updates, quantity calculations, model transaction execution, and automated model calculation services. This invention further establishes a Revit instance pool mechanism to achieve pre-startup and unified management of multiple interfaceless Revit instances. When multiple transaction tasks are submitted simultaneously, idle instances can be automatically allocated to execute the corresponding transaction tasks based on the task queue status, thereby improving system concurrency processing capabilities and reducing the time consumption caused by repeated Revit startups.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122412110B_ABST
    Figure CN122412110B_ABST
Patent Text Reader

Abstract

This invention discloses a remote transaction processing method and system based on Revit engine service-oriented deployment. The client submits model transaction processing requests to the server through a web interface. The server writes the transaction tasks into a task queue and automatically allocates idle Revit instances to execute the corresponding transaction operations. The Revit instance automatically loads the target BIM model file, establishes the transaction processing environment, and performs operations such as model parameter modification, transaction commit, model update, and quantity calculation. The server automatically extracts the model result data and returns it to the client through the web interface, and releases the corresponding Revit instance resources. This allows the client to complete BIM model transaction processing without running Revit software locally. Through task scheduling and the Revit instance pool mechanism, the automatic scheduling and concurrent execution of multiple transaction tasks are realized, improving the efficiency of complex BIM model transaction processing and system resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention pertains to the model calculation and engineering software service-oriented approach of Building Information Modeling (BIM), specifically involving a remote transaction processing method and system based on Revit engine service-oriented deployment. Background Technology

[0002] With the development of Building Information Modeling (BIM) technology, the model calculation, parameter update, quantity surveying, and transaction processing capabilities based on the Revit platform have been widely applied in fields such as architecture, municipal engineering, and bridge engineering. In current engineering applications, model transaction processing usually requires the local installation and running of Revit software. Users need to start the Revit client on their local computer and load the model file, and then perform operations such as parameter modification, model calculation, and transaction submission through manual operation or plug-in programs.

[0003] Because Revit model files are large, and the model loading, transaction execution, and result calculation processes consume a lot of CPU, memory, and graphics resources, in complex or batch model calculation scenarios, problems such as high local device resource consumption and low transaction execution efficiency are likely to occur.

[0004] Currently, some engineering projects use Revit Server or collaborative management platforms to achieve model sharing and collaborative team design. This type of technical solution primarily targets multi-user collaborative editing of the same model, achieving data sharing and version management among team members through model synchronization mechanisms. Its core objective is to support collaborative modeling and maintain model consistency. However, this type of solution typically still requires each client to have Revit software installed and running locally. Transaction processing capabilities are still handled by the user's terminal device, making it impossible to remotely invoke Revit transaction capabilities or meet the needs of external business systems for automatically submitting model transaction tasks.

[0005] Furthermore, most existing Revit-based secondary development programs run within a plug-in environment, requiring users to manually open the Revit software and load the plug-in to execute the corresponding functions. For application scenarios requiring batch parameter updates, automatic quantity calculations, or remote invocation of model transaction capabilities, existing technologies suffer from low automation, complex deployment, significant manual intervention, and low resource utilization. When multiple users simultaneously initiate model transaction requests, they are also easily limited by local hardware performance and manual operation processes, making it difficult to form a unified Revit transaction processing service.

[0006] Existing cloud-based BIM solutions primarily focus on parametric modeling collaboration, model sharing, and multi-user online design, emphasizing collaborative editing and parametric design capabilities during model creation. However, these solutions typically lack remote service execution of Revit transaction processing capabilities and do not possess an automatic transaction scheduling mechanism based on a headless Revit runtime environment, making it difficult to meet the demands of batch model calculations, automatic parameter updates, and remote model calculation services in engineering scenarios. Summary of the Invention

[0007] To address the shortcomings of existing technologies and achieve the goal of automatically assigning, remotely executing, and providing result feedback for BIM model tasks without requiring local Revit software operation, thereby improving the automated calculation capabilities of BIM models and the level of Revit task services, this invention adopts the following technical solution:

[0008] A remote transaction processing method based on Revit engine service-oriented deployment, applied to the server side:

[0009] Obtain the transaction execution request data submitted by the client, and generate the transaction execution parameter Task_data containing Revit information, BIM model information and transaction execution requirements based on the request data;

[0010] A group of Revit instances corresponding to the Revit information are pre-started to establish a Revit instance resource pool and record the resource status information and task information of each instance.

[0011] Obtain the transaction execution parameters Task_data and Revit instance resource pool, establish a transaction task queue, allocate idle Revit instances according to the transaction task priority and the resource status information of the Revit instance, load the target BIM model corresponding to the BIM model information by calling the Revit instance, execute the transaction task of the corresponding BIM model, and form a Revit transaction execution environment Env_rvt with multiple Revit instances isolated;

[0012] In the Revit transaction execution environment Env_rvt, the request content in the transaction execution requirement, that is, the parameters required to operate the Revit instance, is matched and replaced with the construction parameters in the BIM model. Then, the transaction task and BIM model update are performed to obtain the updated BIM model Model_new.

[0013] The updated BIM model (Model_new) is regenerated using a Revit instance to generate transaction execution result data and send it to the client.

[0014] The transaction execution result data includes transaction execution information, BIM model information, and parameter set.

[0015] Furthermore, the pre-started Revit instances are multiple interface-less Revit instances to reduce the time consumption caused by repeated Revit starts during transaction task execution, improving the system's concurrent transaction processing capability. This is particularly beneficial when complex BIM models contain a large number of family instances and parameter linkages, reducing the probability of transaction commit failures. A dedicated task context running mode is employed, ensuring that the same instance executes only a single transaction task at a time, thereby reducing the probability of model document transaction conflicts and improving the reliability of concurrent transaction processing. Since there is no manual intervention during the interface-less instance operation, this invention can guarantee the atomicity of transactions during batch component parameter updates; that is, multiple parameters... Update request operations can be executed continuously within the same transaction context, avoiding the problem of missing modifications to some components during manual operations. Compared to traditional Revit transaction execution, which usually relies on fixed methods, the headless Revit instance can be deployed on virtual machines, containerized servers, or cloud computing nodes. When the number of transaction requests increases, the number of Revit instances can be dynamically expanded, achieving elastic scaling of transaction processing capabilities. Compared to the traditional local Revit plugin transaction execution method, which requires users to install the corresponding version of Revit software locally, this invention avoids transaction failures caused by differences in plugin version, family library version, or runtime environment, reducing the impact of version environment differences in remote collaboration scenarios.

[0016] Furthermore, before pre-start, the background runtime environment of the headless Revit instance is initialized to obtain the object used to establish the transaction execution context; after the Revit instance loads the target BIM model, the BIM model document object Document and the transaction execution context Transaction are established, and the transaction task is executed in the allocated idle Revit instance through the passed request execution content. After the transaction task is completed, the executed parameters are returned.

[0017] Furthermore, the target BIM model name, Revit version, transaction type, output result type, user number, and request content in the transaction execution request data are read and encoded to avoid command line parameter parsing errors caused by incorrect transaction parameter data format. After structured encapsulation, the transaction execution parameter Task_data is obtained, and an independent transaction task identifier is generated based on the request time and user number, thereby avoiding duplicate task numbers in high-concurrency transaction scenarios.

[0018] Furthermore, the priority of the transaction task is derived from factors including user request type, model complexity, user level, transaction type, and waiting time.

[0019] Furthermore, the resource status information includes running information and resource occupancy information. Based on the priority of the transaction task, a Revit instance with an idle resource occupancy status and the same Revit version is selected from the Revit instance resource pool. After loading the target BIM model, the resource occupancy information of the Revit instance is changed to busy. After the transaction task is completed, the resource occupancy information of the current Revit instance is changed back to idle.

[0020] Furthermore, the pre-configured Revit transaction template and the currently requested Revit actual transaction task are copied to the current task directory. The currently requested Revit actual transaction task includes the pre-configured content and the requested content, in order to avoid file lock conflicts, plugin resource competition and other related problems caused by multiple transaction tasks running at the same time.

[0021] Furthermore, an instance heartbeat detection mechanism is established to periodically check on the server side whether the Revit process exists, whether the transaction continues to run, whether the BIM model responds, whether the standard output log is updated, and whether memory is growing abnormally. This is used to determine whether the instance is running abnormally, so as to terminate the abnormal instance and restart the corresponding new instance.

[0022] A remote transaction processing method based on Revit engine service-oriented deployment, applied to the client:

[0023] The server submits a transaction execution request to the server, enabling the server to generate transaction execution parameters (Task_data) containing Revit information, BIM model information, and transaction execution requirements based on the request data. It also pre-starts a set of Revit instances corresponding to the Revit information to establish a Revit instance resource pool and records the resource status and task information of each instance. Based on the transaction execution parameters (Task_data) and the Revit instance resource pool, a transaction task queue is established. Idle Revit instances are allocated according to the transaction task priority and the resource status information of the Revit instances. The server then loads the necessary data by calling the Revit instances. The target BIM model corresponding to the IM model information executes the corresponding BIM model's transaction tasks, forming a Revit transaction execution environment Env_rvt isolated from multiple Revit instances. Within the Revit transaction execution environment Env_rvt, the request content in the transaction execution requirements—that is, the parameters required to operate the Revit instance—is matched and replaced with the construction parameters in the BIM model. The transaction task and BIM model update are then executed, resulting in the updated BIM model Model_new. Finally, a regeneration operation is performed on the updated BIM model Model_new through the Revit instance to generate the transaction execution result data.

[0024] Retrieve the transaction execution result data generated by the server.

[0025] The transaction execution result data includes transaction execution information, BIM model information, and parameter set.

[0026] A remote transaction processing system based on the Revit engine service-oriented deployment, including remote connection clients and servers;

[0027] The client submits transaction execution request data to the server and obtains transaction execution result data generated by the server.

[0028] The server generates a transaction execution parameter `Task_data` containing Revit information, BIM model information, and transaction execution requirements based on the request data. It pre-starts a group of Revit instances corresponding to the Revit information to establish a Revit instance resource pool and records the resource status and task information of each instance. It obtains the transaction execution parameter `Task_data` and the Revit instance resource pool, establishes a transaction task queue, allocates idle Revit instances according to the transaction task priority and the resource status information of the Revit instances, loads the target BIM model corresponding to the BIM model information by calling the Revit instance, and executes the corresponding BIM model's transaction task, forming a multi-Revit instance isolated Revit transaction execution environment `Env_rvt`. In the Revit transaction execution environment `Env_rvt`, the request content in the transaction execution requirements, i.e., the parameters required to operate the Revit instance, is matched and replaced with the construction parameters in the BIM model. The transaction task and BIM model update are then executed to obtain the updated BIM model `Model_new`. Finally, the updated BIM model `Model_new` is regenerated using the Revit instance to generate transaction execution result data.

[0029] The transaction execution result data includes transaction execution information, BIM model information, and parameter set.

[0030] The advantages and beneficial effects of this invention are as follows:

[0031] Compared to existing technologies, this invention eliminates the need for clients to run Revit software locally, significantly reducing terminal device resource consumption and improving the efficiency and automation of complex BIM model transaction processing. Furthermore, unlike existing BIM collaborative modeling platforms, this invention is not geared towards multi-user online parametric modeling and collaborative design, but rather towards remote invocation, automatic scheduling, and centralized calculation of Revit transaction execution capabilities. It is applicable to various BIM models, including bridges, buildings, and municipal engineering projects, for remote parameter updates, quantity calculations, model transaction execution, and automated model calculation services. This invention further establishes a Revit instance pool mechanism to achieve pre-startup and unified management of multiple interfaceless Revit instances. When multiple transaction tasks are submitted simultaneously, idle instances can be automatically allocated to execute the corresponding transaction tasks based on the task queue status, thereby improving system concurrency processing capabilities and reducing the time consumption caused by repeated Revit startups. Attached Figure Description

[0032] Figure 1 This is a flowchart of the method in an embodiment of the present invention.

[0033] Figure 2 This is a schematic diagram of the system structure in an embodiment of the present invention. Detailed Implementation

[0034] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0035] To address the problems of existing technologies where Revit model transaction processing relies on locally running Revit software, has a low degree of automation in transaction execution, and is difficult to achieve unified remote scheduling, this invention proposes a remote transaction processing method based on the service-oriented deployment of the Revit engine. Applied to cloud-based transaction processing, this method deploys a Revit interfaceless transaction execution environment on a cloud server, establishes a Revit instance pool, and combines it with a transaction task queue scheduling mechanism to achieve remote submission, automatic allocation, transaction execution, parameter updates, quantity calculation, and result feedback of BIM model transaction tasks. The client submits model transaction requests to the cloud transaction processing service via a web interface. Upon receiving the request, the cloud server invokes the Revit engine to process the target model, automatically allocating idle Revit instances from the Revit instance pool to execute the corresponding transaction tasks, and automatically releasing instance resources after task completion. This achieves service-oriented deployment and centralized computation of Revit transaction processing capabilities, reducing local device resource consumption and improving the efficiency of BIM model calculation and parameter transaction execution.

[0036] like Figure 1As shown, the method of the present invention includes the following steps:

[0037] Step S1: Construct a cloud transaction execution request; the client submits a model processing request (model file, parameter data, transaction instructions), the web service receives and parses the request, and the server generates a transaction execution task.

[0038] The system obtains the transaction execution request data submitted by the client, encodes and encapsulates the request data in a structured manner, generates unified transaction execution parameters, writes the BIM model file and transaction execution parameters into the corresponding task directory, generates an independent task identifier, and outputs the transaction execution task dataset Task_data.

[0039] Transaction execution request data is an HTTP request sent by the client to the cloud transaction execution service via a web interface. It includes, but is not limited to: BIM model file path or model file, component parameter data Param_data, model transaction processing instructions, user request identification information, etc.

[0040] This step enables remote submission and unified structured management of transaction execution tasks, allowing clients to initiate transaction execution requests without running Revit software locally. Compared to existing technologies that rely on local Revit plugins to perform transaction operations, this step implements service-oriented calls to transaction execution capabilities through network interfaces, improving system automation and remote access capabilities.

[0041] In this embodiment of the invention, the client sends a transaction execution request to the cloud transaction processing service through a web interface. After receiving the request, the server reads, encodes, encapsulates in a structured manner, and initializes the task directory to generate a unified transaction execution task dataset Task_data.

[0042] 1. The client sends the following HTTP request to the server:

[0043] POST / run

[0044] The JSON transaction data in the corresponding request body can be represented as:

[0045] {

[0046] "FamilyName":"High and Low Pier Cap Beam (Single Slope)",

[0047] "RevitVersion":"Revit2018",

[0048] "TransactionType":"Parameter_Update",

[0049] "OutputType":"GLTF",

[0050] "UserId":"USER_001",

[0051] "BridgeModels":[

[0052] {

[0053] Name":"Girder Thickness",

[0054] Value: "2300"

[0055] } ]

[0057] }

[0058] 2. After receiving the transaction request, the server first reads the JSON data from the HTTP request body:

[0059] string json =await reader.ReadToEndAsync();

[0060] Then, Base64 encoding is performed on the JSON transaction data:

[0061] string encoded =Convert.ToBase64String(Encoding.UTF8.GetBytes(json));

[0062] Using Base64 encoding can avoid command-line parameter parsing errors caused by incorrect transaction parameter data format.

[0063] 3. The program encapsulates the transaction request data in a structured manner to form a unified transaction execution parameter Task_data, as shown in Table 1.

[0064] Table 1. Transaction execution parameter Task_data table

[0065] Task_id TASK_202605261030001 Unique ID for Transaction Task User_id USER_001 User ID Revit_version Revit 2018 Revit runtime version Family_name High and low pier cap beam (single slope) Target model name Transaction_type Parameter_Update Transaction type Output_type GLTF Output type Param_count 4 Number of parameters Request_time 2026-05-26 10:30:00 Request time Callback_status Waiting Callback state

[0066] 4. The system automatically generates an independent transaction task identifier, Task_id.

[0067] The Task_id is generated using a combination of "timestamp + user ID + random check code", for example: TASK_202605261030001_USER001_A8F3;

[0068] 202605261030001: Task generation time;

[0069] USER001: User ID;

[0070] A8F3: Random checksum;

[0071] This method can avoid duplicate task numbers in high-concurrency transaction scenarios.

[0072] 5. The server further copies the pre-configured Revit transaction runtime environment to the current task directory and generates data:

[0073] CopyDirectory(

[0074] baseRvtDir

[0075] newCalDir)

[0076] baseRvtDir: Pre-configured Revit transaction template directory;

[0077] newCalDir: The actual Revit transaction task currently requested, which mainly includes pre-configured content and requested content; avoids file lock conflicts, plugin resource contention and other related issues that may occur when multiple transaction tasks run simultaneously.

[0078] Step S2: Revit instance pool initialization; based on the transaction execution task, pre-start multiple headless Revit running instances and establish a Revit instance resource pool.

[0079] Obtain the task execution dataset Task_data, pre-start multiple headless Revit instances on the server side, establish a Revit instance resource pool, record the running status, occupancy status and task information of each instance, establish an instance heartbeat detection mechanism, and output the Revit instance pool Instance_pool.

[0080] By maintaining multiple interfaceless Revit instances in a pre-start mode, the time consumed by repeated Revit startups during transaction task execution is reduced, thereby improving the system's concurrent transaction processing capabilities.

[0081] During the traditional Revit interface operation, interface refresh, window focus switching, user operation interruption, and graphics card resource consumption may all lead to transaction execution abnormalities. However, the interface-free instance does not require graphical interface interaction, which can avoid the interference of interface events on the transaction execution thread and improve the stability during long-term batch transaction execution. Especially when the complex BIM model contains a large number of family instances and parameter linkage relationships, it can reduce the probability of transaction commit failure.

[0082] In traditional local Revit transaction execution, users may simultaneously interact with and edit the model, which can easily lead to transaction lock contention issues. In this invention, the headless Revit instance adopts a dedicated task context running mode, where the same instance executes only a single transaction task at a time, thereby reducing the probability of model document transaction conflicts and improving the reliability of concurrent transaction processing.

[0083] Since there is no manual intervention during the operation of the interfaceless instance, the present invention can guarantee the atomicity of transactions in the process of batch component parameter updates; that is, multiple parameter update operations can be executed continuously in the same transaction context, avoiding the problem of some components being missed during manual operation.

[0084] Traditional Revit transaction execution typically relies on a fixed workstation environment, while headless Revit instances can be deployed on virtual machines, containerized servers, or cloud computing nodes; as the number of transaction requests increases, the number of Revit instances can be dynamically expanded to achieve elastic scaling of transaction processing capabilities.

[0085] Traditional local Revit plugin transaction execution methods require users to install the corresponding version of Revit software locally. This invention avoids transaction failures caused by differences in plugin version, family library version, or runtime environment, reducing the impact of version environment differences in remote collaboration scenarios.

[0086] In this embodiment of the invention, after the server obtains the task execution dataset Task_data, it automatically pre-starts a corresponding version of the headless Revit instance based on the Revit version information, model type, and task execution requirements in the task data, and establishes a unified Revit instance resource pool Instance_pool, as shown in the following example:

[0087] 1. The transaction execution task dataset Task_data generated in step S1 can be represented as shown in Table 1:

[0088] Task_data = {

[0089] Task_id: "TASK_202605261030001_USER001_A8F3",

[0090] Revit_version: "Revit2018",

[0091] Family_name: "High and Low Pier Cap Beam (Single Slope)",

[0092] Transaction_type :"Parameter_Update",

[0093] Output_type: "GLTF",

[0094] Param_count :8,

[0095] Model_type: "BridgeFamily"

[0096] }

[0097] 2. The server first parses the Task_data:

[0098] Revit_version;

[0099] Model_type;

[0100] Transaction_type;

[0101] For example, if Revit_version = "Revit2018", the program can retrieve all Revit version libraries using RevitProductUtility.GetAllInstalledRevitProducts(), as shown in Table 2.

[0102] Table 2 Revit Version Information

[0103] Revit 2018 C:\Program Files\Autodesk\Revit 2018 Revit 2020 C:\Program Files\Autodesk\Revit 2020 Revit 2024 C:\Program Files\Autodesk\Revit 2024

[0104] 3. The system automatically selects the corresponding Revit assembly directory based on the Revit_version field in Task_data.

[0105] Furthermore, the server establishes the corresponding Revit runtime environment through environment variable injection:

[0106] Environment.SetEnvironmentVariable("PATH",@"C:\Program Files\Autodesk\Revit 2018")

[0107] By using a dynamic assembly loading method, this invention can automatically adapt to different versions of the Revit runtime environment according to the task. Compared with the traditional fixed version Revit plugin solution, this invention can complete the processing of multiple versions of BIM model tasks without manually switching Revit versions.

[0108] 4. The server initializes a headless Revit instance in the following way:

[0109] Product product =Product.GetInstalledProduct();

[0110] var clientId=new ClientApplicationId(Guid.NewGuid(),"Don", "BIMAPI");

[0111] product.Init(clientId,"I am authorized by Autodesk to use this UI-less functionality.");

[0112] Application app =product.Application;

[0113] in:

[0114] Product.Init is used to initialize the Revit background runtime environment;

[0115] The Application object is used to establish a transaction execution context;

[0116] No need to launch the Revit graphical interface.

[0117] The interfaceless Revit running mode in this invention not only reduces the resource consumption of the graphical interface, but also achieves:

[0118] (1) Background continuous transaction execution: The instance does not rely on the Windows graphical message loop, which can improve the stability of long-term batch transaction execution;

[0119] (2) Supports deployment without GPU server: The current service can be deployed on a high-configuration server, regardless of the user's device configuration, so users with low-configuration computers can still remotely process large Revit models;

[0120] (3) Improve instance isolation capability: As mentioned above, each request will copy a pre-configuration and request separately, so it will not affect the requests of other users.

[0121] 5. The server pre-starts multiple Revit instances based on the number of transaction tasks and records relevant instance data, for example:

[0122] Instance ID: RVT_INS_001;

[0123] Revit version: Revit 2018 (can be a different version);

[0124] Initial state: Idle (Idle indicates that the current instance is in an idle state);

[0125] The server further records the running status, occupancy status, and task information of each instance, as shown in Table 3:

[0126] Table 3 Status and Task Information Table

[0127] Instance_id RVT_INS_001 Instance number Revit_version Revit 2018, 16, 17 Revit version Run_status Running, Stop Running status Occupy_status Busy, Idle Occupied status Current_task TASK_202605261030001 Current task Current_model High and low pier cap beam (single slope).rvt Current model CPU_usage 38% CPU utilization Memory_usage 5.2GB Memory usage Runtime_seconds 26s Runtime Last_heartbeat 2026-05-26 10:31:22 Recent heart rate

[0128] In summary, the server can monitor the running status of each Revit instance in real time and automatically schedule transaction tasks.

[0129] 6. This invention also establishes an instance heartbeat detection mechanism to periodically detect the following content on the server:

[0130] Does the Revit process exist?

[0131] Does the transaction continue to run?

[0132] Does the model respond?

[0133] Has the standard output log been updated?

[0134] Is there an abnormal increase in memory usage?

[0135] In this embodiment, it can be done in the following way:

[0136] Get the transaction output stream: process.StandardOutput.ReadToEndAsync()

[0137] Get the error output stream: process.StandardError.ReadToEndAsync()

[0138] If no changes are detected in (1) the output log; (2) the transaction is committed; or (3) the Revit response is detected within a preset time period, the current instance is considered abnormal, such as: model freezing, parameter looping, Revit crash, or freezing when calling a third-party plugin. The server automatically executes Process.GetCurrentProcess().Kill() to terminate the abnormal instance and restart a new instance.

[0139] 7. The basic data structure of the output instance pool (Instance_pool) is as follows:

[0140] Instance_id:"RVT_INS_001", (Current instance ID)

[0141] Revit_version: "Revit2018" (Revit version)

[0142] Run_status: "Busy" (Instance running status)

[0143] Occupy_status: "Busy" (Occupied status)

[0144] Current_task: "TASK_001", (The task currently being executed by the instance)

[0145] CPU_usage: "38%" (The percentage of CPU currently used by the instance)

[0146] Memory_usage: "500mb", (The amount of runtime memory currently used by the instance)

[0147] Drive_memory: "1000mb" (The amount of mechanical memory currently used by this instance on the server)

[0148] Step S3: Transaction task scheduling; Based on the transaction execution task and the Revit instance resource pool, call the corresponding Revit instance to load the target BIM model and form the Revit transaction execution environment.

[0149] Obtain the transaction task dataset Task_data and the Revit instance pool Instance_pool. Establish a transaction task queue on the cloud server. Automatically allocate idle Revit instances based on task priority and instance resource status. Call the corresponding Revit instance to load the target BIM model, establish model document objects and transaction processing context, execute the corresponding model transaction task, and output the Revit transaction execution environment Env_rvt.

[0150] This step enables automatic scheduling of transaction tasks and automatic allocation of Revit instances, improving the system's concurrent transaction processing capabilities and avoiding conflicts between multiple transaction tasks.

[0151] In this embodiment of the invention, the specific transaction task scheduling process is as follows:

[0152] 1. The server has currently received the following transaction tasks, as shown in Table 4:

[0153] Table 4 Transaction Task Information Table

[0154] TASK_001 Parameter_Update Revit 2018 High BridgeFamily TASK_002 Volume_Calculate Revit 2018 Medium BeamModel TASK_003 GLTF_Export Revit 2024 Low TunnelModel

[0155] The corresponding transaction task queue, Task_queue, can be represented as:

[0156] Task_queue = [

[0157] TASK_001,

[0158] TASK_002,

[0159] TASK_003 ]

[0161] 2. The priority level of a transaction task can be automatically obtained based on the following data, as shown in Table 5:

[0162] Table 5 Transaction Task Priority Table

[0163] User request type Real-time computing tasks have higher priority. Model complexity Large models have lower priority User Level Administrator tasks have higher priority. Transaction type Parameter modification is more important than model export Waiting time Automatically increase the priority of long-waiting tasks

[0164] For example, in task TASK_001, Priority_level = High. In this task, the task content is Parameter_Update (update parameters), which means that the current task belongs to the real-time parameter calculation transaction and needs to be executed first.

[0165] 2. The Revit instance resource status is obtained from the Instance_pool created in step S2, and an available instance with an Idle status and the same Revit version is automatically selected.

[0166] 3. After the task is assigned, the server calls the corresponding Revit instance to load the target BIM model, such as:

[0167] Document doc =MainApp.OpenDocumentFile(filePath)

[0168] Furthermore, change the instance state to Busy;

[0169] 4. Subsequently, the system creates a model document object (Document) and a transaction context (Transaction), and executes the transaction in the Revit instance obtained in the previous step by passing the request execution content.

[0170] 5. After the transaction is completed, the system will automatically return the parameters and automatically change the current instance state to Idle.

[0171] Step S4: Automatic execution of model transactions (parameter lookup, parameter modification, transaction commit);

[0172] Using the Revit model runtime environment Env_rvt and the parameter data of the actual Revit instance, the system automatically finds the corresponding component parameter in the model based on the parameter name, determines the parameter data type, assigns values ​​to numeric and string parameters respectively, automatically performs transaction commit and model update operations, and outputs the updated BIM model Model_new.

[0173] This step automates the modification of model parameters and the execution of transactions. Compared to existing technologies that require manual intervention in the Revit interface to modify model parameters one by one, this step can automatically complete parameter matching and transaction submission, reducing the error rate of manual operation and improving the batch processing capability of complex models.

[0174] Step S5: Model regeneration and result calculation, extraction of engineering quantities and processing results.

[0175] The updated BIM model Model_new is regenerated to obtain the target engineering quantity data in the model, extract the model calculation results and component parameter results, generate standardized result data, and output the transaction execution result data Result_data.

[0176] In this embodiment of the invention, a new parameter value needs to be passed to update the existing model, and the updated model volume value needs to be obtained. The specific process is as follows:

[0177] 1. The BIM model Model_new after parameter update in step S4 can be represented as shown in Table 6:

[0178] Table 6 Updated BIM Model Parameter Table

[0179] Cap beam thickness 2300 Beam length 15500 Height on the left cap beam 1200 Height on the right cap beam 1500

[0180] The system first performs a model regeneration operation: doc.Regenerate()

[0181] 2. The Revit model regeneration mechanism automatically recalculates the geometric relationships of the model based on updated parameters. For example:

[0182] Component dimensions are updated automatically;

[0183] Adaptive component position adjustment;

[0184] The parameter constraints are automatically recalculated.

[0185] The project quantity data is updated automatically.

[0186] 3. After the parameters are updated, the system automatically extracts the model volume engineering quantity parameters:

[0187] Var vo =mainIns.get_Parameter(BuiltInParameter.HOST_VOLUME_COMPUTED).AsDouble();

[0188] vol = vo.RvtVToM();

[0189] 4. This invention also automatically extracts model parameter results. For example, if no new parameters are passed and the task requirement is changed to obtaining parameters, then the data shown in Table 7 will be obtained:

[0190] Table 7 Automatically Extracted BIM Model Parameters

[0191] Cap beam thickness 2300 Beam length 15500 Height on the left cap beam 1200 Height on the right cap beam 1500

[0192] 5. In summary, Result_data is a non-fixed data structure, the specific value of which needs to be determined based on the business type, but it returns a JSON format content, for example:

[0193] Result_data = {

[0194] Task_id: "TASK_202605261030001",

[0195] Execute_status: "Success",

[0196] Family_name: "High and Low Pier Cap Beam (Single Slope)",

[0197] Volume: 32.68

[0198] TopVolume: 6.25

[0199] Total Volume: 38.93

[0200] Param_result : [

[0201] {

[0202] Name: "Girder Thickness"

[0203] Value: "2300"

[0204] },

[0205] {

[0206] Name: "Gai Liang Chang"

[0207] Value: "15500"

[0208] },

[0209] {

[0210] Name: "Height of Left Side Cap Beam"

[0211] Value: "1200"

[0212] }

[0213] ],

[0214] Model_result : {

[0215] Gltf_name : "High and Low Pier Cap Beam.gltf",

[0216] Gltf64 : "Base64_Gltf_Data",

[0217] Bin64: "Base64_Bin_Data"

[0218] },

[0219] Runtime_seconds: 26.4,

[0220] Execute_time: "2026-05-26 10:31:22"}

[0221] The field names are explained as follows:

[0222] Execute_status: Transaction execution status;

[0223] Volume: The volume of the main component;

[0224] TopVolume: Volume of the top-attached component;

[0225] TotalVolume: Total volume of the project;

[0226] Param_result: Gets the set of parameters for the parameter;

[0227] Model_result: The path to the new model result file after updating parameters;

[0228] Runtime_seconds: Execution time.

[0229] This step enables the automatic extraction and unified output of model calculation results. Compared with the existing technology that requires manual access to the model to view the engineering quantity data, this step can automatically complete the model result calculation and data extraction, improving the efficiency of engineering quantity statistics and the consistency of results.

[0230] Step S6: Remote return of transaction results and release of instance; return the processing results to the client via the Web interface and release the server instance.

[0231] Obtain the transaction execution result data Result_data, format and encapsulate the result data, and output the client transaction execution result Response_result.

[0232] In this embodiment of the invention, Result_data:

[0233] 1. Revit transaction internal calculation results data;

[0234] 2. Data structures generated internally by the cloud transaction execution module.

[0235] Response_result:

[0236] 1. Response data returned by the client interface;

[0237] 2. Data structures output by the HTTP / Web interface;

[0238] 3. Error codes;

[0239] 4. Task status;

[0240] 5. Request status;

[0241] 6. Timestamp;

[0242] 7. It contains Result_data.

[0243] Response_result is the interface response result further encapsulated from Result_data, used to return the result of the backend request; Result_data only stores the result after the Revit instance is executed, and cannot be returned automatically, so it needs to rely on the web service to return it.

[0244] For example: Response_result = {

[0245] Code: 200

[0246] Message: "Execute Success",

[0247] Task_id: "TASK_202605261030001",

[0248] Execute_status: "Completed",

[0249] Response_time: "2026-05-26 10:31:25",

[0250] Result_data = {

[0251] Task_id: "TASK_202605261030001",

[0252] Execute_status: "Success",

[0253] Family_name: "High and Low Pier Cap Beam (Single Slope)",

[0254] Volume: 32.68

[0255] TopVolume: 6.25

[0256] Total Volume: 38.93

[0257] Param_result : [

[0258] {

[0259] Name: "Girder Thickness"

[0260] Value: "2300"

[0261] },

[0262] {

[0263] Name: "Gai Liang Chang"

[0264] Value: "15500"

[0265] },

[0266] {

[0267] Name: "Height of Left Side Cap Beam"

[0268] Value: "1200"

[0269] }

[0270] ],

[0271] Model_result : {

[0272] Gltf_name : "High and Low Pier Cap Beam.gltf",

[0273] Gltf64 : "Base64_Gltf_Data",

[0274] Bin64: "Base64_Bin_Data"

[0275] },

[0276] Runtime_seconds: 26.4,

[0277] Execute_time: "2026-05-26 10:31:22"}

[0278] }

[0279] The beneficial effects are as follows:

[0280] 1. Decoupling of transaction results and interface protocols: Result_data focuses only on the Revit transaction execution result itself; Response_result is used to adapt to HTTP interfaces, third-party system calls, cloud platform data exchange, etc.

[0281] 2. Supports unified interface extension and error finding: Result_data only stores Revit execution errors, not interface errors; Response_result can be signed for verification, but Result_data cannot.

[0282] 3. Supports asynchronous transaction callbacks: Response_result can be directly used as an HTTP response result, message queue, or callback interface data for remote return, enabling networked output of Revit transaction execution results.

[0283] The results are returned to the client via the web interface, the transaction execution status is updated, the corresponding Revit running instance is automatically released, and the instance is returned to the Revit instance pool.

[0284] This step enables remote return and unified access to Revit transaction execution results. Compared to existing technologies where transaction execution results can only be viewed in the local Revit environment, this step enables networked output of model calculation results, improving system integration capabilities and remote service capabilities.

[0285] like Figure 2 As shown, the present invention also provides a remote transaction processing system based on the Revit engine service deployment, including a remotely connected client and server to execute the above-described remote transaction processing method.

[0286] The client submits transaction execution request data to the server and obtains transaction execution result data generated by the server.

[0287] On the server side, based on the request data, a transaction execution parameter `Task_data` containing Revit information, BIM model information, and transaction execution requirements is generated. A group of Revit instances corresponding to the Revit information are pre-started to establish a Revit instance resource pool, and the resource status and task information of each instance are recorded. The transaction execution parameter `Task_data` and the Revit instance resource pool are obtained, a transaction task queue is established, and idle Revit instances are allocated according to the transaction task priority and the resource status information of the Revit instances. The target BIM model corresponding to the BIM model information is loaded by calling the Revit instance, and the transaction task of the corresponding BIM model is executed, forming a Revit transaction execution environment `Env_rvt` isolated by multiple Revit instances. In the Revit transaction execution environment `Env_rvt`, the request content in the transaction execution requirements, that is, the parameters required for requesting operations on the Revit instance, is matched and replaced with the construction parameters in the BIM model. The transaction task and BIM model update are then executed to obtain the updated BIM model `Model_new`. The updated BIM model `Model_new` is regenerated through the Revit instance to generate the transaction execution result data.

[0288] The transaction execution result data includes transaction execution information, BIM model information, and parameter set.

[0289] The specific execution process and effects of the remote transaction processing system are the same as those of the remote transaction processing method described above, and will not be repeated here.

[0290] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A remote transaction processing method based on Revit engine service-oriented deployment, applied to the server side, characterized by: Obtain the transaction execution request data submitted by the client, and generate transaction execution parameters containing Revit information, BIM model information and transaction execution requirements based on the request data; A group of Revit instances corresponding to the Revit information are pre-started to establish a Revit instance resource pool and record the resource status information and task information of each instance. Before pre-start, the background runtime environment of the headless Revit instance is initialized to obtain objects for establishing the transaction execution context; the pre-started Revit instance is a combination of headless Revit instances, which adopt a dedicated task context running mode so that the same instance executes only a single transaction task at the same time, and multiple request operations can be executed continuously in the same transaction context. Obtain transaction execution parameters and Revit instance resource pool; allocate idle Revit instances according to transaction task priority and the resource status information of Revit instances; load the target BIM model corresponding to the BIM model information by calling the Revit instance; execute the transaction task of the corresponding BIM model; and form a Revit transaction execution environment with multiple Revit instances isolated. After the target BIM model is loaded into the Revit instance, a BIM model document object and a transaction execution context are created. The transaction task is then executed in the allocated idle Revit instance by requesting content. After the transaction task is completed, the parameters after execution are returned. In the Revit transaction execution environment, the request content in the transaction execution requirement is matched and replaced with the component parameters in the BIM model. Then, the transaction task and BIM model update are performed to obtain the updated BIM model. The updated BIM model is regenerated using a Revit instance to generate transaction execution result data and send it to the client.

2. The remote transaction processing method based on Revit engine service deployment according to claim 1, characterized in that: The system reads the target BIM model name, Revit version, transaction type, output result type, user number, and request content from the transaction execution request data, performs encoding, and obtains transaction execution parameters after structured encapsulation. It also generates an independent transaction task identifier based on the request time and user number.

3. The remote transaction processing method based on Revit engine service deployment according to claim 2, characterized in that: The priority of the transaction task is determined by factors including user request type, model complexity, user level, transaction type, and waiting time.

4. The remote transaction processing method based on Revit engine service deployment according to claim 2, characterized in that: The resource status information includes running information and resource occupancy information. Based on the priority of the transaction task, a Revit instance with an idle resource occupancy status and the same Revit version is selected from the Revit instance resource pool. After loading the target BIM model, the resource occupancy information of the Revit instance is changed to busy. After the transaction task is completed, the resource occupancy information of the current Revit instance is changed back to idle.

5. The remote transaction processing method based on Revit engine service deployment according to claim 1, characterized in that: Copy the pre-configured Revit transaction template and the currently requested Revit actual transaction task to the current task directory. The currently requested Revit actual transaction task includes the pre-configured content and the requested content.

6. The remote transaction processing method based on Revit engine service deployment according to claim 1, characterized in that: Establish an instance heartbeat detection mechanism to periodically check whether the Revit process exists, whether the transaction continues to run, whether the BIM model responds, whether the log is updated, and whether memory is growing abnormally. This is used to determine whether the instance is running abnormally, so as to terminate the abnormal instance and restart the corresponding new instance.

7. A remote transaction processing method based on Revit engine service-oriented deployment, applied to the client, characterized by: The server submits a transaction execution request to the server so that the server can generate transaction execution parameters containing Revit information, BIM model information and transaction execution requirements based on the request data; and pre-starts a set of Revit instances corresponding to the Revit information to establish a Revit instance resource pool, and records the resource status information and task information of each instance. Based on transaction execution parameters and the Revit instance resource pool, idle Revit instances are allocated according to transaction task priorities and the resource status information of the Revit instances. The target BIM model corresponding to the BIM model information is loaded by calling the Revit instance, and the corresponding BIM model transaction task is executed, forming a Revit transaction execution environment isolated by multiple Revit instances. Within the Revit transaction execution environment, the request content in the transaction execution requirements is matched and replaced with the component parameters in the BIM model, and the transaction task and BIM model are updated to obtain the updated BIM model. Finally, a regeneration operation is performed on the updated BIM model through the Revit instance to generate transaction execution result data. Before pre-start, the background runtime environment of the headless Revit instance is initialized to obtain objects for establishing the transaction execution context; the pre-started Revit instance is a combination of headless Revit instances, which adopt a dedicated task context running mode so that the same instance executes only a single transaction task at the same time, and multiple request operations can be executed continuously in the same transaction context. After the target BIM model is loaded into the Revit instance, a BIM model document object and a transaction execution context are created. The transaction task is then executed in the allocated idle Revit instance by requesting content. After the transaction task is completed, the parameters after execution are returned. Retrieve the transaction execution result data generated by the server.

8. A remote transaction processing system based on the Revit engine and deployed as a service, comprising a remotely connected client and server, characterized in that: The client submits transaction execution request data to the server and obtains transaction execution result data generated by the server. The server generates transaction execution parameters containing Revit information, BIM model information, and transaction execution requirements based on the request data; it pre-starts a group of Revit instances corresponding to the Revit information to establish a Revit instance resource pool and records the resource status information and task information of each instance. The process involves obtaining transaction execution parameters and the Revit instance resource pool. Based on the transaction task priority and the resource status information of the Revit instance, an idle Revit instance is allocated. The target BIM model corresponding to the BIM model information is loaded by calling the Revit instance, and the transaction task of the corresponding BIM model is executed, forming a Revit transaction execution environment isolated by multiple Revit instances. In the Revit transaction execution environment, the request content in the transaction execution requirement is matched and replaced with the component parameters in the BIM model. The transaction task and BIM model are then updated to obtain the updated BIM model. Finally, the updated BIM model is regenerated using the Revit instance to generate transaction execution result data. Before pre-start, the background runtime environment of the headless Revit instance is initialized to obtain objects for establishing the transaction execution context; the pre-started Revit instance is a combination of headless Revit instances, which adopt a dedicated task context running mode so that the same instance executes only a single transaction task at the same time, and multiple request operations can be executed continuously in the same transaction context. After the target BIM model is loaded into the Revit instance, a BIM model document object and a transaction execution context are created. The transaction task is then executed in the allocated idle Revit instance by requesting content. After the transaction task is completed, the parameters are returned.

Citation Information

Patent Citations

  • Modeling method and device based on Revit family library, equipment and storage medium

    CN114428985A

  • Heterogeneous BIM model lightweight server intelligent scheduling method and system

    CN120653452A